Payment Request

To initiate a payment, you should send the following request:

POST /acquiring/{paymentSystem}/pay

where {paymentSystem} can be applepay, googlepay, or samsungpay.


Request Parameters

ParameterRequiredTypeDescriptionExample
orderidYesStringUnique transaction identifier within Partner's system123456789
goodphoneYesStringPartner's ID. Unique for each mobile operator, assigned during onboarding1001
ctnYesStringMobile phone number of the User from which the payment is made79012345678
smstextYesStringFormat of parameter values: <Partner's Shop prefix> <space> <User's account number/Partner's transaction ID> <space> <Amount to be paid>, where <Partner's Shop prefix> is provided.1001 123456789 300.00
dtYesStringRequest date and time in yyyyMMddHHmmss format2024070123301
url_successYesStringURL for User redirect after successful paymenthttps://google.com/success
url_failYesStringURL for User redirect after unsuccessful paymenthttps://google.com/fail
callback_urlNoStringCustom callback URLhttps://some.partner.system/callback
controlYesStringControl signature. MD5-hash ( orderid + goodphone + ctn + smstext + dt + SecretKey), where "+" is concatenation sign36a02d89974fd0efa9d7bc8036d8983c
requestNoStringRequest type. Available values: check, pay, get-status-
receiver_fioNoStringUser's full name. Only Latin characters and spaces are allowedTest Testov
currencyNoStringPayment currency, ISO 4217 Alpha 3EUR
payer_countryNoStringUser's country of residence, ISO 3166-1-Alpha 2PL
payer_commisNoDecimalUser's payment fee (if applicable)1.50
detailsofpaymentNoStringPayment description/detailsSome description
client_ipNoStringUser's IP address. Format: IPv4 / IPv691.19.8.17
emailNoStringUser's e-mail address[email protected]
merchant_siteNoStringPartner Shop website, where payment takes placehttps://123abc.org

Some optional parameters may need to be included, depending on your specific configuration. To obtain a list of mandatory parameters for your account, please contact technical support.

The system verifies the validity and correctness of the control signature in the incoming request. If the request is incorrect, the system will respond with HTTP Status 400. In the case of a validation error, the response will be HTTP Status 401.

If the request parameter value is set to check or get-status, the response will return the current transaction status. If the request parameter value is set to pay, is empty, or has any other value, the response will include a payment link.



Example of a Payment Request

POST
{{url_system}}/acquiring/{paymentSystem}/pay

HEADERS
Content-Type: application/x-www-form-urlencoded

BODY

{
  "orderid": "123456789",
  "goodphone": "1001",
  "ctn": "79012345678",
  "smstext": "1001 123456789 300.00",
  "dt": "20240701123301",
  "control": "36a02d89974fd0efa9d7bc8036d8983c",
  "merchant_site": "https://123abc.org"
}

Where the control value is generated using SecretKey = Qwerty123

Signature generation string:
1234567891001790123456781001 123456789 300.0020240701123301Qwerty123

The system responds in XML format, with UTF-8 encoding:
Content-Type: application/xml


Successful Response Example

<response>
    <result>OK</result>
    <txnid>20004410</txnid>
    <url>https://{{url_system}}/user/url/Z2Rlc1A2aU85OVQ0N3NtajdIK2VqLzdQMGtONEp0MXpzQ1czUHh0h4Nm9YaHQ3ZVBIQjNCSHJHNjNHpMTQ</url>
</response> 

Unsuccessful Response Example

<response>
    <errorCode>1</errorCode>
    <txnid>20004410</txnid>
    <description>Something went wrong, please try again or contact support</description>
    <paymentStatus>PAY_FAIL</paymentStatus>
</response> 

In the event of a repeated request with request=pay or if the request parameter is absent, the system will generate the following response:

<response>
    <errorCode>9712</errorCode>
    <description>Operation 123456789 already exists</description>
    <paymentStatus>DUPLICATE TRANSACTION</paymentStatus>
</response>


A List of Main Possible Errors and Their Descriptions

errorCodepaymentStatusDescription
9712DUPLICATE TRANSACTIONOperation %s already exists
9713INVALID PROVIDERUnable to determine the provider
9714PROCESSING ERRORTemporary error, please try again later
9714PROCESSING ERRORPayment amount is less than allowed!
9714PROCESSING ERRORPayment amount is more than allowed!
9908ORDER NOT FOUNDOperation %s not found

Parameters Description

  • Result=OK: Indicates successful transaction initialization. If initialization fails, an errorCode will be provided.
  • txnid: A unique request identifier within the system (required for Result=OK).
  • url: The URL of the payment form to which the user will be redirected (required for Result=OK).

After the user follows the redirect URL and confirms the payment, the system sends a callback request to the partner containing the transaction status. The user will be redirected to one of the URLs provided by the partner in the initial request: either url_success or url_fail, depending on the payment result.


Callback Example

POST {{partner_url_for_notification}}?
id=20476210
&phone=79012345678
&result=1
&cmd=status
&control=15727abca9b3b1eccf69672aa708f04b

Callback Parameters

ParameterRequiredTypeDescription
idYesStringUnique transaction ID within the partner's system
phoneYesStringUser's phone number used during payment
resultYesIntegerResult code:

- 0: Successful operation

- 1: Error

- 2: Awaiting user input
cmdYesStringstatus for one-stage payments; cancel or confirm for two-stage payments
controlYesStringControl signature, MD5-hash generated as id + phone + result + SecretKey, where "+" is concatenation and SecretKey is the partner's secret key.

Callback Response

In response to an HTTP request, the partner should provide a response in XML format with UTF-8 encoding. The Content-Type can be set to either text/plain or application/xml.

<response>
         <result>0</result>
         <description>success</description>
</response> 

Callback Response Parameters

ParameterRequiredTypeDescription
resultYesIntegerCode representing the result of the request processing. Possible values:

- 0: Request successfully accepted by the partner.

- 1: Temporary request processing error (request should be resent later), callback request will be retried.

- 2: Permanent request processing error (e.g., incorrect request parameters), callback request will not be retried.
descriptionNoStringOptional description of the request processing result.