Sofort

Overview

Introduction

Sofort is a payment method which allows you to process payments in euros using bank accounts and payment cards in several European countries. This method supports purchases. You can also perform refunds via payouts by using Payouts to bank accounts in SEPA as a complementary payment method.

This article provides information about working with the Sofort method: general insights are presented in the Overview section, while information about the actions required to process payments and perform other actions is presented in the sections that follow.

Note:

Two technical implementations are currently supported for working with the Sofort method: the new one described in this section and the old one described in the section Sofort (legacy).

Details about the difference between these implementations and how to switch from the old implementation to the new one should be clarified with the ecommpay key account manager.

General information

Payment method type bank payments
Payment instruments
  • bank accounts
  • payments cards
Countries and regions AT, BE, DE, CH, ES, NL
Payment currencies EUR
Currency conversion on ecommpay side
One-time purchases +
Credential-on-file purchases
Full refunds
Partial refunds
Payouts
Chargebacks
Notes
  • payment confirmation procedure may be used during purchase processing; contact your account manager to have this procedure set up
  • performing refunds via payouts is possible with the use of the complementary payment method Payouts to bank accounts in SEPA
Onboarding and access fee contact your ecommpay account manager; additional information is available in ecommshop

Interaction diagram

Payment processing by using the Sofort method involves the merchant's web service, one of ecommpay interfaces, the ecommpay payment platform, and technical facilities of the Sofort service.



Operations support

To perform puchases by using the Sofort payment method you can use Gate and Payment Page interfaces. Keep in mind that amount limits and payment processing times depend on banks, that support purchases by using this payment method.

Processing scenarios

To perform a purchase operation, you need to redirect a customer to the Sofort service. Purchases can be processed in two ways: with payment confirmation procedure and without. This procedure may be useful when processing involves interaction with certain banks because payment processing on the side of the Sofort service and the banks can take up extended time (up to seven days or more) and initial confirmations of payments may subsequently be refuted.

Scenarios for performing operations via the main interfaces of the payment platform correspond to those presented in the diagrams. Similarly, when additional features (such as payment links) are used, scenarios for performing operations also correspond to the specifics of those features.

Payment confirmation procedure

The workflow of processing purchases made with Sofort implies participation of banks, and in certain cases, processing payments on the side of these banks and the Sofort service may take up considerable time (up to seven or more days). As a result, there can be situations when the earlier information about the payment's completion or decline contradicts the final result (for example, following a notification about a declined payment, the funds are credited to the recipient's account, or vice versa).

To ensure timely and correct notification of merchants regarding the status of payments in these cases, the ecommpay payment platform uses a payment confirmation procedure. When you integrate the Sofort payment method, discuss with your account manager the use of this procedure as well as switching of statuses of the payments with the confirmed declines to the reversed or decline status (to make monitoring and analysing payments more convenient).

The payment confirmation procedure is performed as follows: after the customer completes all required steps, the payment is processed on the Sofort service side while the customer is redirected to the payment interface where they receive the information about payment processing. The payment confirmation operation is created on the payment platform side while the payment status is set to awaiting confirmation until the information about payment confirmation is received from a service provider side and the corresponding payment status callback is sent to the web service.

The payment confirmation operation can have one of the following final statuses:

  • success—when the information about the crediting of funds to the recipient is received from a service provider side. In this case the payment status is set to success and the final callback containing the payment information is sent to the web service.
  • decline—when the information regarding the funds not being credited to the recipient is received from a service provider. In this case depending on the project settings, that were configured during integration, the following scenarios are available:
    • The reversal operation is initiated automatically and the payment platform sends the following callbacks successively: an intermediate callback, containing information about the funds not being credited and the final callback, containing the information about the purchase refund and the reversed payment status.
    • The payment status is set to decline and the final callback with information that purchase was declined is sent from the payment platform to the web service.

When using this procedure, you can also monitor payment statuses in the Dashboard interface.

Using payment confirmation via Payment Page and Gate is described in the corresponding sections of this article. If you have any additional questions regarding this procedure, contact the ecommpay specialists.

Purchases by using Payment Page

General information

To process a purchase through Payment Page by using the Sofort method, the merchant's web service is required to send a request with all required parameters and signature to the ecommpay URL and receive one or more callbacks from the payment platform. The full sequence and special aspects of purchase processing are provided below.



