Sofort

Start accepting payments using Sofort, a favorite payment method in Europe.

To start accepting Sofort payments, please contact your customer success manager.

Process a Sofort payment

You process a Sofort payment in two steps:

  1. Request a Sofort payment
  2. Redirect the customer

Step 1: Request a Sofort payment

The request

Use the details below to set up your request.

Endpoint live

https://api.checkout.com/payments

Endpoint sandbox

https://api.sandbox.checkout.com/payments

Header parameters

Header
Value

Authorization
Required

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type
Required

application/json

Body parameters

The table below describes the minimum recommended fields. You can find the full list, as well as complete request and response examples, in our API reference.

Field name
Description

source
Object
required

Details about the payment source.

source.type
String
required

The type of payment source. Set this to sofort.

amount
String
Optional

The payment amount. Omitting the amount or providing 0 will perform a card verification.

currency
String
required

The three-letter ISO currency code. Set this to EUR.

Request example

{
  "source": {
    "type": "sofort"
  },
  "amount": 1000,
  "currency": "EUR"
}

If a customer ID or email is not provided in the request, we automatically create a customer profile and return the customer id in the response.

The response

If a payment ID is returned, your request was successful.

Example response

{
  "id": "pay_ylcikkxovyjunekfu7a444mmvy",
  "status": "Pending",
  "customer": {
    "id": "cus_izfg7cwguvxuhaquys6qtof2f4"
  },
  "_links": {
    "self": {
      "href": "https://api.sandbox.checkout.com/payments/pay_ylcikkxovyjunekfu7a444mmvy"
    },
    "redirect": {
      "href": "https://sandbox.checkout.com/LP.Core/api/payment/108689"
    }
  }
}

Step 2: Redirect the customer

Redirect your customer to the redirect link’s href in the response to Step 1. The redirect transfers the customer to their bank's website where they will be asked to enter their authorization details; if successful, the payment can be approved.

Once completed, the customer is transferred to your predefined success or failure URL. Confirmation of a Sofort payment is communicated only through webhooks. When you receive a payment_captured webhook notification, the transaction has been completed successfully. Until the payment_captured webhook is received (response code 10000), all payments are labeled as Pending.

Get details about a Sofort payment

You can retrieve details about an existing Sofort payment with the following request.

The request

Use the details below to set up your request.

Endpoint live

GEThttps://api.checkout.com/payments/{payment_id}

Endpoint sandbox

GEThttps://api.sandbox.checkout.com/payments/{payment_id}

Header and path parameters

Header
Value

Authorization
Required

secret key

Use the valid secret key of your Checkout.com account. You can find this in the Hub.

Content-Type
Required

application/json

Path
Value

payment_id
Required

The payment ID found in the response of the initial payment.

The response

Example response

{
  "id": "pay_ylcikkxovyjunekfu7a444mmvy",
  "requested_on": "2018-11-22T15:58:35Z",
  "source": {
    "type": "sofort"
    },
  "amount": 100,
  "currency": "EUR",
  "payment_type": "Regular",
  "status": "Pending",
  "risk": {
    "flagged": false
  },
  "customer": {
    "id": "cus_izfg7cwguvxuhaquys6qtof2f4"
  },
  "_links": {
    "self": {
      "href": "https://api.sandbox.checkout.com/payments/pay_ylcikkxovyjunekfu7a444mmvy"
    }
  }
}

Refund a Sofort payment

Sofort supports both partial and full refunds. You can refund a payment through the Hub or using the refund API.

Cancel a Sofort payment

If the customer cancels or fails to complete the transaction at any point after the payment is created, it will automatically be voided, and we'll send you a payment_voided webhook.

Can we help?

Thanks for using Checkout.com. If you need any help or support, then message our support team at support@checkout.com.

Sofort


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.