Skip to main content

Checkouts

Overview​

The hosted checkout is a customizable, pre-built payment page hosted on Getpaid's servers. You can tailor its appearance to match your brand and choose which payment methods to offer buyers. The hosted checkout manages the entire payment process, including authentication and verification, to provide a seamless and secure experience for your customers.

Buyers can choose the hosted checkout language using its language selector. See supported languages for language selection and browser preferences.

Lifecycle​

StatusDescription
initiatedThe checkout has been created but it was not rendered yet.
startedThe checkout was rendered and the customer has started the payment process.
in_progressA payment is awaiting buyer action or has been submitted for authorizing asynchronously.
completedThe checkout has been successfully completed.
cancelledThe platform cancelled the checkout before a payment attempt.
failedThe checkout has expired and all payment attempts were unsuccessful.
unattemptedThe checkout has expired without any payment attempts.

Steps​

1. Create a checkout​

Your first step is to create a checkout via API by calling POST api.getpaid.io/v2/checkouts endpoint, by setting the payment information and how funds are split between the parties involved.

POST api.getpaid.io/v2/checkouts
{
"reference": "ORD-202510-0232",
"amount": 1000,
"currency": "EUR",
"description": "Order #202510-0232",
"splits": {
"type": "per_transaction",
"accounts": [
{
"type": "seller",
"id": "acc_4f5zanqzxfg9w9jj5e81bm6bc9",
"split": {
"type": "fixed",
"amount": 900
}
},
{
"type": "platform",
"id": "acc_4q90qx2kdczs59yqfq34p09qx6",
"split": {
"type": "fixed",
"amount": 100
},
"processing_fee": {
"percentage": 100
}
}
]
},
"redirect": {
"default": "https://titanauto.com/checkout/complete?order=202510-0232"
},
"webhooks": {
"url": "https://webhooks.titanauto.com/getpaid"
}
}

2. Handle the checkout response​

A successful checkout creation returns a checkout id and a flow.next_step.url to present the checkout to the buyer.

