---
title: "Create Payment Intent Batch"
method: POST
path: "/iap/payment-intents/batch"
tags: ["Checkout"]
---

# Create Payment Intent Batch

`POST /iap/payment-intents/batch`

Creates Stripe PaymentIntents for multiple products in a single request. Reduces N sequential requests to 1, with shared Stripe customer/account resolution. Products that fail validation return an error entry instead of failing the entire batch. Maximum 25 products per request.

## Request body

- object
  - `products` object[], required — Array of products to create payment intents for. Maximum 25 items.
    - `product_id` string, required — The product's `reference_id` (e.g., `com.app.premium`).
    - `storekit_subscription_end` string, date-time — ISO 8601 datetime of the current StoreKit subscription's expiry. Used for Switch & Save migrations.
    - `storekit_original_transaction_id` string — The StoreKit original transaction ID for the subscription being migrated.
  - `user_id` string — The user's external ID.
  - `external_user_id` string — Alias for `user_id`.
  - `platform` 'ios' | 'android' | 'web' — The platform the purchase is being made from.
  - `checkout_mode` 'native' | 'browser' — Preferred checkout mode.
  - `stripe_customer_id` string — Existing Stripe customer ID to attach payments to.
  - `customer_name` string — Optional customer display name to attach to the Stripe customer for this batch. Also accepts the camelCase alias `customerName`.
  - `customer_email` string — Optional customer email to attach to the Stripe customer for this batch. Also accepts the camelCase alias `customerEmail`.

## Response `200`

Batch results with per-product success or error

- object
  - `results` object[], required — Array of results, one per requested product. Each entry is either a successful PaymentIntent response or an error object.
    - `product_id` string — The product's `reference_id`.
    - `client_secret` string — Stripe PaymentIntent client secret. Present on success.
    - `transaction_id` string — ZeroSettle transaction ID. Present on success.
    - `amount` integer — Charge amount in cents. Present on success.
    - `currency` string — ISO 4217 currency code. Present on success.
    - `product_name` string — Display name of the product. Present on success.
    - `original_amount` integer — Full price before discounts/trials. Present on success.
    - `checkout_url` string — Fallback URL for browser-based checkout. Present on success.
    - `publishable_key` string — Stripe publishable key for confirming the payment. Present on success.
    - `stripe_account` string, nullable — Connected Stripe account ID for BYOS. Null for managed mode.
    - `merchant_country` string, nullable — ISO 3166-1 alpha-2 country code for Apple Pay.
    - `is_subscription` boolean — Whether this product is a subscription. Present on success.
    - `subscription_interval` string — Subscription billing interval (e.g., `month`, `week`). Present for subscriptions.
    - `trial_type` 'free_trial' | 'migration', nullable — Type of trial applied. Omitted when no trial.
    - `trial_end` integer, nullable — Unix timestamp when trial ends. Only present with active trial.
    - `pending_amount` integer, nullable — Amount billed when trial ends. Only present with active trial.
    - `error` string — Error message. Present when this product failed validation.

## Other responses

- `400` — Invalid request -- missing or malformed parameters.
- `401` — Invalid or missing API key.
- `502` — Upstream service error (Stripe, Apple).

---

[API](https://skmtc.net/zerosettle/apis/zerosettle-iap-api.md) · [All operations](https://skmtc.net/zerosettle/apis/zerosettle-iap-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zerosettle/zerosettle-iap-api/revisions/1a7aa12f3d5e/schema)
