Skip to content

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

  1. Create payment transaction by sending request to the merchant/receipts/create/ endpoint. (returns transactionId)
  2. 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"
Fieldssample_dataTypeRequiredDescription
userId123stringNouserId (ID declared by the merchant)
amount1000intYesAmount in SUM (1000 = 1 Thousand SUM)
accountdictYes(”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"
Fieldssample_dataTypeRequiredDescription
transactionId9f877739-bc25-4f0f-a13f-ec485fd04250stringYestransactionId that is returned by the /receipts/create/ method
cardId9f877739-bc25-4f0f-a13f-ec485fd04250stringYescardId that is created in Paylov system
userId123stringYesuserId (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"
  }
}