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
Parameter | Required | Type | Description | Example |
---|---|---|---|---|
orderid | Yes | String | Unique transaction identifier within Partner's system | 123456789 |
goodphone | Yes | String | Partner's ID. Unique for each mobile operator, assigned during onboarding | 1001 |
ctn | Yes | String | Mobile phone number of the User from which the payment is made | 79012345678 |
smstext | Yes | String | Format 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 |
dt | Yes | String | Request date and time in yyyyMMddHHmmss format | 2024070123301 |
url_success | Yes | String | URL for User redirect after successful payment | https://google.com/success |
url_fail | Yes | String | URL for User redirect after unsuccessful payment | https://google.com/fail |
callback_url | No | String | Custom callback URL | https://some.partner.system/callback |
control | Yes | String | Control signature. MD5-hash ( orderid + goodphone + ctn + smstext + dt + SecretKey ), where "+" is concatenation sign | 36a02d89974fd0efa9d7bc8036d8983c |
request | No | String | Request type. Available values: check , pay , get-status | - |
receiver_fio | No | String | User's full name. Only Latin characters and spaces are allowed | Test Testov |
currency | No | String | Payment currency, ISO 4217 Alpha 3 | EUR |
payer_country | No | String | User's country of residence, ISO 3166-1-Alpha 2 | PL |
payer_commis | No | Decimal | User's payment fee (if applicable) | 1.50 |
detailsofpayment | No | String | Payment description/details | Some description |
client_ip | No | String | User's IP address. Format: IPv4 / IPv6 | 91.19.8.17 |
No | String | User's e-mail address | [email protected] | |
merchant_site | No | String | Partner Shop website, where payment takes place | https://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 tocheck
orget-status
, the response will return the current transaction status. If therequest
parameter value is set topay
, 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
errorCode | paymentStatus | Description |
---|---|---|
9712 | DUPLICATE TRANSACTION | Operation %s already exists |
9713 | INVALID PROVIDER | Unable to determine the provider |
9714 | PROCESSING ERROR | Temporary error, please try again later |
9714 | PROCESSING ERROR | Payment amount is less than allowed! |
9714 | PROCESSING ERROR | Payment amount is more than allowed! |
9908 | ORDER NOT FOUND | Operation %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
Parameter | Required | Type | Description |
---|---|---|---|
id | Yes | String | Unique transaction ID within the partner's system |
phone | Yes | String | User's phone number used during payment |
result | Yes | Integer | Result code: - 0 : Successful operation- 1 : Error- 2 : Awaiting user input |
cmd | Yes | String | status for one-stage payments; cancel or confirm for two-stage payments |
control | Yes | String | Control 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
Parameter | Required | Type | Description |
---|---|---|---|
result | Yes | Integer | Code 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. |
description | No | String | Optional description of the request processing result. |
Updated about 1 month ago