Figure: The purchase processing by using Payment Page steps without the payment confirmation procedure

  1. A customer initiates a purchase in the web service.
  2. The web service sends the request for opening Payment Page to the specified ecommpay URL.
  3. The request for opening Payment Page is sent to the payment platform.
  4. The payment platform receives the request and validates the required parameters and signature.
  5. Payment Page is generated based on the project and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the Sofort method.
  8. The payment platform receives the request for processing the payment by using the Sofort method.
  9. The payment platform processes the request and sends it to the Sofort service.
  10. The request is processed on the Sofort service side.
  11. The data for redirecting the customer to the Sofort service is sent from the Sofort service to the payment platform.
  12. The data for redirecting the customer is sent from the payment platform to Payment Page.
  13. The customer is redirected to the Sofort service.
  14. The customer completes all required payment steps.
  15. The purchase is processed in the Sofort service.
  16. The result information is displayed to the customer in the Sofort service.
  17. The customer is redirected to Payment Page.
  18. The Sofort service sends a notification about the result to the payment platform.
  19. The payment platform sends the payment result callback to the web service.
  20. The payment platform sends the result information to Payment Page.
  21. The result information is displayed to the customer on Payment Page.


Figure: The purchase processing by using Payment Page steps with the payment confirmation procedure

  1. A customer initiates a purchase in the web service.
  2. The web service sends the request for opening Payment Page to the specified ecommpay URL.
  3. The request for opening Payment Page is sent to the payment platform.
  4. The payment platform receives the request and validates the required parameters and signature.
  5. Payment Page is generated based on the project and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the Sofort method.
  8. The payment platform receives the request for processing the payment by using the Sofort method.
  9. The payment platform processes the request and sends it to the Sofort service.
  10. The request is processed on the Sofort service side.
  11. The data for redirecting the customer to the Sofort service is sent from the Sofort service to the payment platform.
  12. The data for redirecting the customer is sent from the payment platform to Payment Page.
  13. The customer is redirected to the Sofort service.
  14. The customer completes all required payment steps.
  15. The payment is processed on Sofort service side.
  16. The customer is redirected to Payment Page.
  17. Sofort sends the payment status notification to the payment platform.
  18. The payment platform sends a callback with the payment status information to the web service.
  19. The payment platform sends the notification about processing payment on the Sofort side to the web service.
  20. A page with the notification about processing the payment on the Sofort side is displayed to the customer on Payment Page.
  21. When the procedure of payment confirmation is completed, Sofort sends the result notification to the payment platform.
  22. The payment platform sends a callback with the payment result to the web service.

Information about the formats of requests and callbacks used for processing payments by using the Sofort method via Payment Page is presented further in this section; general information about working with the Payment Page API is presented in Interaction concepts.

Request format

There are several things you need to consider when sending purchase requests by using the Sofort method:

  1. The following parameters required for any payment must be specified:
    • project_id—project identifier obtained from ecommpay during integration
    • payment_id—payment identifier unique within the project
    • payment_currency—payment currency code in the ISO-4217 alpha-3 format
    • payment_amount—payment amount in the smallest currency unit
    • customer_id—customer identifier unique within the project
  2. The following parameters required for any payment must be specified: project_id, payment_id, payment_currency, payment_amount, customer_id.
  3. To open Payment Page, pass the language code in the language_code parameter in the request for opening. For more information, see Interface language support.
  4. If you need to have the payment form displayed with the Sofort method selected, set the force_payment_method parameter to sofort.
  5. Additionally, any other parameters available for working with Payment Page can be used (details).
  6. After all target parameters are specified, generate a signature (details).

Thus, a correct request for opening the payment form using the Sofort method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer identifier and signature.

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 10000,
   "payment_currency": "EUR",
   "customer_id": "customer1",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

Figure: Example of sufficient data in a purchase request

{
   "project_id": 120,
   "payment_id": "580",
   "payment_amount": 10000,
   "payment_currency": "EUR",
   "customer_id": "customer1",
   "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg=="
}

Callback format

The Sofort method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

Figure: Example of callback data indicating that the purchase has been processed (without the payment confirmation procedure)

