Create payment intent
Create a payment intent for collection with the Slash Checkout SDK. When returned, the client secret authorizes the browser to load and confirm only this payment intent and must not be logged or stored in browser persistence.
Authorizations
API key authentication for public API requests.
Keys come in two flavors:
- Legal-entity-scoped keys are pinned to a single legal entity. Minted via the dashboard under a specific entity; every request acts on that entity.
- User-scoped keys are pinned to a user and span every legal
entity that user has access to. Every request made with a
user-scoped key (except
GET /legal-entity, which lists the legal entities the user can access) must include anx-legal-entityheader naming the legal entity the request is operating on. Requests without the header are rejected with400. The authenticated user must have an active permission role on the supplied legal entity, otherwise the request is rejected with403.
Headers
An optional unique key for this payment intent. Retrying the same request with the same key returns the previously created payment intent.
Body
Payment amount in the smallest unit of currency.
x >= 1ISO currency code for the payment. Supported currencies are usd and eur.
usd, eur Merchant-defined metadata stored on the payment intent and returned in payment intent responses.
Payment methods the buyer may use. Omit to allow all supported methods.
1Payment method available for an acquiring PaymentIntent checkout.
card, apple_pay, google_pay Response
OK
The payment intent object. Its status tracks the payment from creation through settlement.
Unique identifier for the payment intent.
Status of the payment intent. pending intents have not been paid yet; processing intents have a payment in flight awaiting settlement; succeeded intents have a confirmed settled payment; canceled intents were canceled and can no longer be paid.
pending, processing, succeeded, canceled Payment amount in the smallest unit of currency.
ISO currency code for the payment. Supported currencies are usd and eur.
usd, eur ISO-8601 timestamp the payment intent was created at.
ISO-8601 timestamp the payment intent last changed status.
Merchant-defined metadata stored on the payment intent and echoed in payment intent responses and the payment-intent success webhook.
Sensitive PaymentIntent-scoped browser capability. Do not log or store it in browser persistence.
Payment methods the merchant allows, exactly as set on create or update. Omitted when all supported methods are allowed.
Payment method available for an acquiring PaymentIntent checkout.
card, apple_pay, google_pay