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.
- application/json
Request Body
- checkout_reference string required
Possible values:
<= 90 characters
Unique ID of the payment checkout specified by the client application when creating the checkout resource.
- amount float required
Amount of the payment.
- currency string required
Possible values: [
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_code string required
Unique identifying code of the merchant profile.
- pay_to_email email
Email address of the registered user (merchant) to whom the payment is made. It is highly recommended to use
merchant_code
instead ofpay_to_email
. - description string
Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.
- return_url uri
URL to which the SumUp platform sends the processing status of the payment checkout.
- customer_id string
Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referrenced customer.
- redirect_url string
Required for 3DS checkouts. Refers to a url where the end user is redirected once the payment processing completes.
- payment_type string
Alternative payment method name
personal_details object
Object containing personal details about the payer, typical for Boleto checkouts
email stringPayer's email address
first_name stringPayer's first name
last_name stringPayer's last name
tax_id stringPayer's tax identification number (CPF)
address object
Payer's address information
country stringPayer's country
city stringPayer's city
line_1 stringField for address details
state stringPossible values: [
AC
,AL
,AP
,AM
,BA
,CE
,DF
,ES
,GO
,MA
,MT
,MS
,MG
,PA
,PB
,PR
,PE
,PI
,RJ
,RN
,RS
,RO
,RR
,SC
,SP
,SE
,TO
]Payer's state code
postal_code integerPossible values: Value must match regular expression
^\d{5}-?\d{3}$
Payer's postal code. Must be eight digits long, however an optional dash could be applied after the 5th digit (more information about the format available here). Both options are accepted as correct.
- 201
- 400
- 401
- 403
- 409
Created
- application/json
- Schema
- Example (from schema)
- Checkout
- Checkout3 D S
- Checkout A P M
Schema
- checkout_reference string
Possible values:
<= 90 characters
Unique ID of the payment checkout specified by the client application when creating the checkout resource.
- amount float
Amount of the payment.
- currency string
Possible values: [
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.
- pay_to_email email
Email address of the registered user (merchant) to whom the payment is made.
- merchant_code string
Unique identifying code of the merchant profile.
- description string
Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.
- return_url uri
URL to which the SumUp platform sends the processing status of the payment checkout.
- id string
Unique ID of the checkout resource.
- status string
Possible values: [
PENDING
,FAILED
,PAID
]Current status of the checkout.
- date date-time
Date and time of the creation of the payment checkout. Response format expressed according to ISO8601 code.
- valid_until date-time
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_id string
Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referrenced customer.
mandate object
Created mandate
type stringIndicates the mandate type
status stringMandate status
merchant_code stringMerchant code which has the mandate
- transactions object[]
List of transactions related to the payment.
{
"checkout_reference": "string",
"amount": 0,
"currency": "BGN",
"pay_to_email": "[email protected]",
"merchant_code": "string",
"description": "string",
"return_url": "string",
"id": "string",
"status": "PENDING",
"date": "2023-06-02",
"valid_until": "2023-06-02",
"customer_id": "string",
"mandate": {
"type": "string",
"status": "string",
"merchant_code": "string"
},
"transactions": [
{
"id": "string",
"transaction_code": "string",
"amount": 0,
"currency": "BGN",
"timestamp": "2023-06-02",
"status": "SUCCESSFUL",
"payment_type": "ECOM",
"installments_count": 0,
"merchant_code": "string",
"vat_amount": 0,
"tip_amount": 0,
"entry_mode": "CUSTOMER_ENTRY",
"auth_code": "string",
"internal_id": 0
}
]
}
{
"checkout_reference": "8ea25ec3-3293-40e9-a165-6d7f3b3073c5",
"amount": 10.1,
"currency": "EUR",
"pay_to_email": "[email protected]",
"merchant_code": "MCNPLE22",
"description": "My Checkout",
"return_url": "http://example.com",
"id": "88fcf8de-304d-4820-8f1c-ec880290eb92",
"status": "PENDING",
"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": "MDASYTPD"
},
"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",
"internal_id": 0
}
]
}
{
"checkout_reference": "8ea25ec3-3293-40e9-a165-6d7f3b3073c5",
"amount": 10.1,
"currency": "EUR",
"pay_to_email": "[email protected]",
"description": "My Checkout",
"return_url": "http://example.com",
"id": "88fcf8de-304d-4820-8f1c-ec880290eb92",
"status": "PENDING",
"date": "2020-02-29T10:56:56+00:00",
"valid_until": "2020-02-29T10:56:56+00:00",
"customer_id": "831ff8d4cd5958ab5670",
"redirect_url": "https://mysite.com/completed_purchase",
"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",
"internal_id": 0
}
]
}
{
"checkout_reference": "8ea25ec3-3293-40e9-a165-6d7f3b3073c5",
"amount": 10.1,
"currency": "EUR",
"pay_to_email": "[email protected]",
"merchant_code": "MCNPLE22",
"description": "My Checkout",
"return_url": "http://example.com",
"id": "88fcf8de-304d-4820-8f1c-ec880290eb92",
"status": "PENDING",
"date": "2021-06-29T11:08:36.000+00:00",
"merchant_name": "My company",
"redirect_url": "https://sumup.com",
"purpose": "CHECKOUT",
"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",
"internal_id": 0
}
]
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Missing_ Parameter
Schema
- message string
Short description of the error.
- error_code string
Platform code for the error.
- param string
Parameter name (with relative location) to which the error applies. Parameters from embedded resources are displayed using dot notation. For example,
card.name
refers to thename
parameter embedded in thecard
object.
{
"message": "string",
"error_code": "string",
"param": "string"
}
{
"message": "Validation error",
"error_code": "MISSING",
"param": "pay_to_email"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Invalid_ Token
- Not_ Authorized_ Token
- Missing_ Token
Schema
- message string
Short description of the error.
- error_code string
Platform code for the error.
{
"message": "string",
"error_code": "string"
}
{
"error_message": "invalid access token",
"error_code": "NOT_AUTHORIZED"
}
{
"error_message": "NOT_AUTHORIZED",
"error_code": "NOT_AUTHORIZED"
}
{
"message": "access token required",
"error_code": "NOT_AUTHORIZED"
}
Forbidden
- application/json
- Schema
- Example (from schema)
- Forbidden
Schema
- error_message string
Short description of the error.
- error_code string
Platform code for the error.
- status_code string
HTTP status code for the error.
{
"error_message": "string",
"error_code": "string",
"status_code": "string"
}
{
"error_message": "checkout_payments_not_allowed",
"error_code": "FORBIDDEN",
"status_code": 403
}
Conflict
- application/json
- Schema
- Example (from schema)
- Existing_ Checkout
Schema
- message string
Short description of the error.
- error_code string
Platform code for the error.
{
"message": "string",
"error_code": "string"
}
{
"error_code": "DUPLICATED_CHECKOUT",
"message": "Checkout with this checkout reference and pay to email already exists"
}