Payments
Create and manage payment intents, refunds, payouts, checkout sessions, and payment links. All amounts are in the smallest currency unit (cents for USD).
All payment endpoints require a valid JWT or API key in the Authorization header. See
Authentication.
Endpoints
/payments/intentsCreate a payment intent/payments/intents/:id/confirmConfirm and capture a payment/payments/:idRetrieve a transaction/merchants/:merchantId/paymentsList all transactions for a merchant/payments/:id/refundRefund a payment (full or partial)/merchants/:merchantId/payoutsCreate a payout to a merchant bank account/merchants/:merchantId/payoutsList payout history/checkout/hosted/:storeIdCreate a hosted checkout session for a store (API key, dashboard session or checkout token)/checkout/:sessionIdRetrieve a checkout session/merchants/:merchantId/payment-linksCreate a reusable payment link/merchants/:merchantId/payment-linksList payment linksCreate a Payment Intent
/payments/intentsCreate a payment intent| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in smallest currency unit (min: 1) |
currency | string | Yes | Three-letter ISO currency code (max 3 chars) |
storeId | string | Yes | Target store ID |
merchantId | string | Yes | Merchant ID |
customerEmail | string | No | Customer email for receipts |
idempotencyKey | string | No | Unique key to prevent duplicate charges |
The intent is created in a pending state. Capture it with the confirm endpoint.
Confirm a Payment
/payments/intents/:id/confirmConfirm and capture a paymentConfirms the payment intent identified by :id through the configured payment provider (mock or
real Stripe via env flag) and transitions the transaction to succeeded or failed.
Retrieve a Transaction
/payments/:idRetrieve a transactionReturns the transaction record including status, amount, currency, and provider metadata.
List Transactions
/merchants/:merchantId/paymentsList all transactions for a merchantReturns all transactions belonging to the given merchant, most recent first.
Refund a Payment
/payments/:id/refundRefund a payment (full or partial)| Field | Type | Required | Description |
|---|---|---|---|
amount | number | No | Partial refund amount in cents (min: 1). Omit for a full refund. |
reason | string | No | Reason recorded with the refund |
Refunds are not automatically idempotent. Track refund state on your side or pass an
idempotencyKey on the original intent to avoid duplicate refunds.
Payouts
/merchants/:merchantId/payoutsCreate a payout/merchants/:merchantId/payoutsList payout history| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Payout amount in cents (min: 1) |
currency | string | Yes | Three-letter ISO currency code |
destination | string | No | External bank account ID. Defaults to the merchant's primary account. |
Checkout Sessions
These payment-module session endpoints create a server-side checkout session tied to a store and
merchant. For the hosted checkout flow (authentication, checkout tokens, the payment page URL and the
checkout.session.* webhooks), see the dedicated Checkout page.
/checkout/hosted/:storeIdCreate a hosted checkout session for a store (API key, dashboard session or checkout token)/checkout/:sessionIdRetrieve a checkout session| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in cents (min: 1) |
currency | string | Yes | Three-letter ISO currency code |
storeId | string | Yes | Target store ID |
merchantId | string | Yes | Merchant ID |
successUrl | string | No | Redirect URL on success |
cancelUrl | string | No | Redirect URL on cancel |
Payment Links
/merchants/:merchantId/payment-linksCreate a reusable payment link/merchants/:merchantId/payment-linksList payment links| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in cents (min: 1) |
currency | string | Yes | Three-letter ISO currency code |
storeId | string | Yes | Target store ID |
description | string | No | Description shown on the payment page |