Withdrawal Schedule
Use these endpoints to obtain the information about automatic withdrawals (or settlements) configuration, as well as update this configuration.
The Withdrawal Schedule object
The WithdrawalSchedule
object contains the configuration of the withdrawal schedule.
This object might contain parameters and values not documented in the API Reference, which should be disregarded.
Properties
- Name
period
- Type
- string
- Description
Periodicity for the withdrawal, possible values are the following:
NotSet
FirstDayOfWeek
FirstDayOfMonth
- Name
unifiedMinAmount
- Type
- string
- Description
Minimum amount of tokens that will trigger the automatic withdrawal according to the configured periodicity. This value is applied for all types of tokens.
Retrieve the schedule
This endpoint allows you to retrieve the withdrawal schedule.
Request
curl https://partner-api.smartypay.io/v1/merchants/FdDQBuaqXoReYAxf9VtEBq/withdrawal-schedule \
--user API_KEY:SECRET
Response
{
"period": "NotSet",
"unifiedMinAmount": 0
}
Update the schedule
This endpoint allows you to update the withdrawal schedule.
Request
curl --request PUT \
--url https://partner-api.smartypay.io/v1/merchants/9xBoSUdGWeiAzMn5VHBvMB/withdrawal-schedule \
--user API_KEY:SECRET \
--header 'content-type: application/json' \
--data '{
"period": "FirstDayOfWeek",
"unifiedMinAmount": 50
}'
Response
{
"period": "FirstDayOfWeek",
"unifiedMinAmount": 50
}
Error codes
In case of error, you will receive the standard error object as a response with the following possible error codes. Use this code to handle them in an appropriate way.
The error codes listed below are only related to one-times payments; some generic errors might be also returned.
Code | HTTP Code | Description |
---|---|---|
UnifiedMinAmountInvalid | 400 | Unified minimum amount of tokens has invalid value. |