Skip to main content

S2S APM Overview

This page describes the integration procedures for the Payment Platform used by e-commerce merchants.

APM Payment flow

The S2S APM payment flow is shown below.

Integration process

The Payment Platform implements acquiring payments (purchases) using a specific API interaction.

Client Registration

Provide the following data to your account administrator in order to get an account and access the Payment Platform:

DataDescription
notification_urlURL which will be receiving the notifications of the processing results of your request to the Payment Platform
Contact e-mailMerchant's contact email
IP ListList of your IP addresses, from which requests to the Payment Platform will be sent.
tip

The system returns an OK string for all POST requests at the callback URL when you have successfully provided the data. Otherwise, the response will have an ERROR message.

Receive the following information from your administrator to begin working with the Payment Platform:

ParameterDescription
CLIENT_KEYUnique key to identify the account in the Payment Platform (used as request parameter). In the administration platform this parameter corresponds to the "Merchant key" field
PASSWORDPassword for Client authentication in the Payment Platform (used for calculating hash parameter). In the administration platform this parameter corresponds to the "Password" field
PAYMENT_URLURL to request the Payment

Redirects

There are two possible approaches for implementing the redirect when:

  • The required method is GET
  • redirect_url contains query parameters such as redirect_url=https://example.domain.com/?parameter=1

Option 1 Redirect the customer by sending query parameters within the form inputs

Parse the query parameters from the redirect_url and pass them as input elements in an HTML form:

Example:

<form action="https://example.domain.com" method="GET">
<input name="parameter" value="1">
<input type="submit" value="Go">
</form>

Option 2: Redirect Using JavaScript

Use JavaScript to redirect the customer to the specified redirect_url with the query parameters:

Example:

document.location = 'https://example.domain.com/?parameter=1';

Redirect with memory storage

When enabled in Configuration > Protocol Mappings, Payment Platform stores the redirect data server-side and returns a simple GET URL instead of a full set of redirect parameters. When the customer's browser follows that URL, Payment Platform's wrapper endpoint:

  1. Retrieves the stored redirect data from memory storage.
  2. Builds the required POST form automatically.
  3. Renders and submits the form to the destination (3DS page, alternative payment method provider, etc.).

Use this option when you want to minimize the merchant-side redirect implementation. Advantages:

  • Minimal integration effort (no form-building logic on the merchant side).
  • Improved security (sensitive redirect parameters are not exposed in the URL or page source).
  • No URL length limits (large redirect payloads are stored server-side).
  • Fewer integration errors (Payment Platform handles form encoding and submission).

Contact your account manager to enable memory storage redirects for your account.

URL blocking

Notification URLs may be temporarily blocked due to consistently receiving timeouts in response to the callback.

If five timeouts accumulate within five minutes for a merchant’s notification URL, it will be blocked for 15 minutes. During this block, all merchants associated with the URL will not receive notifications.

info

The blocking automatically lifts after 15 minutes.

Additionally, it is possible to manually unblock the URL through the admin panel by navigating to Configuration → Merchants → Edit Merchant. In this case, the block will be removed immediately.

The timeout counter resets if a callback response is successfully processed. For instance, if there are four timeouts within five minutes but a successful response on the sixth minute, the counter resets.

Protocol Mapping

Verifiy that your protocol mapping meets requirements before using the S2S integration. This is done via your Admin.

warning

You cannot make payments if the S2S APM protocol is not mapped.

Payment Platform Interaction

Send the server to server HTTPS POST request to the Payment Platform URL (PAYMENT_URL) in all transactions.

In response, the Payment Platform will return the JSON encoded string.

Transactions requests

Possible actions

When you make request to the Payment Platform, you need to specify action that needs to be done. Possible actions are:

ActionDescription
SALECreates a SALE transaction
CREDITVOIDCreates a REFUND transaction
VOIDCreates a VOID transaction
CREDIT2VIRTUALCreates a CREDIT2VIRTUAL transaction
CREDIT2CRYPTOCreates a CREDIT transaction
DEBIT2VIRTUALCreates a DEBIT transaction as a part of transfer flow
GET_TRANS_STATUSGets the status of a transaction in the Payment Platform

Possible transaction results and statuses

Result - value that system returns on request.

ResultDescription
SUCCESSAction was successfully completed in the Payment Platform
DECLINEDResult of unsuccessful action in the Payment Platform
REDIRECTAdditional action required from requester
ACCEPTEDAction was accepted by the Payment Platform, but will be completed later
INITAdditional action required from customer, final status will be sent in callback
ERRORRequest has errors and was not validated by the Payment Platform

Status - actual status of transaction in the Payment Platform.

StatusDescriptionFinal
PREPAREStatus is undetermined, final status will be sent in callbackno
REDIRECTThe transaction awaits SALEno
PENDINGThe payment has been initiated and additional actions are required from customerno
SETTLEDSuccessful transactionyes
VOIDTransaction for which void was madeyes
REFUNDTransaction for which refund was madeyes
DECLINEDNot successful transactionyes
How to recognize the final status

SETTLED, VOID, REFUND, and DECLINED are final: processing is complete and the status will not change on its own. PREPARE, REDIRECT, and PENDING are intermediary: the transaction is still in progress, and the final status arrives in the callback. Rely on the callback as the source of truth.

Callback Events

Callbacks are sent with the following content type: application/x-www-form-urlencoded

After creating transaction, you will receive callbacks with the following statuses:

TransactionStatus
SALE, CREDITVOID, DEBITSUCCESS, FAIL, WAITING, UNDEFINED, PREPARE
VOID, CREDIT2VIRTUALSUCCESS, FAIL, UNDEFINED

Postman collection

Download the collection file below, then import it in Postman: File > Import > Upload Files and select the downloaded .json file.

Errors

In case error you get synchronous response from the Payment Platform:

ParameterDescription
resultERROR
error_messageError message

Testing

You can make test requests using data below. Please note, that all transactions will be processed using Test engine.

Customer's emailTesting / Result
[email protected]Email for testing successful sales.
Response on successful SALE request:
{action: SALE, result: SUCCESS, status: SETTLED}
[email protected]Email for testing unsuccessful sales.
Response on unsuccessful SALE request:
{action: SALE, result: DECLINED, status: DECLINED}