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:

    1. NotSet
    2. FirstDayOfWeek
    3. 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.


GET/v1/merchants/{merchantId}/withdrawal-schedule

Retrieve the schedule

This endpoint allows you to retrieve the withdrawal schedule.

Request

GET
/v1/merchants/{merchantId}/withdrawal-schedule
curl https://partner-api.smartypay.io/v1/merchants/FdDQBuaqXoReYAxf9VtEBq/withdrawal-schedule \
  --user API_KEY:SECRET

Response

{
    "period": "NotSet",
    "unifiedMinAmount": 0
}

PUT/v1/merchants/{merchantId}/withdrawal-schedule

Update the schedule

This endpoint allows you to update the withdrawal schedule.

Request

PUT
/v1/merchants/{merchantId}/withdrawal-schedule
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.

CodeHTTP CodeDescription
UnifiedMinAmountInvalid400Unified minimum amount of tokens has invalid value.