{
        "project_id": 8791,
        "payment": {
            "id": "test_02",
            "type": "purchase",
            "status": "success",
            "date": "2022-02-19T14:25:25+0000",
            "method": "sofort",
            "sum": {
                "amount": 10000,
                "currency": "EUR"
            },
            "description": "payment_02"
        },
        "account": {
            "number": "2300568"
        },
        "operation": {
            "id": 141539000182,
            "type": "sale",
            "status": "success",
            "date": "2022-02-19T14:25:25+0000",
            "created_date": "2022-02-19T14:25:24+0000",
            "request_id": "9d22c3bad2913b488"
                "amount": 10000,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "EUR"
            },
            "provider": {
                "id": 11339,
                "payment_id": "1228",
                "date": "2022-02-19T14:25:24+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "of8k9xerKSKpFBRh0CIcjmOwSwKJ7KLTZYO56lCv+f1M0Sf/7eg=="
    }

Figure: Example of callback data indicating that the purchase has been declined (without the payment confirmation procedure)

{
        "project_id": 8791,
        "payment": {
            "id": "TEST_154996862174000",
            "type": "purchase",
            "status": "decline",
            "date": "2022-02-12T10:56:22+0000",
            "method": "sofort",
            "sum": {
                "amount": 10000,
                "currency": "EUR"
            },
            "description": "TEST_154996174000"
        },
        "customer": {
            "id": "customer123"
        },
        "operation": {
            "id": 9172000183,
            "type": "sale",
            "status": "decline",
            "date": "2022-02-12T10:56:22+0000",
            "created_date": "2022-02-12T10:56:18+0000",
            "request_id": "11d4a9cb74c0681927ad7",
            "sum_initial": {
                "amount": 10000,
                "currency": "EUR"
            },
            "provider": {
                "id": 1100,
                "payment_id": "",
                "auth_code": ""
            },
            "code": "20000",
            "message": "General decline"
        },
        "signature": "n/1oVdS/mE0AlVOUDbbNqasdfghjiRz0yJRrqn7HiBOEIObz2tN5SLw=="
    }
}

Figure: Example of callback data indicating about payment status information (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "E4364-fc4d",
            "type": "purchase",
            "status": "awaiting confirmation", // payment status
            "date": "2022-04-12T08:46:13+0000",
            "method": "sofort",
            "sum": {
                "amount": 10000,
                "currency": "EUR"
            },
            "description": ""
        },
        "account": {
            "number": "DE06000123456789"
        },
        "customer": {
            "id": "customer123"
        },
        "operation": {
            "id": 77,
            "type": "payment confirmation",
            "status": "success",
            "date": "2022-04-12T08:46:13+0000",
            "created_date": "2022-04-12T08:45:01+0000",
            "request_id": "935948575ce85f651ac81f6c412c205eee9a01f0-00000001",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "EUR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 15203,
                "payment_id": "212225-7590-6710",
                "auth_code": "",
                "endpoint_id": "TD0XXX",
                "date": "2022-04-12T08:45:29+0000"
            }
        },
        "signature": "AvFBWWqia+EItai8yr7yLWl+24bRAouEm59YzlMCUxl/Dhlw5QRFpw5+Q=="
    }

Figure: Example of callback data indicating that the purchase was completed (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "PAYMENT_5524",
            "type": "purchase",
            "status": "success",    // payment status
            "date": "2022-07-18T07:36:19+0000",
            "method": "sofort",
            "sum": {
                "amount": 100,
                "currency": "EUR"
            },
            "description": "PAYMENT_5524"
        },
        "customer": {
            "id": "customer123"
        },
        "account": {
            "number": "DE0123456789"
        },
        "operation": {
            "id": 55221,
            "type": "sale",
            "status": "success",
            "date": "2022-07-18T07:36:19+0000",
            "created_date": "2022-07-18T07:33:01+0000",
            "request_id": "a0dd90bd188cc93104d8776f3f23ff66-00023585...",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "EUR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 9491,
                "payment_id": "212BAB0",
                "auth_code": "",
                "endpoint_id": "ABCXXX",
                "date": "2022-07-18T07:36:13+0000"
            }
        },
        "signature": "RVbY4YUVF0a+K28YPr2//P+mPht24BjO9lPWvRLla4Bic5KdiRg=="
}

Figure: Example of callback data indicating that the funds are not credited (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "PAYMENT_6617",
            "type": "purchase",
            "status": "awaiting confirmation",    // payment status
            "date": "2022-07-18T07:51:24+0000",
            "method": "sofort",
            "sum": {
                "amount": 100,
                "currency": "EUR"
            },
            "description": "PAYMENT_6617"
        },
        "customer": {
            "id": "customer123"
        },
        "account": {
            "number": "DE0123456789"
        },
        "operation": {
            "id": 10103681,
            "type": "payment confirmation", 
            "status": "decline",    // the funds are not credited
            "date": "2022-07-18T07:52:25+0000",
            "created_date": "2022-07-18T07:51:24+0000",
            "request_id": "752d-7aac86523ffcc8f19bab54b1e93c14...",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "EUR"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 0123,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "RRBu5U1woawhuYXdpf5lHB6OEsp9SGuiJI3AWvOXhKqtw=="
    }

