When to use Stripe
The released Stripe integration uses a server-created Stripe Checkout Session and a hosted redirect. It is not Stripe Elements. AvraAPI Payment Elements can display a Stripe card and hand the customer to the prepared Checkout URL, but all provider authentication, session creation, webhook verification, and completion stay on your backend.The shared UPG lifecycle—availability,
createOrder(), and completePayment()—is documented in Quick Setup. This page covers only Stripe-specific callback and return handling for the released Checkout flow.SDK Functions
- PHP SDK
- Laravel SDK
- Node.js SDK
Preserve a signed Stripe webhook
Stripe signature verification depends on the unchanged raw request bytes. Read the body before parsing JSON and pass the exactStripe-Signature header. The wrapper Base64-encodes the raw bytes only for safe JSON transport to AvraAPI; it does not alter the bytes used for verification.
- PHP SDK
- Laravel SDK
- Node.js SDK
StripeWebhookPayload::toArray():Prepare a Stripe browser-return payload
The success URL may return a Stripe Checkout Session ID beginning withcs_. That value identifies the prepared session but is not proof of payment. The SDK wrapper accepts only a Checkout Session ID and sends it as the return observation for common completion.
- PHP SDK
- Laravel SDK
- Node.js SDK
StripeReturnPayload::toArray():cs_. During completion, AvraAPI checks it against the Checkout Session ID bound when the order was created, then retrieves that session from Stripe.Complete a Stripe payment
Use the stored completion context with the webhook payload or return payload. A supplied valid webhook must be one of the supported Checkout Session events; AvraAPI then retrieves the exact server-created Checkout Session, validates its binding, amount, currency, environment, and payment state, and produces the canonical result. Stripe retrieval cannot be disabled.- PHP SDK
- Laravel SDK
- Node.js SDK
PaymentCompletionResult:$result->gateway, $result->verified, $result->paymentStatus, $result->providerStatus, $result->gatewayReference, and $result->reconciliation. A session with payment_status: unpaid is pending while open, failed when complete, or cancelled when expired. A retrieval outage is unknown and must be retried from your backend.Payment Elements
Payment Elements does not load Stripe.js or Stripe Elements in this integration. It displays a normal redirect method and sends the customer only to the public Stripe Checkout URL created by your backend.Gateway-specific options
Stripe payment-method types are configured in the Gateway Vault. When no allowed-type list is configured, Stripe Checkout uses the merchant account’s Dashboard defaults. A browser cannot submit a Stripe secret key, webhook signing secret, account context, API version, payment method type, or checkout amount throughproviderOptions.
The success URL and cancel URL are provider configuration resolved by your backend. AvraAPI adds Stripe’s Checkout Session placeholder to the configured success return URL and never exposes the server-only completion context.
Completion, webhooks, and safety
Register a Stripe webhook endpoint for the exact Checkout Session event types supported by this release:checkout.session.completed, checkout.session.async_payment_succeeded, and checkout.session.async_payment_failed. Preserve raw bytes and the Stripe-Signature header, then let shared completion verify and reconcile the bound session.
The browser return is informational only. Fulfil only when verified is true and paymentStatus is succeeded; do not trust browser navigation, a cs_... value, or a webhook without valid raw-body signature verification.