Recued
Menu
← Back to recipes

Mark a public-form order paid

by recued-core v1 63 views

Use “Mark a public-form order paid” in Recued. When Stripe reports a payment through your offer’s payment link, it finds the order your public form opened, checks the payment with Stripe and marks the order paid. If the amount is wrong, the order is closed or it was already paid, you get a notice instead.

Complete workflow

Public Form Checkout 2 pinned recipes

Use Public Form Checkout in Recued to sell from a public form. A buyer sends the form and gets a button to your Stripe payment link. Recued opens their order first, checks each payment with Stripe and marks the order paid. A payment that does not match its order is sent to you as a notice instead.

You are viewing one recipe in this workflow. Installing it opens the complete pack so its other recipes and background automations arrive together.

Mark a public-form order paid
This recipe Background automation

Use “Mark a public-form order paid” in Recued. When Stripe reports a payment through your offer’s payment link, it finds the order your public form opened, checks the payment with Stripe and marks the order paid. If the amount is wrong, the order is closed or it was already paid, you get a notice instead.

pack:public-form-checkoutrecipe-role:webhookpayment-observerprovider-source-truth
by recued-core pinned v1

Use “Show the payment button for a form order” in Recued. Pair it with a public selling form. After a buyer sends the form, the page shows what they are buying and a button to your offer’s payment page. Recued has already opened their order, and the button carries its reference.

pack:public-form-checkoutrecipe-role:receptionsellercheckout
by recued-core pinned v1
View pack details, dependencies, and permissions →

What this does

A buyer fills in your selling form. Recued opens an order and shows them your offer's payment link, marked with that order's reference. Stripe then creates the checkout itself, so until now nothing tied that payment back to the order.

When Stripe reports the payment, this recipe:

  1. Takes only checkouts that came from a payment link and name an order a public form opened. Checkouts that other recipes created are left to their own observers.
  2. Reads the checkout back from Stripe. It must be complete and paid, carry the same order reference, and charge the order's exact amount and currency.
  3. Attaches that checkout to the order, then marks the order paid.

It changes nothing when a check fails.

When you hear from it

  • A payment does not match its order. The payment link charges a different amount or currency than the offer. Fix the link's price in Stripe.
  • A second payment for one order. The buyer paid twice. The second payment may need a refund.
  • A payment arrived for a closed order. The order was cancelled or expired before the buyer paid.
  • A payment names an order this server does not have. Check the payment in Stripe.

A delayed payment method finishes the checkout before the money lands. The order is marked paid when Stripe reports the money, not before.

How it works 62 steps

Inspect the data fetches, transforms, gates, and output this recipe runs.