Figure: Example of callback data indicating that the funds are returned (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "PAYMENT_6017",
            "type": "purchase",
            "status": "reversed",    // payment status
            "date": "2022-07-18T07:52:27+0000",
            "method": "sofort",
            "sum": {
                "amount": 0,
                "currency": "EUR"
            },
            "description": "PAYMENT_6017"
        },
        "customer": {
            "id": "customer123"
        },
        "account": {
            "number": "DE0123456789"
        },
        "operation": {
            "id": 2010691,
            "type": "reversal",
            "status": "success",
            "date": "2022-07-18T07:52:27+0000",
            "created_date": "2022-07-18T07:52:26+0000",
            "request_id": "a4037d3ce2d1812c1-45c98e4898e2854a1325-00086743...",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "EUR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 2345,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "LcsU5RU0LiHfP5Sc/6LVxMt5+Q8w21RGUZehQW0SpHt1VpB7MmV8bg=="
    }

Useful links

The following articles can be useful when implementing purchases via Payment Page:

Purchases by using Gate

General information

Depending on processing the payment confirmation procedure, purchase processing by using Gate can involve additional actions. Generally, to perform a purchase by using Gate the merchant web service is required to do the following:

  1. Send a request with all the required parameters and signature to the ecommpay URL.
  2. Perform the redirection of a customer to the Sofort service.
  3. Receive one or more callbacks from the payment platform.

The full sequence and special aspects of purchase processing are provided below.



Figure: The purchase processing by using Gate steps without the payment confirmation procedure

  1. A customer initiates a purchase by using the Sofort method in the web service.
  2. The web service sends the request for processing the purchase by using Gate to the specified ecommpay URL.
  3. The payment platform receives the request.
  4. The payment platform validates the required parameters and signature in the request.
  5. The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
  6. The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Sofort service.
  7. The request is processed on the Sofort service side.
  8. The Sofort service sends the redirection data to the payment platform.
  9. The payment platform sends the callback with the redirection data to the web service.
  10. The customer is redirected to the Sofort service.
  11. The customer completes all required payment steps.
  12. The purchase is processed in the Sofort service.
  13. The result is displayed to the customer.
  14. The customer is redirected to the web service.
  15. The Sofort service sends the payment result notification to the payment platform.
  16. The payment platform sends the payment result callback to the web service.
  17. The customer receives the payment result information from the web service.


Figure: The purchase processing by using Gate steps with the payment confirmation procedure

  1. A customer initiates a purchase by using the Sofort method in the web service.
  2. The web service sends the request for processing the purchase by using Gate to the specified ecommpay URL.
  3. The payment platform receives the request.
  4. The payment platform validates the required parameters and signature in the request.
  5. The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
  6. The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Sofort service.
  7. The request is processed on the Sofort service side.
  8. The Sofort service sends the redirection data to the payment platform.
  9. The payment platform sends the callback with the redirection data to the web service.
  10. The customer is redirected to the Sofort service.
  11. The customer completes all required payment steps.
  12. The payment is processed on the Sofort side.
  13. The customer is redirected to the merchant's web service.
  14. Sofort sends the payment status notification to the payment platform.
  15. The payment platform sends a callback with the payment status information to the web service.
  16. The customer receives the notification about processing payment on the Sofort side on the web service.
  17. When the procedure of payment confirmation is completed, Sofort service sends the result notification to the payment platform.
  18. The payment platform sends a callback with the payment result to the web service.

Information about the formats of requests and callbacks used for processing payments by using the Sofort method via Gate is presented further in this section. General information about working with the Gate API is presented in Interaction concepts.

Request format

There are several things you need to consider when sending purchase requests by using the Sofort method:

  1. To initiate each purchase, send a separate POST request to the /v2/payment/online-banking/sofort/sale endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/sale.
  2. Each request must include the following objects and parameters:
    • Object general—general purchase information:
      • project_id—project identifier obtained from ecommpay during integration
      • payment_id—payment identifier unique within the project
      • signature—request signature generated after all required parameters are specified (details—in the Signature generation and verification) (details)
    • Object payment—payment information:
      • amount—payment amount in the smallest currency unit
      • currency—payment currency code in the ISO-4217 alpha-3 format
    • Object customer—customer information:
      • id—customer identifier unique within the project
      • ip_address—customer IP address relevant for the initiated payment
  3. Additionally, any other parameters included in the specification can be used.

