The Withdrawal Object
Attributes
| Parameter | Type | Description |
|---|---|---|
id | string | The object's unique identifier. |
display_amount | object | Withdrawal amount object, containing value and currency. |
display_amount.amount | integer | The withdrawal amount value. |
display_amount.currency | string | The currency code. |
status | enum | Status of the withdrawal. Possible values: -3 (Failed), -2 (Canceled), -1 (Pending cancellation), 0 (Pending), 1 (Processing), 2 (Completed). |
status_name | enum | The status in text format. Possible values: failed, canceled, pending cancellation, pending, processing, completed. |
provider_id | enum | ID of the gateway used for the withdrawal. Possible values: 1 (bank account), 2 (CashPlus). |
provider_name | enum | Name of the provider bound to the ID. Possible values: bank_account, cashplus. |
paid_at | timestamp | The withdrawal date. null if not processed yet. |
created_at | timestamp | Timestamp when the withdrawal was first requested. |
Request
Endpoint: https://api.youcanpay.com/withdrawals/{withdrawal_id}Method: GET
bash
$ curl --location -g --request GET 'https://api.youcanpay.com/withdrawals/756e502e-d363-42f1-85f0-0b6b43f4d486' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'Response
json
{
"id": "io420po0969-e801-416b-8fe3-0c88f3fff6de",
"display_amount": {
"amount": "50000",
"currency": "MAD"
},
"status": 0,
"status_name": "pending",
"provider_id": 2,
"provider_name": "cashplus",
"paid_at": null,
"created_at": "2022-01-31 15:11:50"
}