Start a checkout payment
Overview
Selects a payment option and returns the next payment step. Send option from the checkout's options. The amount charged is read from the invoice again, and a payment whose amount changed since the checkout opened is refused. notes and promo_code are optional.
This request does not take payment. The response includes either a redirect_url for the browser or details for opening an embedded payment widget. Rate limits apply per account, not per IP address.
Permissions
Requires the billing.purchase (Make purchases) permission for the selected team. Resources outside that team return 404.
Authorization
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Send it as Bearer <token>.
Path parameters
The uuid ID.
Body
application/jsonThe value of option.
One of: stripe_once, stripe_subscription, stripe_checkout, paypal_once, paypal_subscription, btcpay_once, nowpayments_once
Optional notes about the request.
At most 2000 characters
The value of promo_code.
At most 64 characters
Must match ^[A-Za-z0-9_-]+$
The value of paypal_account.
The value of payment_card.
The value of new_card.
Response 200
application/jsonThe record, as a JSON object. There is no envelope.
Whether the panel is taking payments at all.
The uuid UUID.
The value of uuid_short.
The value of status.
One of: draft, awaiting_gateway, charging, recording, paid, expired, cancelled
The status in the customer's words, written once on the enum.
The value of progress_message.
The value of last_error_code.
What is being bought, or the invoice number when no name is available.
The value of line_items.
Show child attributesHide child attributes
A short label shown to customers.
The amount in the currency shown by currency.
The decimal string the row holds. Money is never a float here: this is the figure the customer is about to be charged.
The three-letter currency code used for monetary amounts.
The amount and its currency, rendered ready to print.
The value of option.
One of: stripe_once, stripe_subscription, stripe_checkout, paypal_once, paypal_subscription, btcpay_once, nowpayments_once, null
The value of options.
Show child attributesHide child attributes
The enum's own value, which is what a start request sends back.
A short label shown to customers.
What the picker prints once a choice has been made, where the full label is too long to sit on a button.
An optional description shown to customers.
The value of provider.
The value of provider_name.
Whether choosing this hands the provider a standing schedule rather than taking one payment. Only ever offered where this invoice's amount is what falls due each cycle.
Whether the payment provider was the seller of record, shown as small print. Only older checkouts were.
Optional notes about the request.
The value of promo_code.
Where to send the customer, if anywhere.
Set while the attempt charges a saved card, which the page confirms.
Show child attributesHide child attributes
Stripe's publishable key, which is public by design.
Only confirms this one charge, on the account's own card.
The value of return_path.
When this action or checkout expires, in UTC.
The date and time for settled at, in UTC.
The date and time for created at, in UTC.
Whether the checkout can still accept another payment attempt.
Whether the customer can choose.
Whether the resource is settling.
The saved PayPal account this attempt charges, by its uuid.
The saved card this attempt charges, by its uuid.
Errors
- 401
- The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- 403
- Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- 404
- The resource was not found in the selected team. Resources in another account or team also return 404.
- 422
- A field is missing or invalid, or the resource cannot accept this change in its current state. Check
messagefor details. Field validation also includes anerrorsobject keyed by field name. - 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown