Appearance
Payment
There are two methods used to withdraw money from the user's card to the merchant's account.
Endpoints
BASE_URL/merchant/receipts/create/BASE_URL/merchant/receipts/pay/
Payment steps
- Create payment transaction by sending request to the
merchant/receipts/create/endpoint. (returnstransactionId) - Confirm Payment
1. Create payment transaction
Endpoint details
Method:
POST
URL: BASE_URL/merchant/receipts/create/
Header:
plaintext
api-key: "kfggfgf.given_api_key_by_paylov"| Fields | sample_data | Type | Required | Description |
|---|---|---|---|---|
| userId | 123 | string | No | userId (ID declared by the merchant) |
| amount | 1000 | int | Yes | Amount in SUM (1000 = 1 Thousand SUM) |
| account | dict | Yes | (”account”: {} ) send empty dict if merchant does not have additional data to save |
Request example
json
{
"userId": "string",
"amount": 1000,
"account": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}Success response example
json
{
"transactionId": "string"
}Error response example
json
{
"error": {
"code": "string",
"message": "string"
}
}2. Confirm payment
Endpoint details
Method:
POST
URL: BASE_URL/merchant/receipts/pay/
Header:
plaintext
api-key: "kfggfgf.given_api_key_by_paylov"| Fields | sample_data | Type | Required | Description |
|---|---|---|---|---|
| transactionId | 9f877739-bc25-4f0f-a13f-ec485fd04250 | string | Yes | transactionId that is returned by the /receipts/create/ method |
| cardId | 9f877739-bc25-4f0f-a13f-ec485fd04250 | string | Yes | cardId that is created in Paylov system |
| userId | 123 | string | Yes | userId (ID declared by the merchant) |
Request body
json
{
"transactionId": "string",
"cardId": "string",
"userId": "string"
}Successful response
json
{
"result": {
"transactionId": "9b370dde-dfe1-4365-be8a-d3581c9479ba"
}
}Error response
json
{
"error": {
"code": "string",
"message": "string"
}
}