Thus, a correct purchase request by using the Sofort method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer identifier and IP address, as well as signature.

{
  "general": {
    "project_id": 210,
    "payment_id": "test_payment",
    "signature": "PJkV8ej\/UG0Di8hTng6JvipTv+AWoXW\/9MTO8yJA=="
  },
  "payment": {
    "amount": 1000,
    "currency": "EUR"
  },
  "customer": {
    "id": "customer123",
    "ip_address": "192.0.2.0"
  }
}

Figure: Example of sufficient data in a purchase request

{
  "general": {
    "project_id": 210,
    "payment_id": "test_payment",
    "signature": "PJkV8ej\/UG0Di8hTng6JvipTv+AWoXW\/9MTO8yJA=="
  },
  "payment": {
    "amount": 1000,
    "currency": "EUR"
  },
  "customer": {
    "id": "customer123",
    "ip_address": "192.0.2.0"
  }
}

Formats of intermediate callbacks for customer redirection

Each payment made with the Sofort method requires redirection of customers from the merchant's web service to the Sofort service. To redirect a customer it is necessary to receive an intermediate callback from the payment platform and use the information included in the redirect_data object. The format of such callbacks is standard (details), and the following objects and parameters are included in the redirect_data object:

  • body—object with data to be sent in the request body
  • method—parameter specifying the HTTP method for sending the request (GET or POST)
  • url—parameter containing a link for redirection

Figure: redirect_data example

"redirect_data": {
            "body": [],
            "method": "GET",
            "url": "https://sofort.com/payment/9X4AP1vj&cs=13073..."
                }

Callback format

The Sofort method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

Figure: Example of callback data indicating that the purchase has been processed (without the payment confirmation procedure)

{
        "project_id": 8791,
        "payment": {
            "id": "test_02",
            "type": "purchase",
            "status": "success",
            "date": "2022-02-19T14:25:25+0000",
            "method": "sofort",
            "sum": {
                "amount": 10000,
                "currency": "EUR"
            },
            "description": "payment_02"
        },
        "account": {
            "number": "2300568"
        },
        "operation": {
            "id": 141539000182,
            "type": "sale",
            "status": "success",
            "date": "2022-02-19T14:25:25+0000",
            "created_date": "2022-02-19T14:25:24+0000",
            "request_id": "9d22c3bad2913b488"
                "amount": 10000,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "EUR"
            },
            "provider": {
                "id": 11339,
                "payment_id": "1228",
                "date": "2022-02-19T14:25:24+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "of8k9xerKSKpFBRh0CIcjmOwSwKJ7KLTZYO56lCv+f1M0Sf/7eg=="
    }

Figure: Example of callback data indicating that the purchase has been declined (without the payment confirmation procedure)

{
        "project_id": 8791,
        "payment": {
            "id": "TEST_154996862174000",
            "type": "purchase",
            "status": "decline",
            "date": "2022-02-12T10:56:22+0000",
            "method": "sofort",
            "sum": {
                "amount": 10000,
                "currency": "EUR"
            },
            "description": "TEST_154996174000"
        },
        "customer": {
            "id": "customer123"
        },
        "operation": {
            "id": 9172000183,
            "type": "sale",
            "status": "decline",
            "date": "2022-02-12T10:56:22+0000",
            "created_date": "2022-02-12T10:56:18+0000",
            "request_id": "11d4a9cb74c0681927ad7",
            "sum_initial": {
                "amount": 10000,
                "currency": "EUR"
            },
            "provider": {
                "id": 1100,
                "payment_id": "",
                "auth_code": ""
            },
            "code": "20000",
            "message": "General decline"
        },
        "signature": "n/1oVdS/mE0AlVOUDbbNqasdfghjiRz0yJRrqn7HiBOEIObz2tN5SLw=="
    }
}

