Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,11 @@ You should expect a standard `201 Created` response, with the customer details y
Now, we need to tokenize the customer's card, and we will need a checkout for this. The checkout resource is a representation of a payment being made by the previously created customer.
It contains information such as the amount, currency, and a unique `checkout_reference` identifier that is relevant to your business logic.

For card tokenization, create a checkout with `amount: 0`. This creates a verification-only authorisation without capturing any funds.

The flow is initiated with the [`create a checkout`](/api/checkouts/create) endpoint. It is important to pass the `customer_id` parameter in this step, for future linking to a payment instrument. Critically, a `purpose` parameter is passed to indicate the payment type as **recurring payment**. Note that this doesn't automatically imply further payments from this customer - at this point, we're just tokenizing the card.
The flow is initiated with the `create a checkout` endpoint. It is important to pass the `customer_id` parameter in this step, for future linking to a payment instrument. Critically, a `purpose` parameter is passed to indicate the payment type as **recurring payment** and process an authorization charge of the checkout amount indicated, **which is instantly reimbursed**. Note that this doesn't automatically imply further payments from this customer - at this point, we're just tokenizing the card.

1. To create a new checkout resource, make a POST request to the `https://api.sumup.com/v0.1/checkouts` endpoint.

Example request using a `0` amount authorisation:
Example of such request:

<Tabs syncKey="backend_lang">
<TabItem label="cURL" icon="seti:powershell">
Expand All @@ -260,10 +258,10 @@ Example request using a `0` amount authorisation:
-H 'Content-Type: application/json' \
-d '{
"checkout_reference": "MYCHECKOUT",
"amount": 0,
"amount": 1,
"currency": "EUR",
"merchant_code": "MDEERENR",
"description": "0 amount verification",
"description": "My checkout",
"customer_id": "MYCUSTOMERID-123",
"purpose": "SETUP_RECURRING_PAYMENT"
}'
Expand All @@ -273,10 +271,10 @@ Example request using a `0` amount authorisation:
```ts
const checkout = await client.checkouts.create({
checkout_reference: "MYCHECKOUT",
amount: 0,
amount: 1,
currency: "EUR",
merchant_code: "MDEERENR",
description: "0 amount verification",
description: "My checkout",
customer_id: "MYCUSTOMERID-123",
purpose: "SETUP_RECURRING_PAYMENT",
});
Expand All @@ -287,10 +285,10 @@ Example request using a `0` amount authorisation:
var checkout = await client.Checkouts.CreateAsync(new CheckoutCreateRequest
{
CheckoutReference = "MYCHECKOUT",
Amount = 0.0f,
Amount = 1.0f,
Currency = Currency.Eur,
MerchantCode = "MDEERENR",
Description = "0 amount verification",
Description = "My checkout",
CustomerId = "MYCUSTOMERID-123",
Purpose = "SETUP_RECURRING_PAYMENT",
});
Expand All @@ -301,10 +299,10 @@ Example request using a `0` amount authorisation:
var checkout = client.checkouts().createCheckout(
CheckoutCreateRequest.builder()
.checkoutReference("MYCHECKOUT")
.amount(0.0f)
.amount(1.0f)
.currency(Currency.EUR)
.merchantCode("MDEERENR")
.description("0 amount verification")
.description("My checkout")
.customerId("MYCUSTOMERID-123")
.purpose(CheckoutCreateRequestPurpose.SETUP_RECURRING_PAYMENT)
.build()
Expand All @@ -315,11 +313,11 @@ Example request using a `0` amount authorisation:
```go
customerID := "MYCUSTOMERID-123"
purpose := sumup.CheckoutCreateRequestPurposeSetupRecurringPayment
description := "0 amount verification"
description := "My checkout"

checkout, err := client.Checkouts.Create(ctx, sumup.CheckoutsCreateParams{
CheckoutReference: "MYCHECKOUT",
Amount: 0,
Amount: 1,
Currency: sumup.CurrencyEUR,
MerchantCode: "MDEERENR",
Description: &description,
Expand All @@ -335,10 +333,10 @@ Example request using a `0` amount authorisation:
checkout = client.checkouts.create(
CreateCheckoutBody(
checkout_reference="MYCHECKOUT",
amount=0,
amount=1,
currency="EUR",
merchant_code="MDEERENR",
description="0 amount verification",
description="My checkout",
customer_id="MYCUSTOMERID-123",
purpose="SETUP_RECURRING_PAYMENT",
)
Expand All @@ -351,10 +349,10 @@ Example request using a `0` amount authorisation:
.checkouts()
.create(Some(sumup::resources::checkouts::CheckoutCreateRequest {
checkout_reference: "MYCHECKOUT".into(),
amount: 0.0,
amount: 1.0,
currency: sumup::resources::checkouts::Currency::EUR,
merchant_code: "MDEERENR".into(),
description: Some("0 amount verification".into()),
description: Some("My checkout".into()),
customer_id: Some("MYCUSTOMERID-123".into()),
purpose: Some("SETUP_RECURRING_PAYMENT".into()),
id: None,
Expand All @@ -372,10 +370,10 @@ Example request using a `0` amount authorisation:
```php
$checkout = $sumup->checkouts->create([
'checkout_reference' => 'MYCHECKOUT',
'amount' => 0,
'amount' => 1,
'currency' => 'EUR',
'merchant_code' => 'MDEERENR',
'description' => '0 amount verification',
'description' => 'My checkout',
'customer_id' => 'MYCUSTOMERID-123',
'purpose' => 'SETUP_RECURRING_PAYMENT',
]);
Expand All @@ -387,13 +385,13 @@ You should expect a standard `201 Created` response, with the checkout reference

```json
{
"amount": 0,
"amount": 1,
"checkout_reference": "MYCHECKOUT",
"checkout_type": "checkout",
"currency": "EUR",
"customer_id": "MYCUSTOMERID-123",
"date": "2025-10-29T15:09:11.550+00:00",
"description": "0 amount verification",
"description": "My checkout",
"id": "7164c99b-13cb-42a1-8ba1-3c2c46a29de7",
"merchant_code": "MDEERENR",
"merchant_country": "PL",
Expand All @@ -405,7 +403,7 @@ You should expect a standard `201 Created` response, with the checkout reference
}
```

If you are maintaining an older integration, nominal amounts such as `1` are still supported for card verification. Those authorisations are refunded and the cardholder will not be charged.
For more information, see the [create a checkout](/api/checkouts/create) endpoint.

## Processing Request with Payment Widget

Expand Down