Checkouts

Create a checkout

Creates a new payment checkout resource. The unique checkout_reference created by this request, is used for further manipulation of the checkout.

For 3DS checkouts, add the redirect_url parameter to your request body schema.

Follow by processing a checkout to charge the provided payment instrument.

post/v0.1/checkouts

Request body

amountnumber float required

Amount of the payment.

checkout_referencestring required

Unique ID of the payment checkout specified by the client application when creating the checkout resource.

currency'BGN' | 'BRL' | 'CHF' | 'CLP' | 'CZK' | 'DKK' | 'EUR' | 'GBP' | 'HRK' | 'HUF' | 'NOK' | 'PLN' | 'RON' | 'SEK' | 'USD' required

Three-letter ISO4217 code of the currency for the amount. Currently supported currency values are enumerated above.

customer_idstring

Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referenced customer.

datestring date-time

Date and time of the creation of the payment checkout. Response format expressed according to ISO8601 code.

descriptionstring

Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.

idstring

Unique ID of the checkout resource.

merchant_codestring required

Unique identifying code of the merchant profile.

pay_to_emailstring email

Email address of the registered user (merchant) to whom the payment is made. It is highly recommended to use merchant_code instead of pay_to_email.

payment_typestring

Alternative payment method name

purpose'CHECKOUT' | 'SETUP_RECURRING_PAYMENT'

Purpose of the checkout.

redirect_urlstring

Required for APMs and recommended for card payments. Refers to a url where the end user is redirected once the payment processing completes. If not specified, the Payment Widget renders 3DS challenge within an iframe instead of performing a full-page redirect.

return_urlstring uri

URL to which the SumUp platform sends the processing status of the payment checkout.

status'PENDING' | 'FAILED' | 'PAID'

Current status of the checkout.

valid_untilstring date-time nullable

Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.

Example request

{
  "currency": "EUR",
  "date": "2020-02-29T10:56:56+00:00",
  "payment_type": "boleto",
  "personal_details": {
    "address": {
      "city": "Rio de Janeiro",
      "country": "BR",
      "postal_code": "20000-000",
      "state": "RJ"
    },
    "email": "test@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "tax_id": "423.378.593-47"
  },
  "redirect_url": "https://mysite.com/completed_purchase",
  "transactions": [
    {
      "amount": 10.1,
      "currency": "EUR",
      "id": "6b425463-3e1b-431d-83fa-1e51c2925e99",
      "timestamp": "2020-02-29T10:56:56.876Z",
      "transaction_code": "TEENSK4W2K",
      "auth_code": "053201",
      "internal_id": 1763892018,
      "merchant_code": "MH4H92C7",
      "tip_amount": 3,
      "vat_amount": 6
    }
  ],
  "valid_until": "2020-02-29T10:56:56+00:00"
}

Response

Created

amountnumber float

Amount of the payment.

checkout_referencestring

Unique ID of the payment checkout specified by the client application when creating the checkout resource.

currency'BGN' | 'BRL' | 'CHF' | 'CLP' | 'CZK' | 'DKK' | 'EUR' | 'GBP' | 'HRK' | 'HUF' | 'NOK' | 'PLN' | 'RON' | 'SEK' | 'USD'

Three-letter ISO4217 code of the currency for the amount. Currently supported currency values are enumerated above.

customer_idstring

Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referenced customer.

datestring date-time

Date and time of the creation of the payment checkout. Response format expressed according to ISO8601 code.

descriptionstring

Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.

idstring

Unique ID of the checkout resource.

merchant_codestring

Unique identifying code of the merchant profile.

pay_to_emailstring email

Email address of the registered user (merchant) to whom the payment is made.

return_urlstring uri

URL to which the SumUp platform sends the processing status of the payment checkout.

status'PENDING' | 'FAILED' | 'PAID'

Current status of the checkout.

valid_untilstring date-time nullable

Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration time.

Example response

{
  "amount": 10.1,
  "currency": "EUR",
  "customer_id": "831ff8d4cd5958ab5670",
  "date": "2020-02-29T10:56:56+00:00",
  "id": "4e425463-3e1b-431d-83fa-1e51c2925e99",
  "mandate": {
    "merchant_code": "MDASYTPD",
    "status": "active",
    "type": "recurrent"
  },
  "transactions": [
    {
      "amount": 10.1,
      "currency": "EUR",
      "id": "6b425463-3e1b-431d-83fa-1e51c2925e99",
      "timestamp": "2020-02-29T10:56:56.876Z",
      "transaction_code": "TEENSK4W2K",
      "auth_code": "053201",
      "internal_id": 1763892018,
      "merchant_code": "MH4H92C7",
      "tip_amount": 3,
      "vat_amount": 6
    }
  ],
  "valid_until": "2020-02-29T10:56:56+00:00"
}

Changes