Figure: Example of callback data indicating about payment status information (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "E4364-fc4d",
            "type": "purchase",
            "status": "awaiting confirmation", // payment status
            "date": "2022-04-12T08:46:13+0000",
            "method": "sofort",
            "sum": {
                "amount": 10000,
                "currency": "EUR"
            },
            "description": ""
        },
        "account": {
            "number": "DE06000123456789"
        },
        "customer": {
            "id": "customer123"
        },
        "operation": {
            "id": 77,
            "type": "payment confirmation",
            "status": "success",
            "date": "2022-04-12T08:46:13+0000",
            "created_date": "2022-04-12T08:45:01+0000",
            "request_id": "935948575ce85f651ac81f6c412c205eee9a01f0-00000001",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "EUR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 15203,
                "payment_id": "212225-7590-6710",
                "auth_code": "",
                "endpoint_id": "TD0XXX",
                "date": "2022-04-12T08:45:29+0000"
            }
        },
        "signature": "AvFBWWqia+EItai8yr7yLWl+24bRAouEm59YzlMCUxl/Dhlw5QRFpw5+Q=="
    }

Figure: Example of callback data indicating that the purchase was completed (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "PAYMENT_5524",
            "type": "purchase",
            "status": "success",    // payment status
            "date": "2022-07-18T07:36:19+0000",
            "method": "sofort",
            "sum": {
                "amount": 100,
                "currency": "EUR"
            },
            "description": "PAYMENT_5524"
        },
        "customer": {
            "id": "customer123"
        },
        "account": {
            "number": "DE0123456789"
        },
        "operation": {
            "id": 55221,
            "type": "sale",
            "status": "success",
            "date": "2022-07-18T07:36:19+0000",
            "created_date": "2022-07-18T07:33:01+0000",
            "request_id": "a0dd90bd188cc93104d8776f3f23ff66-00023585...",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "EUR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 9491,
                "payment_id": "212BAB0",
                "auth_code": "",
                "endpoint_id": "ABCXXX",
                "date": "2022-07-18T07:36:13+0000"
            }
        },
        "signature": "RVbY4YUVF0a+K28YPr2//P+mPht24BjO9lPWvRLla4Bic5KdiRg=="
}

Figure: Example of callback data indicating that the funds are not credited (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "PAYMENT_6617",
            "type": "purchase",
            "status": "awaiting confirmation",    // payment status
            "date": "2022-07-18T07:51:24+0000",
            "method": "sofort",
            "sum": {
                "amount": 100,
                "currency": "EUR"
            },
            "description": "PAYMENT_6617"
        },
        "customer": {
            "id": "customer123"
        },
        "account": {
            "number": "DE0123456789"
        },
        "operation": {
            "id": 10103681,
            "type": "payment confirmation", 
            "status": "decline",    // the funds are not credited
            "date": "2022-07-18T07:52:25+0000",
            "created_date": "2022-07-18T07:51:24+0000",
            "request_id": "752d-7aac86523ffcc8f19bab54b1e93c14...",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "EUR"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 0123,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "RRBu5U1woawhuYXdpf5lHB6OEsp9SGuiJI3AWvOXhKqtw=="
    }

Figure: Example of callback data indicating that the funds are returned (with the payment confirmation procedure)

{
        "project_id": 8792,
        "payment": {
            "id": "PAYMENT_6017",
            "type": "purchase",
            "status": "reversed",    // payment status
            "date": "2022-07-18T07:52:27+0000",
            "method": "sofort",
            "sum": {
                "amount": 0,
                "currency": "EUR"
            },
            "description": "PAYMENT_6017"
        },
        "customer": {
            "id": "customer123"
        },
        "account": {
            "number": "DE0123456789"
        },
        "operation": {
            "id": 2010691,
            "type": "reversal",
            "status": "success",
            "date": "2022-07-18T07:52:27+0000",
            "created_date": "2022-07-18T07:52:26+0000",
            "request_id": "a4037d3ce2d1812c1-45c98e4898e2854a1325-00086743...",
            "sum_initial": {
                "amount": 100,
                "currency": "EUR"
            },
            "sum_converted": {
                "amount": 100,
                "currency": "EUR"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 2345,
                "payment_id": "",
                "auth_code": ""
            }
        },
        "signature": "LcsU5RU0LiHfP5Sc/6LVxMt5+Q8w21RGUZehQW0SpHt1VpB7MmV8bg=="
    }

Useful links

The following articles can be useful when implementing purchases via Gate:

Analysis of payments results

To analyse information about payments made with the Sofort method and other methods, you can use:

  • Dashboard interface toolkit with various lists and analytic panels.
  • Reports in CSV file format, available via the Reports section (one-time and periodically).
  • Data in JSON format, sent by program requests to a specified URL available by using the Data API interface.

If you have any questions, refer to the documentation (Dashboard and Using Data API) and ecommpay technical support.