Ваш Браузер устарел или не поддерживается нашим сайтом, пожалуйста установите обновленный Internet Explorer или скачайте Google Chrome, FireFox что бы продолжить просмотр сайта.
Merchant API
1.4
OAS3
The API interface is used to make payment on products of the Beeline catalog. The REST API works over the HTTP protocol and is a set of methods by which requests are made and responses are returned for each operation. All responses come in the form of JSON structures.
To work with the API, get API-name и API-password from administrators
Note: Currently, the API is under development, methods and parameters are subject to change. On the possibility of testing the integration will be announced.
Use of protocols:
Work algorithm
1. The merchant performs a request to get the product catalog - the get-products method. The method is optional; the Merchant can manually assign identifiers to its products that correspond to the catalog.
2. The user selects the product on the Merchant portal and wants to pay using the mobile phone balance.
3. The merchant performs a request to create a payment - the create-payment method.
4. The platform performs the necessary actions (limits, calculation of commissions, etc.) and responds to the Merchant.
5. The merchant displays to the user the necessary information from paragraph 3 (commission, total amount).
5.1. If you need to confirm payment using OTP (the create-payment method returned the parameterotpConfirm = true) - the Merchant displays the OTP input field (5 digits) to the user.
5.2. The user may request to resend the OTP. To do this, the Merchant displays the button "Send OTP again" to the user - a call to the resend-otp method.
5.2.1. If the resend-otp method returns the parametercanResend = false - the user has exceeded the SMS sending limit, the OTP resubmission should be unavailable (for example, the button is inactive).
6. The user enters the OTP (if necessary) and agrees with the payment (for example, the button "Confirm") - call the method confirm-payment
6.1. If the user does not agree with the payment (for example, clicks the "Cancel" button), you must call the cancel-payment method. In this case, the operation in the Platform will be canceled.
7. The platform performs the necessary checks and transactions and responds to the Merchant, passing checks on the transaction.
7.1. If you haven't received the response or there is some error please check the operation status using the check-operation-status method.
8. Merchant can display checks to the user.
** If you need to make a refund (cancel the operation), you must call the refund-payment method. If the transaction is successful, the funds will be returned to the user's balance.
*** To get the history of operations by user, the Merchant should call the get-payment-history method. For example, to display the history of operations in the user's personal account or for their internal needs.
**** To receive checks for a particular operation, the Merchant must call the get-receipts method.
Preparing requests:
For each request must be formed a digital signature. To create a signature, you must use the encryption algorithm HMAC-SHA256.
# PHP signature generation example:
$password = \'328378273892\';
$data = \'{\"example\":222,\"desc\":\"some text\"}\';
$sign = hash_hmac(\'sha256\', $data, $password);
Possible error codes (errorCode, errorMessage). Codes can be added during the development process.
Authorization
11001 Authorization parameters not set
11002 API with that name not found
11003 Invalid request signature
11004 System error during authorization
11005 API calls limit per minute exceeded
11006 API inactive
11007 Incorrect header Content-Type. It must be application/json
12008 Service under this api is not available
Payments
12001 Required parameter is missing in the request
12002 Invalid parameter type in request
12003 A system error occurred due to incorrect request data.
12004 The timestampEnd parameter must be greater than the timestampStart parameter
12005 In the amount parameter no more than 2 characters are allowed after the separator
12006 The amount parameter must be greater than zero.
12007 Phone number must begin with 7
12009 A payment with this merchantOrderId has already been created
12014 Incorrect channel name
13001 Agent is inactive
13002 Merchant is inactive
13003 Subscriber is inactive
13004 The payment provider must have an agent
14001 Merchant wallet is inactive
14002 Agent wallet is inactive
14003 Client wallet is inactive
15001 Product catalog category is inactive
15002 Product not found
15003 Product not available
15004 Product not available for payment provider
16001 Product not available for this Account Type
16002 The product is not available for this tariff plan.
17001 Insufficient funds on agent wallet
17002 Insufficient funds on the operator’s wallet
18001 The amount of merchant fees exceeds the amount of the transaction. Commission templates are not configured correctly.
18002 Unable to make a payment. Commission settings have been changed
18003 Amount of partial reversal greater then amount of original operation
19001 Failed to send SMS for confirmation request from the client
19002 Could not send SMS with OTP code
20001 Merchant's product availability check failed
20002 Merchant api receiver with ID {receiverId} not found
21001 Payment with this ID not found
21002 Payment with this ID not found
21003 Payment with this ID not found
21004 Payment with this ID not found
21011 Operation {id} is in the refund process now. Refund operation id: {refund_id}
22001 Invalid OTP
23001 CDB is not available
23002 CDB System Error
23003 Phone number not found
23004 CDB. User is not active
23005 Error. Your payment was canceled. For the payment availability from the balance it is important to spend at least {value} tenge on communication services
24001 MFS did not response in timeout
24002 MFS not available
24003 MFS payment failed
25001 Merchant product purchase confirmation failed
25002 Merchant product purchase failed on the merchant's side
25003 Payment rejected by Merchant
25004 Insufficient balance on the merchant's side
25005 Refund payment on the merchant's side
25006 Payment not found on the merchant's side
26001 System error during confirmation of purchase
27001 Failed to confirm purchase from merchant
28001 Payment cannot be canceled. Payment is already processed or already processed
29001 Unable to get checks. The operation is not in the status of "completed" and "reversed"
40001 Service provider is not available
40002 Service-provider. Check parameters failed.
40003 Subscriber don’t have Simply wallet.
40004 Simply payment provider not found.
40005 SIMPLY System Error.
40006 Return of the operation is prohibited.
30001 Subscriber data error
AML
Error code 2XYZ
X - where is the limit
- 0 wallets limit
- 1 user limit
- 2 limit by category
- 3 product limit
Y - operation
- 0 output template
- 1 input template
Z - Limit type
- 0 minimum amount limit
- 1 maximum amount limit
- 2 daily turnover limit
- 3 weekly turnover limit
- 4 monthly turnover limit
- 5 annual turnover limit
- 6 limit on the number of transactions per day
- 7 limit on the number of transactions per week
- 8 limit on the number of transactions per month
- 9 limit on the number of transactions per year
Servers
https://{domain}/merchant-api/v1
Methods for working with the product catalog
POST/get-products
Getting product catalog
The directory structure is provided for convenience and is not required when displaying products on the trading floor. To perform further financial transactions with products, you must use the product’s id.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"is_active": true
}
Code |
Description |
Links |
200 |
Product catalog application/json Controls Accept header.
{ "status": "ok", "categories": [ { "categoryId": 1, "categoryName": "Category name 1", "parentId": 0 } ], "products": [ { "id": 1, "name": "Product 1", "categoryId": 1, "isOwnProduct": false } ] } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/get-details
Getting fee pattern values
The method getting the value of the commission template by product id.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"productId": 123
}
Code |
Description |
Links |
200 |
Product catalog application/json Controls Accept header.
{ "status": "ok", "commission": [ { "percent": 1, "fixed": 1, "minValue": 1, "maxValue": 1, "minTransactionAmount": 1, "maxTransactionAmount": 1 } ] } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Methods for performing financial transactions
POST/create-payment
Create a product payment
Returns the identifier of the created payment, the amount of the commission, the total amount to be paid and the sign otpConfirm (true - OTP was sent to the client for payment confirmation, false - no confirmation via OTP is required). If otpConfirm = true - an OTP is sent to the client, you must confirm the payment using theconfirm-payment method by passing the entered OTP. If otpConfirm = false - it is necessary to confirm the payment using theconfirm-payment method without transferring OTP.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"productId": 1,
"amount": 100,
"productReceiver": "7053031122",
"currencyFrom": "USD",
"payerPhone": "7053031133",
"sellerId": 50,
"merchantOrderId": 101,
"description": "A few words",
"channel": "api"
}
Code |
Description |
Links |
200 |
Payment created application/json Controls Accept header.
{ "status": "ok", "paymentDetails": { "paymentId": 211, "commission": 0.11, "amount": 100, "totalAmount": 100.11, "otpConfirm": true, "cashbackAmount": 1.23 } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/resend-otp
Resending OTP password to client
The method must be called if OTP re-sending is required. The method returns the status of sending SMS with OTP password. If in the answer the parameter canResend = true - the client may request to send the OTP again (for example, SMS did not arrive).
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"paymentId": 211
}
Code |
Description |
Links |
200 |
OTP sent application/json Controls Accept header.
{ "status": "ok", "canResend": true } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/cancel-payment
Cancel payment
The method is used after createPayment if you need to cancel the payment (for example, the client clicked Cancel).
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
Payment ID
{
"paymentId": 211
}
Code |
Description |
Links |
200 |
Payment canceled application/json Controls Accept header.
{ "status": "ok" } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/confirm-payment
Confirm payment
Proof of payment. Returns the result of the payment and receipts
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
Payment ID and OTP that the customer entered (if necessary)
{
"paymentId": 211,
"otp": 123456
}
Code |
Description |
Links |
200 |
Payment successful application/json Controls Accept header.
{ "status": "ok", "receipts": { "emoneyReceipt": { "operatorName": "Beeline", "operatorAddress": "г. Астана, ул. Вишневая, д. 10", "operatorBin": "123456789123", "transactionType": "Purchase of EM", "walletNumber": 782354788345, "agentName": "EM Distribution Agent", "agentAddress": "г. Астана, ул. Вишневая, д. 11", "agentBin": "987564123654", "emoneyTransactionId": 654564, "emoneyTransactionTimestamp": 1522052661, "totalAmount": 100.11, "commission": 0.01 }, "paymentReceipt": { "operatorName": "Beeline", "operatorAddress": "г. Астана, ул. Вишневая, д. 10", "operatorBin": "123456789123", "transactionType": "Product payment", "walletNumber": 782354788345, "merchantName": "Merchant 1", "merchantAddress": "г. Астана, ул. Вишневая, д. 11", "merchantBin": "564789632541", "payerPhone": 7053031133, "paymentTransactionId": 654565, "paymentTransactionTimestamp": 1522052661, "amount": 100, "commission": 0.1, "totalAmount": 100.1, "productCode": 12, "productName": "SystemProduct", "productReceiver": "7053031133", "cashbackAmount": 1.23 } }, "isSmsSent": "true" } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/refund-payment
Return (cancellation) of payment. The implementation of the method will be later.
The method is used to return funds to the buyer for the transaction. The method is called for executed (confirmed) payments. The method returns the status of the execution of the operation.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
Payment ID
{
"paymentId": 211,
"amount": 543.58
}
Code |
Description |
Links |
200 |
Return successful application/json Controls Accept header.
{ "status": "ok", "paymentDetails": { "paymentId": 2016 } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/total-emoney
Get the total amount by product
Get the total amount by product filted by api id
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
Code |
Description |
Links |
200 |
Emoney turnover application/json Controls Accept header.
{ "status": "ok", "totalAmount": "100.0" } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Methods for more information - transaction history and checks
Getting the history of operations by user for the period
The method returns an array of objects - operations for a specified period of time.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
User's phone number, time period
{
"payerPhone": "7053031133",
"timestampStart": 1522052661,
"timestampEnd": 2522052661
}
Code |
Description |
Links |
200 |
List of transactions (payments) application/json Controls Accept header.
{ "status": "ok", "payments": [ { "paymentId": 211, "timestamp": 1522052661, "amountFrom": 100, "currencyFrom": "KZT", "amount": 100, "total_amount": 100.11, "product_id": 1, "name": "Product 1", "seller_id": 50, "front_order_id": 101, "payment_description": "Comment to order", "cashbackAmount": 0 }, { "paymentId": 212, "timestamp": 1522052661, "amountFrom": 100, "currencyFrom": "KZT", "amount": 100, "total_amount": 100.12, "product_id": 2, "name": "Product 2", "seller_id": 50, "front_order_id": 102, "payment_description": "Comment to order", "cashbackAmount": 0 } ] } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/get-receipts
Receipt of receipts by transaction ID
The method returns a list of checks for paymentId - receipt of electronic money from the agent, receipt of payment for the product, reversal check of the operation (if the operation was canceled), receipt of electronic money return to the agent (if the operation was canceled)
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
ID of the payment for which you want to receive receipts.
{
"paymentId": 211
}
Code |
Description |
Links |
200 |
Receipts list application/json Controls Accept header.
{ "status": "ok", "emoneyReceipt": { "operatorName": "Beeline", "operatorAddress": "г. Астана, ул. Вишневая, д. 10", "operatorBin": "123456789123", "transactionType": "Purchase of EM", "walletNumber": 782354788345, "agentName": "EM Distribution Agent", "agentAddress": "г. Астана, ул. Вишневая, д. 11", "agentBin": "987564123654", "emoneyTransactionId": 654564, "emoneyTransactionTimestamp": 1522052661, "totalAmount": 100.11, "commission": 0.01 }, "paymentReceipt": { "operatorName": "Beeline", "operatorAddress": "г. Астана, ул. Вишневая, д. 10", "operatorBin": "123456789123", "transactionType": "Product payment", "walletNumber": 782354788345, "merchantName": "Merchant 1", "merchantAddress": "г. Астана, ул. Вишневая, д. 11", "merchantBin": "564789632541", "payerPhone": 7053031133, "paymentTransactionId": 654565, "paymentTransactionTimestamp": 1522052661, "amount": 100, "commission": 0.1, "totalAmount": 100.1, "productCode": 12, "productName": "SystemProduct", "productReceiver": "7053031133", "cashbackAmount": 1.23 }, "refundPaymentReceipt": { "operatorName": "Beeline", "operatorAddress": "Operator address", "operatorBin": "123456789123", "transactionType": "Reversal of product payment", "walletNumber": 782354788345, "merchantName": "Merchant 1", "merchantAddress": "Merchant address", "merchantBin": "564789632541", "payerPhone": 7053031133, "paymentTransactionId": 654565, "paymentTransactionTimestamp": 1522052661, "refundPaymentTransactionId": 654578, "refundPaymentTransactionTimestamp": 1522052661, "amount": 100, "commission": 0.1, "totalAmount": 100.1 }, "refundEmoneyReceipt": { "operatorName": "Beeline", "operatorAddress": "Operator address", "operatorBin": "123456789123", "transactionType": "E-money purchase reversal", "walletNumber": 782354788345, "agentName": "EM distribution agent", "agentAddress": "Agent address", "agentBin": "987564123654", "emoneyTransactionId": 654564, "emoneyTransactionTimestamp": 1522052661, "refundEmoneyTransactionId": 654589, "refundEmoneyTransactionTimestamp": 1522052661, "amount": 100, "commission": 0.1, "totalAmount": 100.1 } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Getting products available for simply
The directory structure is provided for convenience and is not required when displaying products on the trading floor. To perform further financial transactions with products, you must use the product’s id.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"is_active": true
}
Code |
Description |
Links |
200 |
Product catalog application/json Controls Accept header.
{ "status": "ok", "categories": [ { "categoryId": 1, "categoryName": "Category name 1", "parentId": 0 } ], "products": [ { "id": 1, "name": "Product 1", "categoryId": 1, "isOwnProduct": false } ] } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Check operation status
Returns the status of an operation by its ID. Possible status values: new, processing, completed, declined, error, reversed.
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"operationId": 1479
}
Code |
Description |
Links |
200 |
A transaction with the specified ID exists and has the status: application/json Controls Accept header.
{ "status": "ok", "operationDetails": { "operationId": 1479, "operationStatus": "new" } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Create a subscription
The method creates subsciprtion record
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"productId": 1,
"amount": 100,
"currency": "USD",
"productReceiver": "7053031122",
"payerPhone": "7053031133",
"sellerId": 50,
"description": "this is sample desc",
"interval": "month",
"daysNumber": "10",
"dateFrom": "10",
"dateTo": "10",
"channel": "sms"
}
Code |
Description |
Links |
200 |
Subscription created application/json Controls Accept header.
{ "status": "ok", "Subscription ID": "10234", "Subscription status": "disabled", "paymentDetails": { "currencyAmount": 20, "amount": 100, "currency": "KZT", "commission": 0.11, "totalAmount": 100.11 } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Rensend OTP to confirm subscription
Send OTP code one more time
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"subscriptionId": 1,
"action": "start"
}
Code |
Description |
Links |
200 |
Payment created application/json Controls Accept header.
{ "status": "ok", "canResend": "true", "otp": "267449", "error": {} } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Starts a subscription
The method activates subscription
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"subscriptionId": 1
}
Code |
Description |
Links |
200 |
subscription started application/json Controls Accept header.
{ "status": "ok", "subscriptionId": "10234", "action": "start", "otpConfirm": "true", "error": { "erroCode": 300, "errorMessage": "" } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
Stops a subscription
The method stops subscription
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"subscriptionId": 1
}
Code |
Description |
Links |
200 |
subscription stopped application/json Controls Accept header.
{ "status": "ok", "subscriptionId": "10234", "action": "stop", "otpConfirm": "true", "error": { "erroCode": 300, "errorMessage": "" } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
POST/confirm-subscription-action
Confirms subscription action
The method confirms subscription
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"subscriptionId": 1,
"action": "start",
"otp": "123456"
}
Code |
Description |
Links |
200 |
Payment created application/json Controls Accept header.
{ "status": "ok", "error": { "erroCode": 300, "errorMessage": "" } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
User's subscriptions
This method return list of subscritions by user
Try it out
Name |
Description |
Signature * string (header) |
Digital signature request |
Api-Name * string (header) |
Api-Name, provided by admin |
Content-Language string (header) |
Content-Language, specify language |
application/json
{
"payerPhone": "7053031133"
}
Code |
Description |
Links |
200 |
Gets payer's subscriptions list application/json Controls Accept header.
{ "status": "ok", "subscriptions": { "subscription": { "subscriptionId": 1, "creationdate": "", "productId": 1, "productName": 1, "amountOrigin": 1.11, "currencyOrigin": "KZT", "amount": 14.88, "productReceiver": 2, "description": "example value", "interval": "month", "dateFrom": "month", "dateTo": "month", "isPaymentNotification": "month", "subscriptionStatus": "month" } }, "error": { "erroCode": 300, "errorMessage": "" } } |
No links |
400 |
Required parameter is missing in the request application/json
{ "status": "error", "error": { "code": "12001", "message": "Required parameter is missing in the request" } } |
No links |
401 |
Authorisation error application/json
{ "status": "error", "error": { "code": "11003", "message": "Invalid request signature" } } |
No links |
ErrorModel{
success |
string Request Processing Status |
error |
{...} |
}
CancelPaymentRequest{
paymentId* |
integer Payment ID |
}
CancelPaymentResponse{
status |
string Cancellation status |
}
Category{
categoryId |
integer Category ID |
categoryName |
string Category name |
parentId |
integer Parent category ID. 0 - paernt category |
}
CheckOperationStatusRequest{
operationId* |
integer Operation ID |
}
CheckOperationStatusResponse{
status |
string Operation status |
operationDetails |
{...} |
}
Commission{
percent |
string Percent fee |
fixed |
string Fixed fee |
minValue |
string Minimum fee value |
maxValue |
string Maximum fee value |
minTransactionAmount |
string Minimum transaction amount for which a fee applies |
maxTransactionAmount |
string Maximum amount of transaction for which the fee applies |
}
ConfirmPaymentRequest{
paymentId* |
integer Payment ID |
otp |
integer 'OTP that the client entered'. Required if the method createPayment returned parameter * otpConfirm = true |
}
ConfirmPaymentResponse{
status |
string Payment status |
receipts |
{...} |
isSmsSent |
boolean sms was sent or not |
}
ConfirmPaymentSimplyRequest{
paymentId* |
integer Payment ID |
procardId |
string Procard ID |
}
ConfirmSubscriptionActionRequest{
subscriptionId* |
integer Subscription ID |
action* |
string action |
otp |
string OTP code |
}
ConfirmSubscriptionActionResponse{
status |
string Subscription confirmation status |
error |
{...} |
}
CreatePaymentRequest{
productId* |
integer Product ID |
amount* |
number Payment amount |
productReceiver* |
string Recipient's phone number/contract number |
currencyFrom |
string Payment currency from, if not set defaults to main system currency |
payerPhone* |
string Payer's phone number |
sellerId |
string Point of Sale ID |
merchantOrderId* |
integer Dealer's Order (Operation) ID |
description |
string Payment comment |
channel |
string Channel |
}
CreatePaymentResponse{
status |
string Payment creation status |
paymentDetails |
{...} |
}
CreateSubscriptionRequest{
productId* |
integer Product ID |
amount* |
number Payment amount |
currency* |
string Payment currency from, if not set defaults to main system currency |
productReceiver* |
string Recipient's phone number/contract number |
payerPhone* |
string Payer's phone number |
sellerId |
string Point of Sale ID |
description |
string Payment comment |
interval* |
string Payment interval |
daysNumber |
integer Payment interval if interval is set to days |
dateFrom* |
string Date when subscription starts to work |
dateTo* |
string Date when subscription stops to work |
channel |
string Channel |
}
CreateSubscriptionResponse{
status |
string Subscription creation status |
Subscription ID |
integer Subscription ID |
Subscription status |
boolean Subscription creation status |
paymentDetails |
{...} |
}
EmoneyReceiptModel{
description: |
Emoney purchase receipt |
operatorName |
string Name of the operator of e-money |
operatorAddress |
string The address of the operator of e-money |
operatorBin |
string BIN of the operator of e-money |
transactionType |
string Transaction type |
walletNumber |
integer User's e-wallet number |
agentName |
string Agent name |
agentAddress |
string Agent address |
agentBin |
string BIN of the agent |
emoneyTransactionId |
integer E-money purchase transaction ID |
emoneyTransactionTimestamp |
integer E-money purchase transaction date and time in milliseconds |
totalAmount |
number Transaction amount |
commission |
number Transaction fee amount |
}
Response 400{
description: |
Required parameter is missing in the request |
status |
string |
error |
{...} |
}
Response 401{
description: |
Authorisation error |
status |
string |
error |
{...} |
}
GetDetailsRequest{
productId |
integer Product id |
}
GetDetailsResponse{
status |
string |
commission |
[...] |
}
GetPaymentHistoryRequest{
payerPhone* |
string Payer's phone number |
timestampStart* |
integer 'Date from' in milliseconds |
timestampEnd* |
integer 'Date on' in milliseconds |
}
GetPaymentHistoryResponse{
status |
string Status of receipt of operations history |
payments |
[...] |
}
GetProductsRequest{
is_active |
boolean Parameter for the correct formation of the signature, the value of the parameter is not important. |
}
GetProductsResponse{
status |
string |
categories |
[...] |
products |
[...] |
}
GetReceiptsRequest{
paymentId* |
integer Payment ID |
}
GetReceiptsResponse{
status |
string Check receipt status |
emoneyReceipt |
#/components/schemas/EmoneyReceiptModelEmoneyReceiptModel{...} |
paymentReceipt |
#/components/schemas/PaymentReceiptModelPaymentReceiptModel{...} |
refundPaymentReceipt |
#/components/schemas/RefundPaymentReceiptModelRefundPaymentReceiptModel{...} |
refundEmoneyReceipt |
#/components/schemas/RefundEmoneyReceiptModelRefundEmoneyReceiptModel{...} |
}
GetSubscriptionListRequest{
payerPhone* |
string Payer's phone number |
}
GetSubscriptionListResponse{
status |
string Subscription creation status |
subscriptions |
{...} |
error |
{...} |
}
MerchantTotalEmoneyReponse{
status |
string status |
totalAmount |
float total amount |
}
PaymentObj{
description: |
Operation |
paymentId |
integer Payment ID |
timestamp |
integer Date and time of payment in milliseconds |
amount |
number Payment amount |
totalAmount |
number Total commission |
productId |
integer Product ID |
productName |
string Product name |
sellerId |
integer Point of sale ID |
merchantOrderId |
integer Dealer's Order (Operation) ID |
description |
string Payment comment |
}
PaymentReceiptModel{
description: |
Product payment receipt |
operatorName |
string Name of the operator of e-money |
operatorAddress |
string The address of the operator of e-money |
operatorBin |
string BIN code of the operator of e-money |
transactionType |
string Transaction type |
walletNumber |
integer User's e-wallet number |
merchantName |
string Name of the supplier (merchant) |
merchantAddress |
string Supplier Address (Merchant) |
merchantBin |
string BIN code of the supplier (merchant) |
payerPhone |
integer Payer's phone number |
paymentTransactionId |
integer Product payment transaction ID |
paymentTransactionTimestamp |
integer Date and time of the product payment transaction in milliseconds |
amount |
number Amount per product |
commission |
number Commission amount |
totalAmount |
number Total amount |
productCode |
integer Product code |
productName |
string Product name |
productReceiver |
string Product receiver |
cashbackAmount |
number Cashback amount |
}
Product{
id |
integer Product ID |
name |
string Product name |
categoryId |
integer Product category ID |
isOwnProduct |
boolean true - Merchant is the owner of the product, false - Merchant is not the owner of the product |
}
RefundEmoneyReceiptModel{
description: |
E-money purchase reversal receipt |
operatorName |
string Name of the operator of e-money |
operatorAddress |
string The address of the operator of e-money |
operatorBin |
string BIN code of the operator of e-money |
transactionType |
string Transaction type |
walletNumber |
integer User's e-wallet number |
agentName |
string Agent name |
agentAddress |
string Address of the distributor of EM |
agentBin |
string BIN code of the agent |
emoneyTransactionId |
integer E-money purchase transaction ID |
emoneyTransactionTimestamp |
integer E-money purchase transaction date and time in milliseconds |
refundEmoneyTransactionId |
integer E-money reversal transaction ID |
refundEmoneyTransactionTimestamp |
integer The date and time of the e-money purchase reversal transaction in milliseconds |
amount |
number Payment amount |
commission |
number Commission amount |
totalAmount |
number Total amount |
}
RefundPaymentReceiptModel{
description: |
Product reversal receipt |
operatorName |
string Name of the operator of e-money |
operatorAddress |
string The address of the operator of e-money |
operatorBin |
string BIN code of the operator of e-money |
transactionType |
string Transaction type |
walletNumber |
integer User's e-wallet number |
merchantName |
string Name of the supplier (merchant) |
merchantAddress |
string Supplier address (Merchant) |
merchantBin |
string BIN code of the supplier (merchant) |
payerPhone |
integer Payer's phone number |
paymentTransactionId |
integer Product payment transaction ID |
paymentTransactionTimestamp |
integer Date and time of the product payment transaction in milliseconds |
refundPaymentTransactionId |
integer Transaction ID of the payment reversal of the product |
refundPaymentTransactionTimestamp |
integer Date and time of the transaction to reverse the product payment in milliseconds |
amount |
number Payment amount |
commission |
number Commission amount |
totalAmount |
number Total amount |
}
RefundPaymentRequest{
paymentId* |
integer Payment ID |
amount |
float Optional parameter. Amount for partial refund. Can`t be grater then original payment amount. |
}
RefundPaymentResponse{
status |
string Status of payment refund |
paymentDetails |
{...} |
}
ResendOtpRequest{
paymentId* |
integer Payment ID |
}
ResendOtpResponse{
status |
string OTP send status |
canResend |
boolean true - OTP resubmission is available, false - OTP resubmission is not available (limit is exceeded) |
}
ResendSubscriptionOtpRequest{
subscriptionId* |
integer Subscription ID |
action* |
string action |
}
ResendSubscriptionOtpResponse{
status |
string Subscription creation status |
canResend |
boolean true = OTP sent, false = no need to send OTP |
otp |
integer OTP code |
error |
{...} |
}
StartSubscriptionRequest{
subscriptionId* |
integer Subscription ID |
}
StartSubscriptionResponse{
status |
string Subscription creation status |
subscriptionId |
integer Subscription ID |
action |
string Subscription action |
otpConfirm |
boolean true = OTP sent, false = no need to send OTP |
error |
{...} |
}
StopSubscriptionRequest{
subscriptionId* |
integer Subscription ID |
}
StopSubscriptionResponse{
status |
string Subscription creation status |
subscriptionId |
integer Subscription ID |
action |
string Subscription action |
otpConfirm |
boolean true = OTP sent, false = no need to send OTP |
error |
{...} |
}