Skip to content
Elara One docs
Checkout

Create a Stripe PaymentIntent

POST
/v1/checkout/payment-intent

Authorization

tenantKey
headerX-Tenant-Key<token>

The public store key (pk_live_…). Required on every call.

Header Parameters

X-Cart-Token*string

The cart token from POST /api/v1/cart.

X-Client-IP?string

Optional. IP address of the shopper (one IPv4/IPv6, no port, no list). Honoured only together with a valid X-Tenant-Secret; ignored otherwise. Used for rate limits and recorded with form submissions.

X-Tenant-Secret?string

Optional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.

X-Session-Id?string

Optional. The shopper's sid cookie value (8-128 of letters, digits, . _ : -). Recorded on the basket as a SHA-256 hash only (never the raw value), so the order can be checked against the consent in force when it is placed, even when Stripe or PayPal settle it later without a request. Send it on every basket write; an absent header keeps the stored hash, and a malformed one is ignored.

X-Visitor-Id?string

Optional. The vid cookie value, when the shopper has one. Recorded on the basket as a SHA-256 hash only (never the raw value), so the order can be checked against the consent in force when it is placed, even when Stripe or PayPal settle it later without a request. Send it on every basket write; an absent header keeps the stored hash, and a malformed one is ignored.

X-GA-Client-Id?string

Optional. The GA4 client id from the _ga cookie that the Google tag of the merchant set: its last two numbers (GA1.1.1234567890.1699999999 → 1234567890.1699999999, ^\d{1,10}\.\d{1,10}$). Send it only when the shopper has granted analytics AND advertising. Kept with the basket and the order only while both are in force (removed when either is withdrawn, on erasure, and after its window), and sent to Google Analytics as the client_id of the purchase, so GA4 joins it to the visit. An absent header keeps the stored id; a malformed one is ignored (never a 422).

Response Body

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.elaraone.app/api/v1/checkout/payment-intent' \  -H 'X-Tenant-Key: pk_live_…' \  -H 'X-Tenant-Secret: your-server-secret' \  -H 'X-Cart-Token: 01JB9K3N7Q2W5X8Z4C6V1T0R3M'
Example Response
{  "data": {    "client_secret": "string",    "publishable_key": "string"  }}