Creating a Draft
Method for creating a payout draft. A draft can be used to prepare a payout before it is actually executed.
URL
Method: POST
- Production:
https://api.pay.kvell.group/v1/payout-drafts - Stage:
https://api.pay.stage.kvell.group/v1/payout-drafts
Request parameters
Name |
Data type | Required | Description |
|---|---|---|---|
payout_type |
string | Yes | Payout type: card, sbp, account |
amount |
integer | Yes | Amount in kopecks |
description |
string | Yes | Payout description. Maximum 210 characters for card, 92 characters for sbp. |
number |
string | No | Draft number (arbitrary identifier) |
recipient_bank_id |
string | Conditional | Recipient bank ID. Required for a payout by phone number (SBP) |
recipient_full_name |
string | No | Recipient's full name |
recipient_card_pan |
string | Conditional | Recipient's card number. Required for a payout by card number |
recipient_card_token |
string | No | Recipient's card token |
recipient_phone |
string | Conditional | Recipient's phone number. Required for a payout by phone number (SBP) |
comment |
string | No | Comment on the draft |
Request example
{
"payout_type": "card",
"amount": 100000,
"description": "Payout under contract No. 123",
"number": "draft-001",
"recipient_full_name": "Ivanov Ivan Ivanovich",
"recipient_card_pan": "4111111111111111",
"comment": "March payout"
}
Request headers
| Name | Data type | Required | Description |
|---|---|---|---|
X-Api-Key |
string | Yes | Unique shop identifier |
X-Signature |
string | Yes | Signature |
Building the signature
The X-Signature signature is built by concatenating X-Api-Key, amount, and secret_key. sha256 is computed from
the resulting string:
where secret_key is the secret key found in the merchant's shop settings;
Response
Response example
{
"id": 42,
"draft_guid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"payout_type": "card",
"point_id": 1,
"amount": 100000,
"status": "created",
"number": "draft-001",
"recipient_full_name": "Ivanov Ivan Ivanovich",
"recipient_card_mask": "411111******1111",
"description": "Payout under contract No. 123",
"comment": "March payout",
"created_at": "2024-03-01T10:00:00",
"updated_at": "2024-03-01T10:00:00",
"documents": [],
"orders": []
}
Response parameters
| Name | Data type | Description |
|---|---|---|
id |
integer | Draft ID |
draft_guid |
string | Draft GUID |
payout_type |
string | Payout type |
point_id |
integer | Merchant location (point) ID |
amount |
integer | Amount in kopecks |
status |
string | Draft status |
number |
string | Draft number |
customer_key |
string | Customer key |
recipient_full_name |
string | Recipient's full name |
recipient_card_token |
string | Recipient's card token |
recipient_card_mask |
string | Recipient's card mask |
recipient_phone |
string | Recipient's phone number |
recipient_bank_id |
string | Recipient bank ID |
description |
string | Description |
comment |
string | Comment |
created_at |
datetime | Creation date and time |
updated_at |
datetime | Date and time of the last update |
documents |
array | List of documents |
orders |
array | List of created orders |
List of statuses
| Name | Description |
|---|---|
created |
Draft created |
awaiting_confirmation |
Awaiting confirmation |
confirmed |
Draft confirmed |
canceled |
Draft canceled |