Skip to content

Retrieving a Draft by Number

Method for retrieving payout draft information by its number.

URL

Method: GET

  • Production: https://api.pay.kvell.group/v1/payout-drafts/number/{number}
  • Stage: https://api.pay.stage.kvell.group/v1/payout-drafts/number/{number}

Path parameters

Name Data type Required Description
number string Yes Payout draft number

Request example

GET /v1/payout-drafts/number/draft-001

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, number, and secret_key. sha256 is computed from the resulting string:

sha256({X-Api-Key}{number}{secret_key})

where secret_key is the secret key found in the merchant's shop settings;

Response

Returns the payout draft object. If the draft is confirmed, it additionally contains an order_details field with the created transaction's data.

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": [],
  "order_details": null
}
{
  "id": 42,
  "draft_guid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "payout_type": "card",
  "point_id": 1,
  "amount": 100000,
  "status": "confirmed",
  "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:05:00",
  "documents": [],
  "orders": [
    {
      "id": 1,
      "order_id": "order-abc-123",
      "transaction": "draft-001",
      "amount": 100000,
      "commission": 0,
      "created_at": "2024-03-01T10:05:00",
      "updated_at": "2024-03-01T10:05:00"
    }
  ],
  "order_details": {
    "id": "order-abc-123",
    "status": "completed",
    "transaction": "draft-001",
    "amount": 100000,
    "commission": 0,
    "inner_commission": 0,
    "description": "Payout under contract No. 123",
    "redirect_url": null,
    "extra_data": {},
    "error_code": null,
    "error_message": null,
    "created_at": "2024-03-01T10:05:00"
  }
}
{
  "errors": [
    {
      "message": "string",
      "code": 0
    }
  ]
}

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
order_details object Transaction data. Populated only for confirmed drafts

orders[] object

Name Data type Description
id integer Record ID
order_id string Order ID in the payment system
transaction string Transaction number
amount integer Amount in kopecks
commission integer Commission in kopecks
created_at datetime Creation date and time
updated_at datetime Date and time of the last update

order_details object (Represents a completed payout. See Transaction status for details)

Name Data type Description
id string Order ID in the payment system
status string Transaction status
transaction string Transaction number
amount integer Amount in kopecks
commission integer Commission in kopecks
inner_commission integer Internal commission in kopecks
description string Description
redirect_url string Redirect URL
extra_data object Additional data
error_code string Error code (if any)
error_message string Error message (if any)
created_at string Creation date and time

List of draft statuses

Name Description
created Draft created
awaiting_confirmation Awaiting confirmation
confirmed Draft confirmed
canceled Draft canceled

List of payout statuses

Name Description
new New transaction
processing Operation is being processed
canceled Operation declined
completed Operation completed
refunded Operation refunded
part_refunded Operation partially refunded
reversed Operation reversed
part_reversed Operation partially reversed