Withdrawal Intents

Use these endpoints to obtain the information about automatic withdrawals (or settlements) configuration, as well as update this configuration.

The Withdrawal Intents object

The WithdrawalIntents object contains the information about the future withdrawals. The existence of the intent for a specific currency indicates that all tokens of that particular currency will be withdrawn (or settled) into the merchant's wallet after the processAt time.

This object might contain parameters and values not documented in the API Reference, which should be disregarded.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the intent.

  • Name
    currency
    Type
    string
    Description

    Currency associated with this intent.

  • Name
    processAt
    Type
    string
    Description

    ISO8601 Timestamp of when this intent is going to be processed.

  • Name
    status
    Type
    string
    Description

    Status of the intent, the possible values are the following:

    1. Pending
    2. Succeeded
    3. Failed

POST/v1/withdrawals/intents/search

Search for intents

This endpoint allows you to retrieve a paginated list of intents that optionally can be filtered based on the predicates defined below.

Predicates are combined with AND semantics.

Read more about pagination

Optional attributes

  • Name
    page
    Type
    object
    Description

    Defines pagination and sorting options.

  • Name
    predicates.network
    Type
    string
    Description

    Type of blockchain network MainNet or TestNet.

  • Name
    predicates.status
    Type
    string
    Description

    Status of the intent.

Request

POST
/v1/withdrawals/intents/search
curl --request POST \
  --url https://partner-api.smartypay.io/v1/withdrawals/intents/search \
  --user API_KEY:SECRET \
  --header 'content-type: application/json' \
  --data '{
    "predicates": {
        "status": "Pending"
    },
    "page": {
        "limit": 5
    }
}'

Response

{
    "list": [
        {
            "asset": "btUSDTv2",
            "blockchain": "BinanceTestNet",
            "id": "SxzNzHmWUsESHzYCqdFzw1",
            "processAt": "2023-02-15T18:15:53.876Z",
            "status": "Pending"
        },
        // ...
    ],
    "page": {
        "limit": 5,
        "offset": 0
    },
}