Trustly
Overview
Introduction
Trustly is a payment method which allows you to process payments in different currencies by using bank accounts and payment cards in different countries. This method supports one-time and credential-on-file purchases, refunds and payouts.
This article provides information about working with the Trustly 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.
General information
Payment method type | bank payments |
---|---|
Payment instruments |
|
Countries and regions | AT, BE, BG, CY*, CZ, DE, DK, EE, ES, FI, FR*, GR*, HR*, HU, IE, IT, LT, LU*, LV, MT*, NL, NO, PL, PT*, RO, SE, SI, SK |
Payment currencies | EUR, BGN, CZK, DKK, EUR, HUF, NOK, PLN, RON, SEK |
Currency conversion | on the Trustly side |
One-time purchases | + |
Credential-on-file purchases | + ** |
Full refunds | + |
Partial refunds | + |
Payouts | + |
Chargebacks | – |
Notes |
|
Onboarding and access fee | refer to your ecommpay key account manager; additional information is available in ecommshop |
* Only payouts are supported in these countries.
** Credential-on-file purchases are available only for customers who are clients of selected Swedish banks.
Interaction diagram
Payment processing by using the Trustly method involves the merchant's web service, one of ecommpay interfaces, the ecommpay payment platform, and technical facilities of the Trustly service.
Operations support
Various platform interfaces can be used to process payments and perform operations using the Trustly method. Purchases can be processed by using Payment Page, Gate and Dashboard (using payment links), refunds and payouts—by using Gate and Dashboard. At the same time, regardless of the interfaces used, the following properties and limitations are applicable.
When working with the Trustly the following properties and limitations are applicable.
Amounts, EUR (or equivalent) | Times ¹ ² | |||
---|---|---|---|---|
minimum | maximum | basic | threshold | |
Purchases | 1.00 | – | * | * |
Credential-on-file purchases | – | – | * | * |
Refunds | – | – | * | * |
Payouts | – | – | * | * |
- Usually payment processing by using the Trustly service takes several minutes. However, in some cases the processing time can be up to 2 bank days, and sometimes it may be longer due to public holidays and weekends. For more information refer to the ecommpay key account manager.
- The base and threshold times are defined as follows:
- The base time is the average estimated time between the moment a payment is initiated in the payment platform to the moment the payment result is sent to the web service. The base time evaluation is made on the assumption of normal operation of all technical facilities and communication channels and typical customer behaviour (if any input from the customer is required). Use the base time to estimate when to react to the absence of payment result callbacks or when to check payment status (details).
- The threshold time is the maximum possible time between the moment a payment is initiated in the payment platform to the moment the web service receives the callback with the payment result. A payment is automatically assigned the
decline
status if it wasn't processed within the threshold time. For individual customisation of the threshold time limit, contact ecommpay technical support.
Processing scenarios
To perform a purchase by using the Trustly method, you need to redirect the customer to the Trustly service, while to make a refund, you need to receive a request from the customer and notify the customer about the result of the refund via the web service. To process a payout, you need to notify the customer via the web service.
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.
One-time purchases by using Payment Page
General information
To process a purchase through Payment Page by using the Trustly method, the merchant's web service is required to send a request with all required parameters and signature to the ecommpay URL and receive a callback with the result. The full sequence and special aspects of purchase processing are provided below.
- A customer initiates a purchase in the web service.
- The web service sends the request for opening Payment Page to the specified ecommpay URL.
- The request for opening Payment Page is sent to the payment platform.
- The payment platform receives the request and validates the required parameters and signature.
- Payment Page is generated based on the project and request parameters.
- Payment Page is displayed to the customer.
- The customer selects the Trustly method.
- The payment platform receives the request for processing the payment by using the Trustly method.
- The payment platform processes the request and sends it to the Trustly service.
- The request is processed on the Trustly service side.
- The data for redirecting the customer to the Trustly service is sent from the Trustly service to the payment platform.
- The data for redirecting the customer is sent from the payment platform to Payment Page.
- The customer is redirected to the Trustly service.
- The customer completes all required payment steps.
- The purchase is processed in the Trustly service.
- The Trustly service sends a notification about the result to the payment platform.
- The payment platform sends the payment result callback to the web service.
- The payment platform sends the result information to Payment Page.
- The result information is displayed to the customer on Payment Page.
Information about the formats of requests and callbacks used for processing payments by using the Trustly 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 Trustly method:
- The following parameters required for any payment must be specified:
project_id
—project identifier obtained from ecommpay during integrationpayment_id
—payment identifier unique within the projectpayment_currency
—payment currency code in the ISO-4217 alpha-3 formatpayment_amount
—payment amount in the smallest currency unitcustomer_id
—customer identifier unique within the project
- The following parameters required for any payment must be specified:
project_id
,payment_id
,payment_currency
,payment_amount
,customer_id
. - The currency of payment can only be one from the General information section.
- Additional parameters are required for payment. They are not required to open the Payment Page, but they are always requested from the customer if they were not passed in the request. Additional (required) parameters for payment:
customer_first_name
—customer first namecustomer_last_name
—customer last namecustomer_email
—email addresscustomer_country
—country code in accordance with ISO 3166-1 alpha-2language_code
—language code in accordance with ISO 639-1 alpha-2
- If you need to have the payment form displayed with the Trustly method selected, set the
force_payment_method
parameter toonline-banking-trustly
. -
Also some additional parameters may be requested. The list of them depends on the merchant business type. These parameters may be passed in the request for the Payment Page opening or left to be filled in by customer.
The list of possible parameters:
identify_doc_number
—number of the identity documentpayment_extra_param
—object with additional data:beneficiary
—information about the recipient of a money transfer:party_type
—recipient type (PERSON
orORGANISATION
),first_name
—first name (the parameter value may be empty if recipient is organisation)last_name
—last name or company name (for organisation)country
—country name code in accordance with ISO 3166-1 alpha-2
- Additionally, any other parameters available for working with Payment Page can be used (details).
- After all target parameters are specified, generate a signature (details).
Thus, a correct payment request in the Trustly method must include project and payment IDs, the currency and the amount of a payment in the appropriate currency, as shown in the following example:
Thus, a correct request for opening the payment form using the Trustly 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": 1000, "payment_currency": "EUR", "customer_id": "customer1", "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg==" }
{ "project_id": 120, "payment_id": "580", "payment_amount": 1000, "payment_currency": "EUR", "customer_id": "customer1", "signature": "kUi2x9dKHAVNU0FYldOcZzUCwX6R\/ekpZhkIQg==" }
Here is a correct payment request in the Trustly method (with specifying of additional parameters):
"project_id": 100, "payment_id": "X03936", "payment_amount": 1000, "payment_currency": "EUR", "signature": "kUi2x9dKHAVNU0FYldJrxh4yoJrOcZzUCwX6R\/ekpZhkIQg==", "customer_id": "1234567", "customer_first_name": "John", "customer_last_name": "Smith", "customer_email": "john.smith@example.com" "customer_country": "SE", "language_code": "en", "identify_doc_number": "SE987546-654", "payment_extra_param": { "beneficiary": { "party_type": "PERSON", "first_name": "Eddy", "last_name": "Stockmann", "country": "SE" } } }
Callback format
The Trustly method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.
The following is the example of a callback with information about a 20.00 EUR
purchase made by the 1
customer in the 200
project.
{ "project_id": 200, "payment": { "id": "ECT_TEST_1561994171758", "type": "purchase", "status": "success", "date": "2019-07-01T15:26:40+0000", "method": "trustly", "sum": { "amount": 2000, "currency": "EUR" }, "description": "ECT_TEST_1561994171752" }, "customer": { "id": "1" }, "operation": { "id": 28970000003316, "type": "sale", "status": "decline", "date": "2019-07-01T15:26:40+0000", "created_date": "2019-07-01T15:26:08+0000", "request_id": "63088b14f83a0bb48882dedfe2cc7fa6aaff", "sum_initial": { "amount": 2000, "currency": "EUR" }, "sum_converted": { "amount": 2000, "currency": "EUR" }, "provider": { "id": 1246, "payment_id": "1076832", "date": "2019-07-01T15:26:39+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "GLZgBiriazPCzp3Kj+Pso7V1FNJvNc0Wssyl14X4HYxNwZJ94Q==" } }
The following is the example of a callback with information about a declined purchase.
{
"project_id": 200,
"payment": {
"id": "ECT_TEST_1561994171758",
"type": "purchase",
"status": "decline",
"date": "2019-07-01T15:26:40+0000",
"method": "trustly",
"sum": {
"amount": 2000,
"currency": "EUR"
},
"description": "ECT_TEST_1561994171752"
},
"customer": {
"id": "1"
},
"operation": {
"id": 28970000003316,
"type": "sale",
"status": "decline",
"date": "2019-07-01T15:26:40+0000",
"created_date": "2019-07-01T15:26:08+0000",
"request_id": "63088b14f83a0bb48882dedfe2cc7fa6aaff",
"sum_initial": {
"amount": 2000,
"currency": "EUR"
},
"sum_converted": {
"amount": 2000,
"currency": "EUR"
},
"provider": {
"id": 1246,
"payment_id": "1076832",
"date": "2019-07-01T15:26:39+0000",
"auth_code": ""
},
"code": "20301",
"message": "Account owner cancelled operation"
},
"signature": "GLZgBiriazPCzp3Kj+Pso7V1FNJvNc0Wsl14X4HYxNwZJ94Q=="
}
}
Useful links
The following articles can be useful when implementing purchases via Payment Page:
- Interaction concepts—about the interaction with the payment platform by using Payment Page.
- Signature generation and verification—about the procedure of generating and verifying signatures in requests and callbacks.
- Payment models and statuses—about the types, processing models, and possible statuses of supported payments and operations.
- One-time one-step purchase—about processing of one-time one-step purchases by using Payment Page.
- Information of operations performing—about error and response codes that are used in the payment platform to record information about performing of operations.
One-time purchases by using Gate
General information
To process a purchase through Gate by using the Trustly method, the merchant's web service is required to do the following:
- Send a request with all the required parameters and signature to the ecommpay URL.
- Receive an intermediate callback from the payment platform and redirect the customer to the Trustly service.
- Receive the final callback from the payment platform.
The full sequence and special aspects of purchase processing are provided below.
- A customer initiates a purchase by using the Trustly method in the web service.
- The web service sends the request for processing the purchase by using Gate to the specified ecommpay URL.
- The payment platform receives the request.
- The payment platform validates the required parameters and signature in the request.
- The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
- The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Trustly service.
- The request is processed on the Trustly service side.
- The Trustly service sends the redirection data to the payment platform.
- The payment platform sends the callback with the redirection data to the web service.
- The customer is redirected to the Trustly service.
- The customer completes all required payment steps.
- The purchase is processed in the Trustly service.
- The Trustly service sends the payment result notification to the payment platform.
- The payment platform sends the payment result callback to the web service.
- The customer receives the payment result information from the web service.
Information about the formats of requests and callbacks used for processing payments by using the Trustly 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 Trustly method:
- To initiate each purchase, send a separate POST request to the
/v2/payment/online-banking/trustly/sale
endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/sale. - Each request must include the following objects and parameters:
- Object
general
—general purchase information:project_id
—project identifier obtained from ecommpay during integrationpayment_id
—payment identifier unique within the projectsignature
—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 unitcurrency
—payment currency code in the ISO-4217 alpha-3 format
- Object
customer
—customer information:id
—customer identifier unique within the projectip_address
—customer IP address relevant for the initiated paymentfirst_name
—customer first namelast_name
—customer last nameemail
—customer email addresscountry
—customer country code in accordance with ISO 3166-1 alpha-2language
—customer language code in accordance with ISO 639-1
- Object
return_url
—contains the URLs to which customer is redirected during or after payment processing:success
—URL for redirecting a customer after a performed purchasedecline
—URL for redirecting a customer after a declined purchase
- Object
- The currency of payment can only be one from the General information section.
- Additionally some other parameters may be required:
additional_data.beneficiary
—information about the recipient of a money transfer:party_type
—recipient type (PERSON
orORGANISATION
),first_name
—first name (the parameter value may be empty if recipient is organisation)last_name
—last name or company name (for organisation)country
—country name code in accordance with ISO 3166-1 alpha-2
The list of them depends on the merchant business type. If web service supports clarification of parameters, then you will receive a message with a list of missing parameters in a callback. For more information see Submission of additional payment information.
If web service does not support clarification of parameters, then you need to pass all those parameters (from the second and fourth points) in the purchase request.
- Additionally, any other parameters included in the specification can be used.
Thus, a correct purchase request by using the Trustly method (with clarification support) must contain the project identifier, basic payment information (identifier, amount, and currency code), customer information, as well as signature.
{ "general": { "project_id": 200, "payment_id": "ECT_TEST_1561994171758", "signature": "+e6gss++zs/St78SnjY7M13MAerP3eTOLViNkA==" }, "customer": { "id": "123", "email": "customer@example.com", "first_name": "John", "last_name": "Johnson" }, "payment": { "amount": 2000, "currency": "EUR" }, "return_url: { "success": "http://example.com/success", "decline": "http://example.com/decline" } }
{ "general": { "project_id": 200, "payment_id": "ECT_TEST_1561994171758", "signature": "+e6gss++zs/St78SnjY7M13MAerP3eTOLViNkA==" }, "customer": { "id": "123", "email": "customer@example.com", "first_name": "John", "last_name": "Johnson" }, "payment": { "amount": 2000, "currency": "EUR" }, "return_url: { "success": "http://example.com/success", "decline": "http://example.com/decline" } }
Formats of intermediate callbacks for customer redirection
Each payment made with the Trustly method requires redirection of customers from the merchant's web service to the Trustly 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 bodymethod
—parameter specifying the HTTP method for sending the request (GET
orPOST
)url
—parameter containing a link for redirection
"redirect_data": { "body": [], "method": "GET", "url": "https://example.com/en/v1.1/payment/903d8cd4-b8e9-066727d8826c" }
Callback format
The Trustly method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.
The following is the example of a callback with information about a 20.00 EUR
purchase made by the 1
customer in the 200
project.
{ "project_id": 200, "payment": { "id": "ECT_TEST_1561994171758", "type": "purchase", "status": "success", "date": "2019-07-01T15:26:40+0000", "method": "trustly", "sum": { "amount": 2000, "currency": "EUR" }, "description": "ECT_TEST_1561994171752" }, "customer": { "id": "1" }, "operation": { "id": 28970000003316, "type": "sale", "status": "decline", "date": "2019-07-01T15:26:40+0000", "created_date": "2019-07-01T15:26:08+0000", "request_id": "63088b14f83a0bb48882dedfe2cc7fa6aaff", "sum_initial": { "amount": 2000, "currency": "EUR" }, "sum_converted": { "amount": 2000, "currency": "EUR" }, "provider": { "id": 1246, "payment_id": "1076832", "date": "2019-07-01T15:26:39+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "GLZgBiriazPCzp3Kj+Pso7V1FNJvNc0Wssyl14X4HYxNwZJ94Q==" } }
The following is the example of a callback with information about a declined purchase.
{
"project_id": 200,
"payment": {
"id": "ECT_TEST_1561994171758",
"type": "purchase",
"status": "decline",
"date": "2019-07-01T15:26:40+0000",
"method": "trustly",
"sum": {
"amount": 2000,
"currency": "EUR"
},
"description": "ECT_TEST_1561994171752"
},
"customer": {
"id": "1"
},
"operation": {
"id": 28970000003316,
"type": "sale",
"status": "decline",
"date": "2019-07-01T15:26:40+0000",
"created_date": "2019-07-01T15:26:08+0000",
"request_id": "63088b14f83a0bb48882dedfe2cc7fa6aaff",
"sum_initial": {
"amount": 2000,
"currency": "EUR"
},
"sum_converted": {
"amount": 2000,
"currency": "EUR"
},
"provider": {
"id": 1246,
"payment_id": "1076832",
"date": "2019-07-01T15:26:39+0000",
"auth_code": ""
},
"code": "20301",
"message": "Account owner cancelled operation"
},
"signature": "GLZgBiriazPCzp3Kj+Pso7V1FNJvNc0Wsl14X4HYxNwZJ94Q=="
}
}
Useful links
The following articles can be useful when implementing purchases via Gate:
- Interaction concepts—about the interaction with the payment platform by using Gate.
- Signature generation and verification—about the procedure of generating and verifying signatures in requests and callbacks.
- Payment models and statuses—about the types, processing models, and possible statuses of supported payments and operations.
- One-time one-step purchase—about processing of one-time one-step purchases by using Payment Page.
- Information of operations performing—about error and response codes that are used in the payment platform to record information about performing of operations.
COF purchases by using Payment Page
General information
The Trustly method supports three types of COF purchases: OneClick, regular payments, and autopayments. For more information about COF purchases types, see the COF purchase registration section.
The registration of COF purchases through the Payment Page can be performed during the initial payment, when the customer agrees to perform COF purchases on the Trustly payment form. Further OneClick payments can be made without re-authorizing the customer on the Trustly payment form through the Payment Page and Gate. Regular and autopayments are carried out without customer intervention through Gate (for more information, see COF purchases by using Gate).
COF purchases registration
To register COF purchases at the time of payment, the customer on the Trustly payment form must agree to make COF purchases using the Trustly service. After successful payment according to the standard scheme described in the section One-time purchases by using Payment Page, two callbacks are passed to the merchant’s web service:
- callback of successful payment
- repeated callback of a successful payment with information about registered COF purchases (on the next business day)
Information about registered COF purchases is contained in the recurring
object.
{ "project_id": 1625, "payment": { "id": "ID_1234567890000", "type": "purchase", "status": "success", "date": "2019-09-16T15:18:02+0000", "method": "trustly", "sum": { "amount": 100, "currency": "EUR" }, "description": "Trustly sale transaction" }, "account": { "number": "1902377919" }, "customer": { "id": "123" }, "recurring": { "id": 1007592570, "currency": "EUR", "valid_thru": "2020-01-31T00:00:00+0000" }, "operation": { "id": 6841000003665, "type": "sale", "status": "success", "date": "2019-09-16T15:18:03+0000", "created_date": "2019-09-16T15:15:13+0000", "request_id": "==request id==", "sum_initial": { "amount": 100, "currency": "EUR" }, "sum_converted": { "amount": 100, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "1784257774", "date": "2019-09-16T15:18:02+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "ajfgtBiriazPCzp3Kj+PsoTBEyl14X4HYxNwZJ94Q==" }
OneClick payments processing
After successful registration of COF purchases, OneClick payments are performed without authorisation of the customer using the saved data. OneClick payments follow the following scheme.
- A customer initiates a purchase in the web service.
- The web service sends the request for opening Payment Page to the specified ecommpay URL.
- The request for opening Payment Page is sent to the payment platform.
- The payment platform receives the request and validates the required parameters and signature.
- Payment Page is generated based on the project and request parameters.
- Payment Page is displayed to the customer.
- The customer selects the Trustly method.
- The list of saved payment instruments is displayed to the customer.
- The customer selects saved payment instrument.
- The payment platform receives the request for processing the payment by using the Trustly method.
- The payment platform processes the request and sends it to the Trustly service.
- The request is processed on the Trustly service side.
- The Trustly service sends a notification about the result to the payment platform.
- The payment platform sends the payment result callback to the web service.
- The payment platform sends the result information to Payment Page.
- The result information is displayed to the customer on Payment Page.
Callback format
The Trustly method uses the standard format for callbacks to deliver OneClick purchase results. For more information, see Callbacks.
The following is the example of a callback with information about a 1.00 EUR
OneClick purchase made by the 123
customer in the 1625
project.
{ "project_id": 1625, "payment": { "id": "ID_1568639174831", "type": "recurring", "status": "success", "date": "2019-09-17T07:12:03+0000", "method": "trustly", "sum": { "amount": 100, "currency": "EUR" }, "description": "Trustly COF purchase" }, "customer": { "id": "123" }, "recurring": { "id": 1007592570, "currency": "EUR" }, "operation": { "id": 2110000003671, "type": "recurring", "status": "success", "date": "2019-09-17T07:12:03+0000", "created_date": "2019-09-17T07:10:02+0000", "request_id": "63088b14f83a0bb48882dedfe2cc7fa6aaff", "sum_initial": { "amount": 100, "currency": "EUR" }, "sum_converted": { "amount": 100, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "1562050323", "date": "2019-09-17T07:12:01+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "khgsuyriazPCzp3Kj+Pso7V1FNJvNcTBEyl14X4HYxNwZJ94Q==" }
COF purchases by using Gate
General information
The Trustly method supports three types of COF purchases: OneClick, regular payments, and autopayments. For more information about COF purchases types, see the Credential-on-file (COF) purchases section.
Registration of COF purchases can be carried out in two ways: during the initial payment and during the payment instrument verification. In both cases, the user agrees to repeat payments on the Trustly payment form. Further OneClick payments can be made without re-authorizing the customer on the Trustly payment form through the Payment Page and Gate. Regular and autopayments are carried out without customer intervention through Gate.
COF purchase registration by using account verification
The full sequence of COF purchase registration by using account verification is provided below.
- A customer initiates account verification by using the Trustly method in the web service.
- The web service sends the request for processing the account verification by using Gate to the specified ecommpay URL.
- The payment platform receives the request.
- The payment platform validates the required parameters and signature in the request.
- The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
- The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Trustly service.
- The request is processed on the Trustly service side.
- The Trustly service sends the redirection data to the payment platform.
- The payment platform sends the callback with the redirection data to the web service.
- The customer is redirected to the Trustly service.
- The customer completes all the steps required for account verification and agrees with COF purchases processing.
- The account verification is processed in the Trustly service.
- The Trustly service sends the account verification result notification to the payment platform.
- The payment platform sends the account verification result callback to the web service.
- The customer receives the account verification result information from the web service.
- The ecommpay payment platform sends a callback with the result of COF purchases registration to the web service.
Request format for account verification
There are several things you need to consider when sending account verification requests by using the Trustly method:
- To initiate each account verification, send a separate POST request to the
/v2/payment/online-banking/trustly/account_verification
endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/account_verification. - Each request must include the following objects and parameters:
- Object
general
—general purchase information:project_id
—project identifier obtained from ecommpay during integrationpayment_id
—payment identifier unique within the projectsignature
—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 (the value must always be0
)currency
—payment currency code in the ISO-4217 alpha-3 format
- Object
customer
—customer information:id
—customer identifier unique within the projectip_address
—customer IP address relevant for the initiated payment
- Object
return_url
—contains the URLs to which customer is redirected during or after payment processing:success
—URL for redirecting a customer after a performed purchasedecline
—URL for redirecting a customer after a declined purchase
recurring_register
—sign of the need to register COF purchases. Value of the parameter should be truetrue
.recurring
—information about COF purchases:type
—COF purchases type (OneClick payments—C
, regular payments—R
, autopayments—U
)- Mandatory parameters for regular payments:
time
—time of the COF purchasesexpiry_year
—end of payment period, yearexpiry_month
—end of payment period, monthexpiry_day
—end of payment period, dayinterval
—interval between payments in the units of chosen periodamount
—amount of the COF purchaseperiod
—frequency of COF purchases (D
—every day,W
—every week,M
—every month,Q
—every quarter,Y
—every year)scheduled_payment_id
—identifier assigned to the payment within which scheduled debits are performed; it must differ from the identifier of the payment made to register a COF purchase and must be unique within the project;start_date
—date and time of the next COF purchase
- Object
- The currency of payment can only be one from the General information section.
- Additionally, any other parameters included in the specification can be used.
Thus, a correct account verification for COF purchase registration request by using the Trustly method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer and COF purchase information, URLs for redirection, as well as signature.
{ "general": { "project_id": 1625, "payment_id": "ID_1234567890001" }, "customer": { "id": "123", "ip_address": "192.0.2.0" }, "payment": { "amount": 0, "currency": "EUR" }, "recurring_register": true, "recurring": { "type": "U", "expiry_year": 2020, "expiry_month": 1 }, "return_url: { "success": "http://example.com/success", "decline": "http://example.com/decline" } }
{ "general": { "project_id": 1625, "payment_id": "ID_1234567890001" }, "customer": { "id": "123", "ip_address": "192.0.2.0" }, "payment": { "amount": 0, "currency": "EUR" }, "recurring_register": true, "recurring": { "type": "U", "expiry_year": 2020, "expiry_month": 1 }, "return_url: { "success": "http://example.com/success", "decline": "http://example.com/decline" } }
Callback format
{ "project_id": 1625, "payment": { "id": "ID_1234567890001852", "type": "account_verification", "status": "success", "date": "2019-09-17T07:19:03+0000", "method": "trustly", "sum": { "amount": 0, "currency": "EUR" }, "description": "Trustly account verification" }, "account": { "number": "1902377919" }, "customer": { "id": "123", "phone": "123456789" }, "operation": { "id": 4311000003631, "type": "account verification", "status": "success", "date": "2019-09-17T07:19:03+0000", "created_date": "2019-09-17T07:16:47+0000", "request_id": "482f8f5649984daa9e09a4e0dfa03170947b5fd842", "sum_initial": { "amount": 0, "currency": "EUR" }, "sum_converted": { "amount": 0, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "1212450138", "date": "2019-09-17T07:19:02+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "SkqaFkJww6bqUnh+4qslJyIRKnwlwKNGQqROpCrpOCNw==" }
{ "project_id": 1625, "payment": { "id": "ID_1234567890001", "type": "account_verification", "status": "success", "date": "2019-09-09T11:28:25+0000", "method": "trustly", "sum": { "amount": 0, "currency": "EUR" }, "description": "Trustly account verification" }, "account": { "number": "7840142519" }, "customer": { "id": "123", "phone": "40000000361" }, "recurring": { "id": 63374, "currency": "EUR", "valid_thru": "2035-01-31T00:00:00+0000" }, "operation": { "id": 6517218122349, "type": "account verification", "status": "success", "date": "2019-09-09T11:28:27+0000", "created_date": "2019-09-09T11:28:20+0000", "request_id": "482f8f5649984daa9e09a4e0dfa03170947b5fd842", "sum_initial": { "amount": 0, "currency": "EUR" }, "sum_converted": { "amount": 0, "currency": "EUR" }, "provider": { "id": 1407, "payment_id": "15680285012", "date": "2019-09-09T11:28:25+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "SkqaFkJww6bqUnh+4qsltDRmnwlwKNGQqROpCrpOCNw==" }
COF purchases registration during the initial payment
- callback about successful purchase
- repeated callback about successful purchase with information about registered COF purchases (usually on the next business day)
{ "project_id": 1625, "payment": { "id": "ID_1234567890000", "type": "purchase", "status": "success", "date": "2019-09-16T15:18:02+0000", "method": "trustly", "sum": { "amount": 100, "currency": "EUR" }, "description": "Trustly sale" }, "account": { "number": "1902377919" }, "customer": { "id": "123" }, "recurring": { "id": 1007592570, "currency": "EUR", "valid_thru": "2020-01-31T00:00:00+0000" }, "operation": { "id": 6841000003665, "type": "sale", "status": "success", "date": "2019-09-16T15:18:03+0000", "created_date": "2019-09-16T15:15:13+0000", "request_id": "khafkuasf575akhafykhaj0cd7absw", "sum_initial": { "amount": 100, "currency": "EUR" }, "sum_converted": { "amount": 100, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "1784257774", "date": "2019-09-16T15:18:02+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "ajfgtBiriazPCzp3Kj+Pso7V1FX4HYxNwZJ94Q==" }
OneClick payments processing
After successful registration of COF purchases, OneClick payments are performed without authorisation of the customer using the saved data. OneClick payments follow the following scheme.
- A customer initiates a purchase by using the Trustly method in the web service.
- The web service sends the request for processing the purchase by using Gate to the specified ecommpay URL.
- The payment platform receives the request.
- The payment platform validates the required parameters and signature in the request.
- The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
- The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Trustly service.
- The request is processed on the Trustly service side.
- The Trustly service sends the payment result notification to the payment platform.
- The payment platform sends the payment result callback to the web service.
- The customer receives the payment result information from the web service.
OneClick payment request format
There are several things you must consider when using OneClick payment requests in the Trustly method:
- To initiate each OneClick purchase, send a separate POST request to the
/v2/payment/online-banking/trustly/sale/saved
endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/sale/saved. - Each request must include the following objects and parameters:
- Object
general
—general purchase information:project_id
—project identifier obtained from ecommpay during integrationpayment_id
—payment identifier unique within the projectsignature
—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 unitcurrency
—payment currency code in the ISO-4217 alpha-3 format
- Object
customer
—customer information:id
—customer identifier unique within the projectip_address
—customer IP address relevant for the initiated payment
- Object
return_url
—contains the URLs to which customer is redirected during or after payment processing:success
—URL for redirecting a customer after a performed purchasedecline
—URL for redirecting a customer after a declined purchase
recurring_id
—COF purchase identifier
- Object
- The currency of payment can only be one from the General information section.
Thus, a correct OneClick purchase request by using the Trustly method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer identifier and IP address, URLs for redirection, COF purchase identifier, as well as signature.
{ "general": { "project_id": 1625, "payment_id": "ID_1568639174831" }, "customer": { "id": "123", "ip_address": "192.0.2.0" }, "payment": { "amount": 100, "currency": "EUR", "description": "Trustly one-click" }, "recurring": { "id": 62944 } }
{ "general": { "project_id": 1625, "payment_id": "ID_1568639174831" }, "customer": { "id": "123", "ip_address": "192.0.2.0" }, "payment": { "amount": 100, "currency": "EUR", "description": "Trustly one-click" }, "recurring": { "id": 62944 } }
Regular payments and autopayments request format
There are several things you must consider when using regular payments or autopayments requests in the Trustly method:
- To initiate each regular payment or autopayment, send a separate POST request to the
/v2/payment/online-banking/trustly/recurring
endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/recurring. - Each request must include the following objects and parameters:
- Object
general
—general purchase information:project_id
—project identifier obtained from ecommpay during integrationpayment_id
—payment identifier unique within the projectsignature
—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 unitcurrency
—payment currency code in the ISO-4217 alpha-3 format
- Object
customer
—customer information:id
—customer identifier unique within the projectip_address
—customer IP address relevant for the initiated payment
recurring_id
—COF purchase identifier
- Object
- The currency of payment can only be one from the General information section.
Thus, a correct regular payment or autopayment request by using the Trustly method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer identifier and IP address, URLs for redirection, COF purchase identifier, as well as signature.
{ "general": { "project_id": 1625, "payment_id": "ID_1568639174831" }, "customer": { "id": "123", "ip_address": "192.0.2.0" }, "payment": { "amount": 100, "currency": "EUR", "description": "Trustly recurring" }, "recurring": { "id": 1007592570 } }
{ "general": { "project_id": 1625, "payment_id": "ID_1568639174831" }, "customer": { "id": "123", "ip_address": "192.0.2.0" }, "payment": { "amount": 100, "currency": "EUR", "description": "Trustly recurring" }, "recurring": { "id": 1007592570 } }
Callback format
The Trustly method uses the standard format for callbacks to deliver OneClick purchase results. For more information, see Callbacks.
The following is the example of a callback with information about a 1.00 EUR
OneClick purchase made by the 123
customer in the 1625
project.
{ "project_id": 1625, "payment": { "id": "ID_1568639174831", "type": "recurring", "status": "success", "date": "2019-09-17T07:12:03+0000", "method": "trustly", "sum": { "amount": 100, "currency": "EUR" }, "description": "Trustly COF purchase" }, "customer": { "id": "123" }, "recurring": { "id": 1007592570, "currency": "EUR" }, "operation": { "id": 2110000003671, "type": "recurring", "status": "success", "date": "2019-09-17T07:12:03+0000", "created_date": "2019-09-17T07:10:02+0000", "request_id": "63088b14f83a0bb48882dedfe2cc7fa6aaff", "sum_initial": { "amount": 100, "currency": "EUR" }, "sum_converted": { "amount": 100, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "1562050323", "date": "2019-09-17T07:12:01+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "khgsuyriazPCzp3Kj+Pso7V1FNJvN9eTBEyl14X4HYxNwZJ94Q==" }
Useful links
The following articles can be useful when implementing purchases via Gate:
- Interaction concepts—about the interaction with the payment platform by using Gate.
- Signature generation and verification—about the procedure of generating and verifying signatures in requests and callbacks.
- Payment models and statuses—about the types, processing models, and possible statuses of supported payments and operations.
- Information of operations performing—about error and response codes that are used in the payment platform to record information about performing of operations.
Refunds by using Gate
General information
To perform a refund through Gate by using the Trustly method, send a request with all required parameters and signature to the ecommpay URL and receive a callback with the result. The full sequence and special aspects of refund performing are provided below.
- A customer initiates a refund.
- The web service sends the request for performing the refund by using Gate to the specified ecommpay URL.
- The payment platform receives the request.
- The payment platform validates the required parameters and signature in the request.
- The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
- The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Trustly service.
- The refund is processed on the side of the Trustly service.
- The Trustly service sends the result notification to the payment platform.
- The payment platform sends the result callback to the web service.
- The customer receives the refund result information from the web service.
Information about the formats of requests and callbacks used for performing refunds by using the Trustly 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 refund requests by using the Trustly method:
- To initiate each refund, send a separate POST request to the
/v2/payment/online-banking/trustly/refund
endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/refund. - Each request must include the following objects and parameters:
- Object
general
—general refund information:project_id
—project identifier obtained from ecommpay during integrationpayment_id
—identifier of the payment that needs to be refundedpayment identifiersignature
—request signature generated after all required parameters are specified (details—in the Signature generation and verification)
- Object
payment
—refund information:description
—refund description or commentamount
—refund amount in the smallest currency unit (required for a partial refund)currency
—refund currency code in the ISO-4217 alpha-3 format (required for a partial refund)
- Object
customer
—customer information:ip_address
—customer IP address relevant for the initiated refund
- Object
- Additionally, any other parameters included in the specification can be used.
Thus, a correct refund request by using the Trustly method must contain the project and payment identifiers, description of the refund, the customer IP address, signature, and, if necessary, currency code and refund amount.
{ "general": { "project_id": 210, "payment_id": "test_payment", "signature": "PJkV8ej\/UG0Di8hTng6JvipTv+AWoXW\/9MTO8yJA==" }, "payment": { "description": "test refund", "amount": 1000, "currency": "EUR" }, "customer": { "ip_address": "192.0.2.0" } }
{ "general": { "project_id": 210, "payment_id": "test_payment", "signature": "PJkV8ej\/UG0Di8hTng6JvipTv+AWoXW\/9MTO8yJA==" }, "payment": { "description": "test refund", "amount": 1000, "currency": "EUR" }, "customer": { "ip_address": "192.0.2.0" } }
Callback format
The Trustly method uses the standard format for callbacks to deliver refund results. For more information, see Callbacks.
The following is the example of a callback with information about a refund made for the 1902377919
account of the 125
customer in the 1625
project.
{
"project_id": 1625,
"payment": {
"id": "ID_1234567890000",
"type": "purchase",
"status": "partially refunded",
"date": "2019-09-18T12:25:39+0000",
"method": "trustly",
"sum": {
"amount": 500,
"currency": "EUR"
},
"description": "test payment"
},
"account": {
"number": "1902377919"
},
"customer": {
"id": "123"
},
"operation": {
"id": 6841000003971,
"type": "refund",
"status": "success",
"date": "2019-09-18T12:25:39+0000",
"created_date": "2019-09-18T12:25:36+0000",
"request_id": "719ecb2f23f3d482fabb0c5994700fb36b020735ba3c2ae",
"sum_initial": {
"amount": 500,
"currency": "EUR"
},
"sum_converted": {
"amount": 500,
"currency": "EUR"
},
"provider": {
"id": 1322,
"payment_id": "1784257774",
"date": "2019-09-18T12:25:37+0000",
"auth_code": ""
},
"code": "0",
"message": "Success"
},
"signature": "xCafDfCf+h8/5+SB+o6vUQDVS7+C11AtFi+nDhLMcYMzA=="
}
The following is the example of a callback with information about a declined refund.
{
"project_id": 1625,
"payment": {
"id": "ID_1234567890000",
"type": "purchase",
"status": "success",
"date": "2019-09-18T12:25:39+0000",
"method": "trustly",
"sum": {
"amount": 500,
"currency": "EUR"
},
"description": "test payment"
},
"account": {
"number": "1902377919"
},
"customer": {
"id": "123"
},
"operation": {
"id": 6841000003971,
"type": "refund",
"status": "decline",
"date": "2019-09-18T12:25:39+0000",
"created_date": "2019-09-18T12:25:36+0000",
"request_id": "719ecb2f23f3d482fabb0c5994700fb36b020735ba3c2ae",
"sum_initial": {
"amount": 500,
"currency": "EUR"
},
"sum_converted": {
"amount": 500,
"currency": "EUR"
},
"provider": {
"id": 1322,
"payment_id": "1784257774",
"date": "2019-09-18T12:25:37+0000",
"auth_code": ""
},
"code": "20106",
"message": "Customer account is no longer available"
},
"signature": "xCafDfCf+h8/5+SB+o6vUQDVS7hOTwnZxttFi+nDhLMcYMzA=="
}
Useful links
The following articles can be useful when implementing refunds via Gate:
- Interaction concepts—about the interaction with the payment platform by using Gate.
- Signature generation and verification—about the procedure of generating and verifying signatures in requests and callbacks.
- Payment models and statuses—about the types, processing models, and possible statuses of supported payments and operations.
- Purchase refunds—about performing of refunds by using Gate.
- Information of operations performing—about error and response codes that are used in the payment platform to record information about performing of operations.
Payouts by using Gate
General information
To process a payout through Gate by using the Trustly method, send a request with all required parameters and signature to the ecommpay URL and receive a callback with the result. The full sequence and special aspects of payout processing are provided below.
- A customer initiates a payout by using the Trustly method in the web service.
- The web service sends the request for processing the payout by using Gate to the specified ecommpay URL.
- The payment platform receives the request.
- The payment platform validates the required parameters and signature in the request.
- The payment platform sends the response to the web service with information about the receipt of the request and its validity (details).
- The payment platform performs further processing of the request (with parameter consistency check) and sends it to the Trustly service.
- The payout is processed on the side of the Trustly service.
- The Trustly service sends the result notification to the payment platform.
- The payment platform sends the result callback to the web service.
- The customer receives the payout result information from the web service.
If the Trustly service assign the payout the success
status but for some reason customer account cannot be credited, a reversal of the payout is initiated within the payment platform after receiving a callback with information about crediting failure. In this case, the web service is required to accept payout reversal callback. For more information about the format of such callback, see Callback format.
The sections that follow discuss in more details the request format and the Gate parameters to use in the Trustly payment method and provide the information on the format of callbacks with payout results.
Request format
There are several things you need to consider when sending payout requests by using the Trustly method:
- To initiate each payout send a separate POST request to the
/v2/payment/online-banking/trustly/payout
endpoint. This endpoint belongs to the group /v2/payment/online-banking/{payment_method}/payout. - Each request must include the following objects and parameters:
- Object
general
—general payout information:project_id
—project identifier obtained from ecommpay during integrationpayment_id
—payment identifier unique within the projectsignature
—request signature generated after all required parameters are specified (details—in the Signature generation and verification) details
- Object
payment
—payment information:amount
—payout amount in the smallest currency unitcurrency
—payout currency code in the ISO-4217 alpha-3 format
- Object
customer
—customer information:id
—customer identifier unique within the projectip_address
—customer IP address relevant for the initiated payoutfirst_name
—customer first namelast_name
—customer last name
- Object
account
—recepient bank account information:number
—account numberclearinghouse
—the registration country of the interbank clearing center used by the bank of the account holder. For allowed list of values, see Figure 32bank_code
—international bank identifier (BIC or SWIFT) or a specific code used by the interbank clearing center registered in some countries indicated in Figure 32 (in such cases the value of the parameter is determined by a regular expression)
The allowed values of the
bank_code
andnumber
parameters depend on the value of theclearinghouse
parameter. The value of thenumber
parameter is determined by regular expressions corresponding to the specified value of theclearinghouse
parameter. The value of thebank_code
parameter is determined by a regular expression only when it is not necessary to indicate a BIC or SWIFT code in its value, in other cases the value is not determined by a regular expression (the corresponding table cells are left blank).Figure 32. Matching of parameter values clearinghouse
bank_code
number
AUSTRIA ^AT[0-9]{18}$ BELGIUM ^BE[0-9]{14}$ BULGARIA ^BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}$ CROATIA ^HR[0-9]{2}[0-9]{7}[0-9]{10}$ CYPRUS ^CY[0-9]{10}[0-9A-Z]{16}$ CZECH_REPUBLIC ^[0-9]{4}$ ^[0-9]{16}$ DENMARK ^[0-9]{4}$ ^[0-9]{4,10}$ ESTONIA ^[0-9]{2}$ ^[0-9]{4,14}$ FINLAND ^FI[0-9]{16}$ FRANCE ^FR[0-9]{12}[0-9A-Z]{11}[0-9]{2}$ GERMANY ^DE[0-9]{20}$ GREECE ^GR[0-9]{25}$ HUNGARY ^[0-9]{8}$ ^[0-9]{24}$ IRELAND ^IE[0-9]{2}[A-Z]{4}[0-9]{14}$ ITALY ^IT[0-9]{2}[A-Z][0-9]{10}[0-9A-Z]{12}$ LATVIA ^LV[0-9]{2}[A-Z]{4}[0-9A-Z]{13}$ LITHUANIA ^LT[0-9]{18}$ LUXEMBOURG ^LU[0-9]{18}$ MALTA ^MT[0-9]{2}[A-Z]{4}[0-9]{5}[0-9A-Z]{18}$ NETHERLANDS ^NL[0-9]{2}[A-Z]{4}[0-9]{10}$ NORWAY ^[0-9]{4}$ ^[0-9]{7}$ POLAND ^PL[0-9]{26}$ PORTUGAL ^[0-9]{8}$ ^[0-9]{13}$ ROMANIA ^RO[0-9]{2}[A-Z]{4}[0-9A-Z]{16}$ SLOVAKIA ^SK[0-9]{22}$ SLOVENIA ^SI56[0-9]{15}$ SPAIN ^ES[0-9]{22}$ SWEDEN ^[0-9]{4,5}$ ^[0-9]{1,15}$ UNITED_KINGDOM ^[0-9]{6}$ ^[0-9]{8}$
- Object
- Merchants providing services related to money transfers to e-wallets or to other credit organisations, when the sender is not a merchant, but a third party, must specify the sender's data in the
additional_data.sender
object:party_type
—sender type "PERSON" or "ORGANISATION",first_name
—name of the sender or organisationlast_name
—last name of the sender ornull
for organisationaddress
—the full address (except country)country
— sender country in the ISO 3166-1 alpha-2 format
- The currency of payment can only be one from the General information section.
- Additionally, any other parameters included in the specification can be used.
Thus, a correct payout request by using the Trustly method must contain the project identifier, basic payment information (identifier, amount, and currency code), customer and account information, as well as signature.
{ "general": { "project_id": 112, "payment_id": "ECT_TEST_156" }, "payment": { "amount": 100, "currency": "EUR", "description": "Trustly account payout" }, "customer": { "id": "123", "first_name": "Ada", "last_name": "Lovelace", "ip_address": "192.0.2.0" }, "account": { "clearinghouse": "SWEDEN", "bank_code": "1234", "number": "21312" } }
{ "general": { "project_id": 112, "payment_id": "ECT_TEST_156" }, "payment": { "amount": 100, "currency": "EUR", "description": "Trustly account payout" }, "customer": { "id": "123", "first_name": "Ada", "last_name": "Lovelace", "ip_address": "192.0.2.0" }, "account": { "clearinghouse": "SWEDEN", "bank_code": "1234", "number": "21312" } }
Callback format
The Trustly method uses the standard format for callbacks to deliver payout results. For more information, see Callbacks.
The following is the example of a callback with information about a 50.00 EUR
payout made for the 123
customer in the 1625
project.
{ "project_id": 1625, "payment": { "id": "ECT_TEST_1568711984262232", "type": "payout", "status": "success", "date": "2019-09-18T07:18:03+0000", "method": "trustly", "sum": { "amount": 5000, "currency": "EUR" }, "description": "Trustly payout" }, "account": { "number": "1902377919" }, "customer": { "id": "123" }, "operation": { "id": 20988000004401, "type": "payout", "status": "success", "date": "2019-09-18T07:18:03+0000", "created_date": "2019-09-18T07:12:38+0000", "request_id": "821d7c5b4d08587252da9834ab50590d8d4d976d26801a", "sum_initial": { "amount": 5000, "currency": "EUR" }, "sum_converted": { "amount": 5000, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "3063307773", "date": "2019-09-18T07:13:03+0000", "auth_code": "" }, "code": "0", "message": "Success" }, "signature": "fKyx/vYDhDNxQ0myVETvkXfj7r+4Z1lcEp/7dbL4ip+==" }
The following is the example of a callback with information about a payout declined due to insufficient funds on merchant balance.
{ "project_id": 1625, "payment": { "id": "ECT_TEST_1568711984262232", "type": "payout", "status": "decline", "date": "2019-09-18T07:18:03+0000", "method": "trustly", "sum": { "amount": 5000, "currency": "EUR" }, "description": "Trustly payout" }, "account": { "number": "1902377919" }, "customer": { "id": "123" }, "operation": { "id": 20988000004401, "type": "payout", "status": "decline", "date": "2019-09-18T07:18:03+0000", "created_date": "2019-09-18T07:12:38+0000", "request_id": "821d7c5b4d08587252da9834ab50590d8d4d976d26801a", "sum_initial": { "amount": 5000, "currency": "EUR" }, "sum_converted": { "amount": 5000, "currency": "EUR" }, "provider": { "id": 1322, "payment_id": "3063307773", "date": "2019-09-18T07:13:03+0000", "auth_code": "" }, "code": "3028", "message": "Insufficient funds on merchant balance" }, "signature": "jfhgfvYDhDNxQ0myVETvkXfj7r+4Z1lcEp/7dbOSgr5CXprwe8LPw==" }
The following is the example of a callback with information about a payout reversed because the bank rejected the payout.
{ "customer": { "id": "123999" }, "account": { "number": "20227678" }, "project_id": 10801, "payment": { "id": "16042021_002", "type": "payout", "status": "reversed", "date": "2021-04-16T14:41:57+0000", "method": "trustly", "sum": { "amount": 100, "currency": "EUR" }, "description": "Trustly Payout" }, "operation": { "id": 13858010014811, "type": "payout reversal", "status": "success", "date": "2021-04-16T14:41:57+0000", "created_date": "2021-04-16T14:41:57+0000", "request_id": "153cb9c8b675-9c397f2dbec1bc-00013859", "sum_initial": { "amount": 100, "currency": "EUR" }, "sum_converted": { "amount": 100, "currency": "EUR" }, "code": "0", "message": "Success", "provider": { "id": 1322, "payment_id": "6777981238" } }, "signature": "S3Hc3cND9GVS1zITz/UVEE8ZEVWqEw==" } }
Useful links
The following articles can be useful when implementing payouts via Gate:
- Interaction concepts—about the interaction with the payment platform by using Gate.
- Signature generation and verification—about the procedure of generating and verifying signatures in requests and callbacks.
- Payment models and statuses—about the types, processing models, and possible statuses of supported payments and operations.
- Payouts—about processing of payouts by using Gate.
- Information of operations performing—about error and response codes that are used in the payment platform to record information about performing of operations.
Analysis of payments results
To analyse information about payments made with the Trustly 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.