Action ReferencesPaymentAction
Action References

PaymentAction

PaymentAction

Purpose Handles a payment lifecycle using a native gateway integration (currently Stripe). It can start, complete, refresh, or accept webhooks for payment sessions.

When to use it

  • During transactional flows (afterMainCreateOperation for orders)
  • On scheduled sync (afterApiEvent for refresh/callback)

Key fields

FieldTypeDescription
gatewayStringPayment gateway (Stripe). Default: "Stripe"
stageEnum(PaymentStage)One of simple, start, complete, refresh, callback. Default: "start"
contextPropertyNameStringWhere to store the payment response or token.

PaymentStage Enum

StageDescription
simpleOne synchronous call to create charge immediately
startStart payment operation, create payment intent
completeComplete payment, convert intent to charge
refreshFetch payment status from gateway
callbackHandle gateway webhook callback

Example

{
  "id": "a170-start-payment",
  "name": "startStripePayment",
  "gateway": "Stripe",
  "stage": "start",
  "contextPropertyName": "paymentSession"
}

Note: Payment refers to processing payment through a gateway (Stripe, etc.) using PaymentAction and PaymentManager. This is distinct from Checkout, which refers to converting a shopping cart into an order using CartCheckoutAction and the shopping cart's checkoutSettings.

Runtime Notes for StripeOrder Flows

  • Callback processing can result in a dedicated completion phase (paymentDone) used by generated payment assets.
  • When using post-callback hooks (for example edgeFunctionPaymentDone), write handlers as idempotent because gateway callbacks may be retried.
  • For checkout/order integrations, route names are generated; verify exact REST paths from generated service docs instead of assuming fixed /v1/... patterns.