201 Created - POST api.getpaid.io/v2/checkouts
{
"id": "cko_44678r08jtm8zbt227tzhc4nw5",
"status": "initiated",
"reference": "ORD-202510-0232",
"created_at": "2025-10-24T13:45:22.993Z",
"updated_at": "2025-10-24T13:45:22.993Z",
"expires_at": "2025-10-24T14:15:22.993Z",
"flow": {
"next_step": {
"type": "redirect",
"url": "https://checkout.getpaid.io/v2/cko_44678r08jtm8zbt227tzhc4nw5?token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
},
"payment_methods": {
"available": [
{
"type": "card",
"scheme": "mastercard"
},
{
"type": "card",
"scheme": "visa"
},
{
"type": "sepa_direct_debit"
}
]
}
}

3. Redirect to hosted checkout​

You can either redirect the buyer to the hosted checkout URL immediately or send them the link to pay later, as long as the checkout has not expired.

4. Checkout rendered​

Once the buyer is redirected or clicks the payment link, the checkout page is displayed in their browser, showing the available payment methods to complete the payment.

Getpaid hosted checkout

Getpaid hosted checkout

5. Enter payment details​

The buyer can select their preferred payment method and will be guided through the required steps to complete the payment and checkout.

If a payment method is declined, the buyer can retry with another method, maximizing the conversion rate.

6. Payment notifications​

Your platform server receives payment notifications at webhooks.url, set during checkout creation, for each payment attempt. They are sent independently of the checkout notifications and can arrive in either order. Use data.origin.id, the checkout id, and data.reference to match each notification to your records, and data.id to track the payment attempt:

  • Payment captured: the payment funds have been captured and secured.
  • Payment failed: a payment attempt has failed, been declined, or failed authentication. The buyer can try again while the checkout is not expired.

Payment captured notification​

The payment_captured webhook is sent only after the payment funds are captured, along with the checkout_completed webhook.

payment_captured webhook
{
"id": "evt_4jbfjc3dfybnw9f15en0rve848",
"type": "payment_captured",
"version": "v2",
"occurred_at": "2025-10-24T13:53:00.312Z",
"data": {
"id": "pay_4kf9v6xp00hzc99rdwr5m97wce",
"origin": {
"type": "checkout",
"id": "cko_44678r08jtm8zbt227tzhc4nw5"
},
"reference": "ORD-202510-0232"
}
}

Payment failed notification​

The payment_failed webhook is sent when a payment attempt fails, is declined, or fails authentication. Use data.status to see the payment's outcome.

A failed payment leaves the checkout available for another attempt while it is active and has not entered in_progress. If a payment definitively fails after the checkout enters in_progress, the checkout subsequently fails, even before expiration.

payment_failed webhook
{
"id": "evt_4jbfjc3dfybnw9f15en0rve849",
"type": "payment_failed",
"version": "v2",
"occurred_at": "2025-10-24T13:50:34.120Z",
"data": {
"id": "pay_4kf9v6xp00hzc99rdwr5m97wcf",
"origin": {
"type": "checkout",
"id": "cko_44678r08jtm8zbt227tzhc4nw5"
},
"reference": "ORD-202510-0232",
"status": "failed"
}
}

7. Checkout in progress notification​

Your platform server receives a checkout_in_progress webhook as soon as a payment is accepted for asynchronous authorization or the buyer has no remaining action within hosted checkout. If the buyer still needs to act within hosted checkout, such as completing authentication, Getpaid sends this webhook at checkout expiration if the payment is still unresolved. Once this webhook is raised, the checkout does not accept another payment attempt.

Use data.payment.estimated_update_before, when present, as the estimated UTC time before which the payment status is expected to be updated. The final result can arrive days after checkout creation, depending on the payment method.

The checkout in progress webhook confirms neither payment success nor completion of all buyer actions. Track the associated payment for its remaining actions and outcome. When updated, your platform server receives:

checkout_in_progress webhook
{
"id": "evt_4jbfjc3dfybnw9f15en0rve847",
"type": "checkout_in_progress",
"version": "v2",
"occurred_at": "2025-10-24T14:00:00.993Z",
"data": {
"id": "cko_44678r08jtm8zbt227tzhc4nw5",
[...]
"reference": "ORD-202510-0232",
"payment": {
"id": "pay_4kf9v6xp00hzc99rdwr5m97wce",
"estimated_update_before": "2025-10-27T14:15:22.993Z",
[...]
}
}
}

8. Redirect to platform website​

Once the payment is successful, the buyer is redirected to your website, as specified in the redirect block during checkout creation, allowing your client-side to update or fetch the payment and checkout status from your system.

Checkout completed

Checkout completed

9. Checkout completed notification​

Your platform server receives a checkout_completed webhook at webhooks.url, set during checkout creation, when a payment is successfully authorized or captured. Use data.id and data.reference to match the notification to your records.

You can then update your records with the successful payment identified by data.payment.id. You also receive a payment captured notification for that payment.

checkout_completed webhook
{
"id": "evt_4jbfjc3dfybnw9f15en0rve844",
"type": "checkout_completed",
"version": "v2",
"occurred_at": "2025-10-24T13:52:57.312Z",
"data": {
"id": "cko_44678r08jtm8zbt227tzhc4nw5",
[...]
"reference": "ORD-202510-0232",
"payment": {
"id": "pay_4kf9v6xp00hzc99rdwr5m97wce"
}
}
}

10. Checkout expiration notifications​

Your platform server receives checkout expiration notifications at webhooks.url, set during checkout creation. Use data.id and data.reference to match each notification to your records. The checkout's final-state notification depends on whether a payment was attempted and whether it has finished processing:

Checkout unattempted notification​

Your platform server receives a checkout_unattempted webhook when the checkout reaches expires_at without any payment attempts.

checkout_unattempted webhook
{
"id": "evt_4jbfjc3dfybnw9f15en0rve845",
"type": "checkout_unattempted",
"version": "v2",
"occurred_at": "2025-10-24T14:15:22.993Z",
"data": {
"id": "cko_44678r08jtm8zbt227tzhc4nw5",
[...]
"reference": "ORD-202510-0232"
}
}

Checkout failed notification​

Your platform server receives a checkout_failed webhook when all payment attempts have failed or been declined and no further payment attempts are allowed. This can happen at checkout expiration or earlier when an asynchronous payment fails after the buyer has left hosted checkout. Each failed attempt is reported separately by a payment failed notification.

checkout_failed webhook
{
"id": "evt_4jbfjc3dfybnw9f15en0rve846",
"type": "checkout_failed",
"version": "v2",
"occurred_at": "2025-10-24T14:15:22.993Z",
"data": {
"id": "cko_44678r08jtm8zbt227tzhc4nw5",
[...]
"reference": "ORD-202510-0232",
"payment": {
"id": "pay_4kf9v6xp00hzc99rdwr5m97wcf",
[...]
}
}
}