Create a checkout
Changed onCreates a payment checkout for the specified merchant, amount, and currency. Supply a checkout_reference to identify the payment attempt in your own systems. Creating a checkout does not charge a payment instrument.
Set hosted_checkout.enabled to true to receive a Hosted Checkout URL where the customer can complete the payment. Use redirect_url for redirect-based payment and 3DS flows. If return_url is provided, SumUp sends processing updates to that backend callback URL.
Complete the payment through Hosted Checkout or the Payment Widget.
Request
- Base URLhttps://api.sumup.com
- URLhttps://api.sumup.com/v0.1/checkouts
- Auth
- HTTP bearer
- or OAuth 2Authorization code: https://api.sumup.com/authorizeToken URL: https://api.sumup.com/token scopes: payments, checkouts.write
Request body
Example request
{
"checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802",
"amount": 10.1,
"currency": "EUR",
"merchant_code": "MH4H92C7",
"description": "Purchase",
"return_url": "http://example.com/",
"customer_id": "831ff8d4cd5958ab5670",
"valid_until": "2030-12-31T23:59:59Z",
"redirect_url": "https://mysite.com/completed_purchase",
"hosted_checkout": {
"enabled": true
}
}Response
Returns the created checkout resource.
Example response
{
"checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802",
"amount": 10.1,
"currency": "EUR",
"merchant_code": "MH4H92C7",
"description": "Purchase",
"return_url": "http://example.com",
"id": "4e425463-3e1b-431d-83fa-1e51c2925e99",
"status": "PENDING",
"date": "2020-02-29T10:56:56+00:00",
"valid_until": "2030-12-31T23:59:59Z",
"customer_id": "831ff8d4cd5958ab5670",
"mandate": {
"type": "recurrent",
"status": "active",
"merchant_code": "MH4H92C7"
},
"hosted_checkout_url": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676",
"transactions": [
{
"id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4",
"transaction_code": "TEENSK4W2K",
"amount": 10.1,
"currency": "EUR",
"timestamp": "2020-02-29T10:56:56.876Z",
"status": "SUCCESSFUL",
"payment_type": "ECOM",
"installments_count": 1,
"merchant_code": "MH4H92C7",
"vat_amount": 6,
"tip_amount": 3,
"entry_mode": "CUSTOMER_ENTRY",
"auth_code": "012345"
}
]
}Changes
- breaking
removed the enum value
BGNof the request property - info
removed the
BGNenum value from theresponse property for the response status - info
removed the
BGNenum value from the///response property for the response status
- breaking
- breaking
the
request property's maxLength was decreased to64
- breaking