v1

latestOpenAPI 3.0.32026-07-132534113.7 KB
Checkout

Create Payment Intent

Creates a Stripe PaymentIntent for native checkout (Apple Pay / Google Pay payment sheet). Returns a client_secret for confirming the payment on the client side and a checkout_url for fallback browser checkout.

post/iap/payment-intents

Request body

product_idstring required

The product's reference_id (e.g., com.app.premium).

external_user_idstring

The user's external ID. Either this or user_id is required.

user_idstring

Alias for external_user_id. Either this or external_user_id is required.

platform'ios' | 'android' | 'web'

The platform the purchase is being made from.

stripe_customer_idstring

Existing Stripe customer ID to attach the payment to.

customer_namestring

Optional customer display name to attach to the Stripe customer for this checkout. Also accepts the camelCase alias customerName.

customer_emailstring

Optional customer email to attach to the Stripe customer for this checkout. Also accepts the camelCase alias customerEmail.

checkout_domainstring

Verified custom subdomain for the app's checkout (e.g., checkout.example.com). Configure via the dashboard — see the Custom Checkout Domains guide.

checkout_mode'native' | 'browser'

Preferred checkout mode. native uses the in-app payment sheet; browser opens a web checkout page.

storekit_subscription_endstring date-time

ISO 8601 datetime of the current StoreKit subscription's expiry. Used for Switch & Save migrations to align the trial period.

storekit_original_transaction_idstring

The StoreKit original transaction ID for the subscription being migrated.

external_purchase_tokenstring

Apple externalPurchaseToken received from StoreKit at the disclosure-sheet confirmation step. When provided, ZeroSettle uses this token for automatic external-purchase reporting in eligible jurisdictions (EU/EEA under the DMA alternative terms, EEA music streaming, and Japan MSCA on iOS 26.4+). Optional — omit for non-Apple platforms or regions where reporting is not required.

ios_versionstring

iOS version of the checkout client (e.g., '26.4.1'). Used for JP MSCA regime gating, which requires iOS 26+. Optional.

Response

Payment intent created successfully

client_secretstring

Stripe PaymentIntent client secret. Use this to confirm the payment on the client side.

payment_intent_idstring

Stripe PaymentIntent ID.

transaction_idstring

ZeroSettle transaction ID. Use this to poll for transaction status.

amount_centsinteger

The charge amount in cents.

currencystring

ISO 4217 currency code (e.g., usd).

product_namestring

Display name of the product being purchased.

checkout_urlstring

Fallback URL for browser-based checkout.

merchant_countrystring

ISO 3166-1 alpha-2 country code of the merchant's Stripe account. Required for Apple Pay paymentRequest() country parameter.

original_amount_centsinteger

The original price before any discounts or prorations.

trial_type'free_trial' | 'migration' nullable

The type of trial applied to this checkout. free_trial for standard free trials, migration for Switch & Save aligned trials. Omitted when no trial is active.

trial_endinteger nullable

Unix timestamp when the trial period ends. Only present when a trial is active.

pending_amountinteger nullable

The charge amount in cents that will be billed when the trial ends. Only present when a trial is active.

intent_type'setup' | 'payment'

Discriminator for which Stripe confirm method the client must call. setup: confirms a SetupIntent (free trial — card saved, no immediate charge); payment: confirms a PaymentIntent (paid/auth_hold trial upfront charge, or any normal charge). Also returned by POST /iap/payment-intents/{transaction_id}/finalize/ with the same semantics.