Checkouts

Process a checkout

Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the Create a checkout endpoint.

Follow this request with Retrieve a checkout to confirm its status.

put/v0.1/checkouts/{id}

Request body

payment_type'card' | 'boleto' | 'ideal' | 'blik' | 'bancontact' required

Describes the payment method used to attempt processing

installmentsinteger

Number of installments for deferred payments. Available only to merchant users in Brazil.

tokenstring

Required when using a tokenized card to process a checkout. Unique token identifying the saved payment card for a customer.

customer_idstring

Required when token is provided. Unique ID of the customer.

Example request

{
  "mandate": {
    "type": "recurrent",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36",
    "user_ip": "172.217.169.174"
  },
  "card": {
    "name": "FIRSTNAME LASTNAME",
    "number": "1234567890123456",
    "expiry_year": "2023",
    "cvv": "123",
    "zip_code": "12345",
    "last_4_digits": "3456"
  },
  "personal_details": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "user@example.com",
    "phone": "+491635559723",
    "birth_date": "1993-12-31",
    "tax_id": "423.378.593-47",
    "address": {
      "city": "Berlin",
      "country": "DE",
      "line_1": "Sample street",
      "line_2": "ap. 5",
      "postal_code": "10115",
      "state": "Berlin"
    }
  }
}

Response

OK

checkout_referencestring

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

amountnumber float

Amount of the payment.

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.

merchant_codestring

Unique identifying code of the merchant profile.

descriptionstring

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

return_urlstring uri

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

idstring

Unique ID of the checkout resource.

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

Current status of the checkout.

datestring date-time

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

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.

customer_idstring

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

transaction_codestring

Transaction code of the successful transaction with which the payment for the checkout is completed.

transaction_idstring

Transaction ID of the successful transaction with which the payment for the checkout is completed.

merchant_namestring

Name of the merchant

redirect_urlstring

Refers to a url where the end user is redirected once the payment processing completes.

Example response

{
  "amount": 10.1,
  "currency": "EUR",
  "merchant_code": "MH4H92C7",
  "id": "4e425463-3e1b-431d-83fa-1e51c2925e99",
  "date": "2020-02-29T10:56:56+00:00",
  "valid_until": "2020-02-29T10:56:56+00:00",
  "customer_id": "831ff8d4cd5958ab5670",
  "mandate": {
    "type": "recurrent",
    "status": "active",
    "merchant_code": "MH4H92C7"
  },
  "transactions": [
    {
      "id": "6b425463-3e1b-431d-83fa-1e51c2925e99",
      "transaction_code": "TEENSK4W2K",
      "amount": 10.1,
      "currency": "EUR",
      "timestamp": "2020-02-29T10:56:56.876Z",
      "merchant_code": "MH4H92C7",
      "vat_amount": 6,
      "tip_amount": 3,
      "auth_code": "053201",
      "internal_id": 1763892018
    }
  ],
  "transaction_code": "TEENSK4W2K",
  "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4",
  "merchant_name": "Sample Merchant",
  "redirect_url": "https://mysite.com/completed_purchase",
  "payment_instrument": {
    "token": "e76d7e5c-9375-4fac-a7e7-b19dc5302fbc"
  }
}

Changes