Merchants

Use these endpoints to obtain the basic information about merchants.

The Merchant object

The Merchant object includes all relevant details about your merchants.

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 merchant.

  • Name
    name
    Type
    string
    Description

    The name of the merchant.

  • Name
    partnerAddress
    Type
    string
    Description

    The address of the partner (PSP) controlling this merchant.

  • Name
    isKYBFinished
    Type
    bool
    Description

    Indicates whether the KYB (Know Your Business) procedures are successfully finished.

  • Name
    createdAt
    Type
    string
    Description

    ISO8601 Timestamp of when the merchant was created.


POST/v1/merchants/search

Search for merchants

This endpoint allows you to retrieve a paginated list of merchants 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.nameLike
    Type
    string
    Description

    A part of the merchant name (case in-sensitive).

Request

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

Response

{
    "list": [
        {
            "id": "FdDQBuaqXoReYAxf9VtEBq",
            "createdAt": "2023-12-20T06:42:54.906016Z",
            "isKYBFinished": true,
            "name": "Tesla Corporation",
            "partnerAddress": "0x5888455503193e5C6ea7AC1f232Ac7d6665f55fd"
        },
        {
            "id": "rFI995vUhSIhXBhNe8Xv7x"
            // ...
        }
    ],
    "page": {
        "limit": 5,
        "offset": 0
    },
}

GET/v1/merchants/{merchantId}

Retrieve a merchant

This endpoint allows you to retrieve a merchant by providing their unique id. Refer to the list at the top of this page to see which properties are included.

Request

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

Response

{
    "id": "FdDQBuaqXoReYAxf9VtEBq",
    "createdAt": "2023-12-20T06:42:54.906016Z",
    "isKYBFinished": true,
    "name": "Tesla Corporation",
    "partnerAddress": "0x5888455503193e5C6ea7AC1f232Ac7d6665f55fd"
}

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
MerchantNamePredicateInvalid400The predicate nameLike is too long (over 512 chars), or has invalid content.