Process (62 steps)
◆ webhook_event core.webhook.event.get
Get webhook event
■ profile_exact compare
Check if webhook event delivery profile id is one of stripe.event.v1
■ decoded_schema_exact compare
Check if webhook event delivery decoded schema id is one of stripe.event.v1
■ transport_exact compare
Check if webhook event delivery transport assurance is one of authenticated
■ source_truth_policy_exact compare
Check if webhook event delivery minimum source truth policy is one of provider_readback_required
■ freshness_exact compare
Check if webhook event delivery freshness checked is one of true
■ payload_object_exact compare
Check if webhook event payload object is one of event
■ payload_event_id_exact compare
Check if webhook event payload id is one of webhook event event provider event id
■ payload_event_type_exact compare
Check if webhook event payload type is one of webhook event event provider event type
■ envelope_shared_valid all
Check if all conditions are true
■ payment_event_type compare
Check if webhook event event provider event type is one of checkout.session.completed, checkout.session.async_payment_succeeded
■ session_object_exact compare
Check if webhook event payload data object object is one of checkout.session
■ session_id_exact compare
Check if webhook event payload data object id is one of webhook event event provider resource id
■ session_id_prefix starts_with
Check if webhook event event provider resource id starts with cs_
■ session_id_truncated truncate
Truncate webhook event event provider resource id to a max length
■ session_id_bounded compare
Check if webhook event event provider resource id is one of session id truncated
■ event_payment_link_prefix starts_with
Check if webhook event payload data object payment link starts with plink_
■ payment_link_event all
Check if all conditions are true
■ order_handle_prefix starts_with
Check if webhook event payload data object client reference id starts with oh_
■ order_handle_truncated truncate
Truncate webhook event payload data object client reference id to a max length
■ order_handle_bounded compare
Check if webhook event payload data object client reference id is one of order handle truncated
■ order_event_valid all
Check if all conditions are true
◆ order_read core.seller.order.get
Get seller order
skip: step.order_event_valid equal false
■ order_found compare
Check if order read order exists
■ order_from_form compare
Check if order read order origin kind is one of reception_submission
■ order_phase_draft compare
Check if order read order phase is one of draft
■ order_session_absent compare
Check if order read order provider session id is missing
■ order_unattached all
Check if all conditions are true
■ order_phase_awaiting compare
Check if order read order phase is one of awaiting_payment
■ order_session_is_event compare
Check if order read order provider session id is one of webhook event event provider resource id
■ order_attached_here all
Check if all conditions are true
■ order_open_for_payment any
Check if any of the conditions are true
■ order_already_paid compare
Check if order read order phase is one of paid, fulfilling, approved, delivering, complete
■ read_allowed all
Check if all conditions are true
◆ session_read recued-core.seller-stripe.checkout.session.read
Read checkout session on seller stripe
skip: step.read_allowed equal false
■ session_id_matches compare
Check if session read result id is one of webhook event event provider resource id
■ session_payment_link_prefix starts_with
Check if session read result payment link starts with plink_
■ session_status_complete compare
Check if session read result status is one of complete
■ session_paid compare
Check if session read result payment status is one of paid
■ session_mode_payment compare
Check if session read result mode is one of payment
■ session_reference_matches compare
Check if session read result client reference id is one of order read order order handle
■ session_amount_matches compare
Check if session read result amount total equals order read order amount minor
■ order_currency_lower lowercase
Convert order read order currency to lowercase
■ session_currency_matches compare
Check if session read result currency equals order currency lower
■ session_payment_intent_present compare
Check if session read result payment intent exists
■ join_allowed all
Check if all conditions are true
■ attach_needed all
Check if all conditions are true
◆ attach_payment core.seller.order.attach-payment
Attach payment seller order
skip: step.attach_needed equal false
■ confirm_revision coalesce
Use the first available value from: attach payment order revision, order read order revision
◆ confirm_payment core.seller.order.confirm-payment
Confirm payment seller order
skip: step.join_allowed equal false
■ payment_advanced compare
Check if confirm payment order phase is one of paid
■ payment_pending all
Check if all conditions are true
■ payment_source_mismatch all
Check if all conditions are true
■ order_unknown all
Check if all conditions are true
■ order_taken any
Check if any of the conditions are true
■ second_payment all
Check if all conditions are true
■ order_closed all
Check if all conditions are true
◆ mismatch_notification core.notification.send
Send notification
skip: step.payment_source_mismatch equal false
◆ unknown_order_notification core.notification.send
Send notification
skip: step.order_unknown equal false
◆ second_payment_notification core.notification.send
Send notification
skip: step.second_payment equal false
◆ closed_order_notification core.notification.send
Send notification
skip: step.order_closed equal false
■ event_summary to_summary
Format results as a summary card
▼
Output
summary event_summary

Uses (6 operations)

Webhooks Get webhook event core.webhook.event.get
Selling Get seller order core.seller.order.get
Pack operation Read checkout session on seller stripe recued-core.seller-stripe.checkout.session.read
Selling Attach payment seller order core.seller.order.attach-payment
Selling Confirm payment seller order core.seller.order.confirm-payment
Notifications Send notification core.notification.send

Trust & control

What installing this recipe would let it do. Recued grants these permissions at install — review them there before approving.

Permissions it requires

Send notifications
Declared by the recipe — Recued grants these at install, where you review them before approving.

What it's allowed to do

Read Webhooks core.webhook.event.get read-only
Read Selling core.seller.order.get read-only
Write Selling core.seller.order.attach-payment external change
Write Selling core.seller.order.confirm-payment external change
Read Notifications core.notification.send external change

1 more isn't listed here. You'll see it at install.

Data it touches

SurfacesWebhooksSellingNotifications
Warehousedata.object

About

Tags

pack:public-form-checkoutrecipe-role:webhookpayment-observerprovider-source-truthd-207

Details

62 steps recipe_id: observe-form-checkout-payment-event