Hosted Checkout
Hosted Checkout is a new integration product that offers a complete checkout flow for payment collection. It aims at being easy to integrate and requires little to no code. The solution offers a summary of the checkout details and provides a complete flow for handling payment collection, covering the possible outcomes of payment attempts all the way to the success page. All SumUp supported payment methods are available in Hosted Checkout, according to availability per merchant.
Getting started
Hosted Checkouts is available to all SumUp merchants and getting started with it is super easy!
The only requirement to access this product is the ability to create online checkouts (see more).
How does it work?
Once you're able to create checkouts, you can opt-in for Hosted Checkout by providing an extra parameter to your POST request payload. The parameter name should be hosted_checkout_settings
and the value should be an object with the following structure: { "enabled": true }
.
The response should then include the following properties, proving that hosted checkouts is available:
hosted_checkout_settings
will be returned as provided in the requesthosted_checkout_url
will provide the URL of the page handling the payment flow
Here's an example of creating a checkout with Hosted Checkouts enabled:
curl -X POST https://api.sumup.com/v0.1/checkouts \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <AUTH_TOKEN>' \
-d '{
"amount": 12.00,
"checkout_reference": "b50pr914-6k0e-3091-a592-890010285b3d",
"currency": "EUR",
"description": "A sample checkout",
"merchant_code": "MCMMMMMM",
"hosted_checkout_settings": { "enabled": true }
}'
The response body containing the hosted_checkout_settings
and hosted_checkout_url
parameters:
{
"amount": 12,
"checkout_reference": "b50pr914-6k0e-3091-a592-890010285b3d",
"checkout_type": "checkout",
"currency": "EUR",
"date":"2000-01-01T12:49:24.899+00:00",
"description": "A sample checkout",
"id": "64553e20-3f0e-49e4-8af3-fd0eca86ce91",
"merchant_code": "MCXXXXXX",
"merchant_country": "DE",
"merchant_name": "Sample Shop",
"pay_to_email": "[email protected]",
"purpose": "CHECKOUT",
"status": "PENDING",
"transactions": [],
"hosted_checkout_settings": { "enabled": true },
"hosted_checkout_url": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676"
}
Configuring Hosted Checkouts
Redirecting to a different page after successful payment
This product is meant to suit a broad range of use cases, from a simple self-contained payment solution, to a checkout step integrated within a longer flow. When creating a checkout, it's possible to provide a redirect_url
parameter to include a redirect link in the success page.
Hosted Checkout status pages
With Hosted Checkout your payment flow is covered from start to finish. All successful payments will be presented with a success page informing them of the completed payment. Hosted Checkout also accommodates other payment outcomes:
- Successful payments. This page will include the "Back to merchant website" button only if the
redirect_url
was provided at checkout creation.
- Failed payments will include express checkout payment methods for a quick retry.
- Expired session page will be shown for all unpaid checkouts after session expiration or checkout expiration (currently 30 minutes).
- Not found page, for all URLs that do not match any existing session in our system