MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {API_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your {API_KEY} by visiting your profile at API tab, then clicking Create or Create New.

Balance

APIs for balance manipulations.

List balances.

requires authentication

Show total amount of balance, and available amount of account. Also return reserved amount of cards.

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/balance" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/balance"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/balance
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/balance';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "total": "1000.00",
            "reserved": "200.00",
            "available": "800.00",
            "currency": "USD"
        }
    ],
    "request_id": "56526c2e-01ed-48a4-b29d-fbf6f7ff0bfb"
}
 

Request      

GET api/v2/balance

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

total   string   

The total amount of balance.

reserved   string   

The reserved amount of cards.

available   string   

The available amount of account.

currency   string   

The currency of amounts.

Cards.

List cards.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/cards?tz=America%2FNew_York&page=1&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&archived=include&micro=only&bins[]=123456&ids[]=1&last_fours[]=2222&states[]=2&teams[]=3&users[]=3&tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "page=1",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "archived=include",
    "micro=only",
    "bins[]=123456",
    "ids[]=1",
    "last_fours[]=2222",
    "states[]=2",
    "teams[]=3",
    "users[]=3",
    "tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/cards
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "page": 1,
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "archived": "include",
    "micro": "only",
    "bins": ["123456"],
    "ids": [1],
    "last_fours": ["2222"],
    "states": [2],
    "teams": [3],
    "users": [3],
    "tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'page' => 1,
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'archived' => 'include',
            'micro' => 'only',
            'bins' => ['123456'],
            'ids' => [1],
            'last_fours' => ['2222'],
            'states' => [2],
            'teams' => [3],
            'users' => [3],
            'tags' => ['b001a675-6fd6-41f4-8139-a4dcb8a917b0'],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 1,
            "title": "Card example",
            "last_four": "1234",
            "bin": "123456",
            "balance_type": "account_balance",
            "currency": "USD",
            "available": "123.45",
            "spend": "123.45",
            "archived": false,
            "state": {
                "value": 2,
                "label": "Paused",
                "deferred_state": {
                    "value": 3,
                    "label": "Blocked",
                    "perform_at": "2022-12-31 23:59:59"
                }
            },
            "micro_payments_enabled": true,
            "micro_payments_limit": "10.00",
            "micro_payments_limit_sum": "100.00",
            "user": {
                "id": 2,
                "email": "cardholder@email.host",
                "name": "Card holder",
                "team": {
                    "id": 1,
                    "name": "Dummy team"
                }
            },
            "limits": [
                {
                    "type": "transaction_limit",
                    "amount": "100.00"
                },
                {
                    "type": "total_limit",
                    "amount": "1000.00"
                }
            ],
            "tags": [
                {
                    "uuid": "b001a675-6fd6-41f4-8139-a4dcb8a917b0",
                    "name": "Team owner tag",
                    "personal": false,
                    "user": {
                        "id": 2,
                        "uuid": "9f9657e1-4bc9-11ee-858c-0242c0a8dc07",
                        "email": "cardholder@email.host",
                        "name": "Card holder"
                    }
                },
                {
                    "uuid": "b847824d-6661-4951-b52a-b5badeb14b77",
                    "name": "Member tag",
                    "personal": true,
                    "user": {
                        "id": 3,
                        "uuid": "9f9679e0-4bc9-11ee-858c-0242c0a8dc07",
                        "email": "member@email.host",
                        "name": "Member"
                    }
                }
            ],
            "date": "2022-06-24 10:06:10"
        }
    ],
    "total": 100,
    "per_page": 50,
    "current_page": 1,
    "last_page": 2,
    "request_id": "c78cec78-0bbf-45ae-9ddb-e1b12a1b0bb5"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "dates.begin": [
            "The dates.begin does not match the format Y-m-d H:i:s."
        ],
        "dates.end": [
            "The dates.end does not match the format Y-m-d H:i:s."
        ],
        "states.0": [
            "The states.0 field is not a valid enum."
        ]
    },
    "request_id": "a50feedf-d23b-47d6-81a9-e33a45c13e09"
}
 

Request      

GET api/v2/cards

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

page   integer  optional  

The page number. Must be at least 1. Example: 1

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or at custom timezone from tz param).

dates.begin   string  optional  

Begin of the date range. Example: 2024-08-04

dates.end   string  optional  

End of the date range. Example: 2024-08-05

archived   string  optional  

The filter of archived cards:
include - «All, includes archived»
only - «Only archived»
exclude - «All, excludes archived»
Default: exclude. Example: include

micro   string  optional  

The filter of micro payments:
include - «All, includes micro payment setup»
only - «Only with micro payment setup»
exclude - «All, excludes micro payment setup»
Default: include. Example: only

bins   string[]  optional  

The card BIN numbers.

ids   integer[]  optional  

The IDs of cards.

last_fours   string[]  optional  

The last four numbers of cards.

states   integer[]  optional  

The values of card states:
2 - «Active»
3 - «Blocked»
4 - «Paused»
Default: not affected if not present.

teams   integer[]  optional  

The IDs of teams.

users   integer[]  optional  

The IDs of users.

tags   string[]  optional  

The UUIDs of tags. Must be a valid UUID.

Response

Response Fields

id   integer   

The card ID

title   string   

The card title

last_four   string   

The last four numbers of card

bin   string   

The card BIN number

balance_type   string   

The balance type of available amount

currency   string   

The currency of card amount

available   string   

The available balance

spend   string   

The actual spend of card

archived   boolean   

The card archive mode

topup   object[]   

The settings of top-up (Available for BIN with card_balance support)

auto   boolean   

Indicates whether automatic top-ups should be enabled

amount   number   

The amount of automatic top-up of the card (if card balance falls below the threshold).

threshold   number   

The minimum card balance threshold for applying automatic top-up.

micro_payments_enabled   boolean   

Indicates whether micropayments should be enabled.

micro_payments_limit   number   

The allowed limit for each payment from inactive cards with account_balance supported BINs.

micro_payments_limit_sum   number   

The maximum amount of all micropayments on the cards with account_balance supported BINs.

state   object   

The card state with label (and with deferred_state if exists)

user   object   

The card user with team

tags   object[]   

The card tags with owner

uuid      

The UUID of tag for filter by tag

name      

The tag name

personal      

The sign of belonging to the owner of the card

user      

The tag user

limits   object[]   

The card limits

date   string   

The card creation date (at user timezone).

total   integer   

The total amount of cards

per_page   integer   

The amount of cards per page

current_page   integer   

The current page number

last_page   integer   

The last page number

Create card.

requires authentication

Creating the card of one of several balance types, such as: account balance or card balance.

Example request: bash javascript json php

curl --request POST \
    "https://private.mybrocard.com/api/v2/cards" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tz\": \"America\\/New_York\",
    \"bin\": \"123456\",
    \"title\": \"Lorem Ipsum\",
    \"user_id\": 1,
    \"tags\": [
        \"b001a675-6fd6-41f4-8139-a4dcb8a917b0\"
    ],
    \"transaction_limit\": 50,
    \"balance\": 123.45,
    \"total_limit\": 123.45,
    \"topup_auto\": false,
    \"topup_to\": 123.45,
    \"topup_threshold\": 123.45
}"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tz": "America\/New_York",
    "bin": "123456",
    "title": "Lorem Ipsum",
    "user_id": 1,
    "tags": [
        "b001a675-6fd6-41f4-8139-a4dcb8a917b0"
    ],
    "transaction_limit": 50,
    "balance": 123.45,
    "total_limit": 123.45,
    "topup_auto": false,
    "topup_to": 123.45,
    "topup_threshold": 123.45
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
POST https://private.mybrocard.com/api/v2/cards
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "bin": "123456",
    "title": "Lorem Ipsum",
    "user_id": 1,
    "tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
    "transaction_limit": 50,
    "balance": 123.45,
    "total_limit": 123.45,
    "topup_auto": false,
    "topup_to": 123.45,
    "topup_threshold": 123.45,
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tz' => 'America/New_York',
            'bin' => '123456',
            'title' => 'Lorem Ipsum',
            'user_id' => 1,
            'tags' => [
                'b001a675-6fd6-41f4-8139-a4dcb8a917b0',
            ],
            'transaction_limit' => 50.0,
            'balance' => 123.45,
            'total_limit' => 123.45,
            'topup_auto' => false,
            'topup_to' => 123.45,
            'topup_threshold' => 123.45,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "id": 1,
    "title": "Card example",
    "last_four": "1234",
    "bin": "123456",
    "balance_type": "account_balance",
    "currency": "USD",
    "available": "123.45",
    "spend": "123.45",
    "archived": false,
    "state": {
        "value": 2,
        "label": "Paused",
        "deferred_state": {
            "value": 3,
            "label": "Blocked",
            "perform_at": "2022-12-30 02:00:00"
        }
    },
    "micro_payments_enabled": true,
    "micro_payments_limit": "10.00",
    "micro_payments_limit_sum": "100.00",
    "user": {
        "id": 2,
        "email": "cardholder@email.host",
        "name": "Card holder",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "tags": [
        {
            "uuid": "b001a675-6fd6-41f4-8139-a4dcb8a917b0",
            "name": "Team owner tag",
            "personal": false,
            "user": {
                "id": 2,
                "uuid": "9f9657e1-4bc9-11ee-858c-0242c0a8dc07",
                "email": "cardholder@email.host",
                "name": "Card holder"
            }
        },
        {
            "uuid": "b847824d-6661-4951-b52a-b5badeb14b77",
            "name": "Member tag",
            "personal": true,
            "user": {
                "id": 3,
                "uuid": "9f9679e0-4bc9-11ee-858c-0242c0a8dc07",
                "email": "member@email.host",
                "name": "Member"
            }
        }
    ],
    "limits": [
        {
            "type": "transaction_limit",
            "amount": "100.00"
        },
        {
            "type": "total_limit",
            "amount": "1000.00"
        }
    ],
    "date": "2022-06-24 10:06:10",
    "billing_address": "Baker street 221B, London",
    "request_id": "7b069c5d-3e31-41f1-a196-51ba9cfa9a4e"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "bin": [
            "The bin field is required."
        ],
        "title": [
            "The title field is required."
        ]
    },
    "request_id": "15b469ed-1ea1-45c6-ba08-5777815ca731"
}
 

Request      

POST api/v2/cards

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

bin   string   

The BIN number. Example: 123456

title   string   

The card title. Must be at least 1 character. Must not be greater than 255 characters. Example: Lorem Ipsum

user_id   integer   

The user ID of cardholder. Example: 1

tags   string[]  optional  

The UUIDs of tags. Has no effect if the request does not have "tags" property. But if the request "tags" are equal to an array, then tags of a card will be overridden (even if array is empty). Must be a valid UUID.

transaction_limit   number   

The limit per transaction. Example: 50

balance   number  optional  

The card balance. Required for BIN with card_balance support. Available for BIN with card_balance support. Example: 123.45

total_limit   number  optional  

The total limit of card. Available for BIN with account_balance support. Prohibited for BIN with card_balance support. Example: 123.45

topup_auto   boolean  optional  

Indicates whether automatic top-ups should be enabled. Available for BIN with card_balance support. Example: false

topup_to   number  optional  

The total amount of the card balance after automatic top-up (if card balance falls below the threshold). Available for BIN with card_balance support. Example: 123.45

topup_threshold   number  optional  

The minimum card balance threshold for applying automatic top-up. Available for BIN with card_balance support. Example: 123.45

Response

Response Fields

id   integer   

The card ID

title   string   

The card title

last_four   string   

The last four numbers of card

bin   string   

The card BIN number

balance_type   string   

The balance type of available amount

currency   string   

The currency of card amount

available   string   

The available balance

spend   string   

The actual spend of card

archived   boolean   

The card archive mode

topup   object[]   

The settings of top-up (Available for BIN with card_balance support)

auto   boolean   

Indicates whether automatic top-ups should be enabled

amount   number   

The amount of automatic top-up of the card (if card balance falls below the threshold).

threshold   number   

The minimum card balance threshold for applying automatic top-up.

micro_payments_enabled   boolean   

Indicates whether micropayments should be enabled.

micro_payments_limit   number   

The allowed limit for each payment from inactive cards with account_balance supported BINs.

micro_payments_limit_sum   number   

The maximum amount of all micropayments on the cards with account_balance supported BINs.

state   object   

The card state with label (and with deferred_state if exists)

user   object   

The card user with team

tags   object[]   

The card tags with owner

uuid      

The UUID of tag for filter by tag

name      

The tag name

personal      

The sign of belonging to the owner of the card

user      

The tag user

limits   object[]   

The card limits

date   string   

The card creation date (at user timezone)

Show card.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/cards/1?tz=America%2FNew_York" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/cards/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 1,
    "title": "Card example",
    "last_four": "1234",
    "bin": "123456",
    "balance_type": "account_balance",
    "currency": "USD",
    "available": "123.45",
    "spend": "123.45",
    "archived": false,
    "state": {
        "value": 2,
        "label": "Paused",
        "deferred_state": {
            "value": 3,
            "label": "Blocked",
            "perform_at": "2022-12-30 02:00:00"
        }
    },
    "micro_payments_enabled": true,
    "micro_payments_limit": "10.00",
    "micro_payments_limit_sum": "100.00",
    "user": {
        "id": 2,
        "email": "cardholder@email.host",
        "name": "Card holder",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "tags": [
        {
            "uuid": "b001a675-6fd6-41f4-8139-a4dcb8a917b0",
            "name": "Team owner tag",
            "personal": false,
            "user": {
                "id": 2,
                "uuid": "9f9657e1-4bc9-11ee-858c-0242c0a8dc07",
                "email": "cardholder@email.host",
                "name": "Card holder"
            }
        },
        {
            "uuid": "b847824d-6661-4951-b52a-b5badeb14b77",
            "name": "Member tag",
            "personal": true,
            "user": {
                "id": 3,
                "uuid": "9f9679e0-4bc9-11ee-858c-0242c0a8dc07",
                "email": "member@email.host",
                "name": "Member"
            }
        }
    ],
    "limits": [
        {
            "type": "transaction_limit",
            "amount": "100.00"
        },
        {
            "type": "total_limit",
            "amount": "1000.00"
        }
    ],
    "date": "2022-06-24 10:06:10",
    "billing_address": "Baker street 221B, London",
    "request_id": "7b069c5d-3e31-41f1-a196-51ba9cfa9a4e"
}
 

Request      

GET api/v2/cards/{card_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

card_id   integer   

The ID of the card. Example: 1

card   integer   

The ID of the card Example: 14

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

Response

Response Fields

id   integer   

The card ID

title   string   

The card title

last_four   string   

The last four numbers of card

bin   string   

The card BIN number

balance_type   string   

The balance type of available amount

currency   string   

The currency of card amount

available   string   

The available balance

spend   string   

The actual spend of card

archived   boolean   

The card archive mode

topup   object[]   

The settings of top-up (Available for BIN with card_balance support)

auto   boolean   

Indicates whether automatic top-ups should be enabled

amount   number   

The amount of automatic top-up of the card (if card balance falls below the threshold).

threshold   number   

The minimum card balance threshold for applying automatic top-up.

micro_payments_enabled   boolean   

Indicates whether micropayments should be enabled.

micro_payments_limit   number   

The allowed limit for each payment from inactive cards with account_balance supported BINs.

micro_payments_limit_sum   number   

The maximum amount of all micropayments on the cards with account_balance supported BINs.

state   object   

The card state with label (and with deferred_state if exists)

user   object   

The card user with team

tags   object[]   

The card tags with owner

uuid      

The UUID of tag for filter by tag

name      

The tag name

personal      

The sign of belonging to the owner of the card

user      

The tag user

limits   object[]   

The card limits

date   string   

The card creation date (at user timezone)

billing_address   string   

The card billing address

Edit card.

requires authentication

Updating the card of one of several balance types, such as: account balance or card balance.

Example request: bash javascript json php

curl --request PUT \
    "https://private.mybrocard.com/api/v2/cards/1" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tz\": \"America\\/New_York\",
    \"title\": \"Lorem Ipsum\",
    \"user_id\": 1,
    \"state\": 2,
    \"archived\": false,
    \"tags\": [
        \"b001a675-6fd6-41f4-8139-a4dcb8a917b0\"
    ],
    \"transaction_limit\": 50,
    \"balance\": 123.45,
    \"total_limit\": 123.45,
    \"micro_payments_enabled\": false,
    \"micro_payments_limit\": 123.45,
    \"micro_payments_limit_sum\": 123.45,
    \"topup_auto\": false,
    \"topup_to\": 123.45,
    \"topup_threshold\": 123.45
}"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tz": "America\/New_York",
    "title": "Lorem Ipsum",
    "user_id": 1,
    "state": 2,
    "archived": false,
    "tags": [
        "b001a675-6fd6-41f4-8139-a4dcb8a917b0"
    ],
    "transaction_limit": 50,
    "balance": 123.45,
    "total_limit": 123.45,
    "micro_payments_enabled": false,
    "micro_payments_limit": 123.45,
    "micro_payments_limit_sum": 123.45,
    "topup_auto": false,
    "topup_to": 123.45,
    "topup_threshold": 123.45
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
PUT https://private.mybrocard.com/api/v2/cards/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "title": "Lorem Ipsum",
    "user_id": 1,
    "state": 2,
    "archived": false,
    "tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
    "transaction_limit": 50,
    "balance": 123.45,
    "total_limit": 123.45,
    "micro_payments_enabled": false,
    "micro_payments_limit": 123.45,
    "micro_payments_limit_sum": 123.45,
    "topup_auto": false,
    "topup_to": 123.45,
    "topup_threshold": 123.45,
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tz' => 'America/New_York',
            'title' => 'Lorem Ipsum',
            'user_id' => 1,
            'state' => 2,
            'archived' => false,
            'tags' => [
                'b001a675-6fd6-41f4-8139-a4dcb8a917b0',
            ],
            'transaction_limit' => 50.0,
            'balance' => 123.45,
            'total_limit' => 123.45,
            'micro_payments_enabled' => false,
            'micro_payments_limit' => 123.45,
            'micro_payments_limit_sum' => 123.45,
            'topup_auto' => false,
            'topup_to' => 123.45,
            'topup_threshold' => 123.45,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 1,
    "title": "Card example",
    "last_four": "1234",
    "bin": "123456",
    "balance_type": "account_balance",
    "currency": "USD",
    "available": "123.45",
    "spend": "123.45",
    "archived": false,
    "state": {
        "value": 2,
        "label": "Paused",
        "deferred_state": {
            "value": 3,
            "label": "Blocked",
            "perform_at": "2022-12-30 02:00:00"
        }
    },
    "micro_payments_enabled": true,
    "micro_payments_limit": "10.00",
    "micro_payments_limit_sum": "100.00",
    "user": {
        "id": 2,
        "email": "cardholder@email.host",
        "name": "Card holder",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "tags": [
        {
            "uuid": "b001a675-6fd6-41f4-8139-a4dcb8a917b0",
            "name": "Team owner tag",
            "personal": false,
            "user": {
                "id": 2,
                "uuid": "9f9657e1-4bc9-11ee-858c-0242c0a8dc07",
                "email": "cardholder@email.host",
                "name": "Card holder"
            }
        },
        {
            "uuid": "b847824d-6661-4951-b52a-b5badeb14b77",
            "name": "Member tag",
            "personal": true,
            "user": {
                "id": 3,
                "uuid": "9f9679e0-4bc9-11ee-858c-0242c0a8dc07",
                "email": "member@email.host",
                "name": "Member"
            }
        }
    ],
    "limits": [
        {
            "type": "transaction_limit",
            "amount": "100.00"
        },
        {
            "type": "total_limit",
            "amount": "1000.00"
        }
    ],
    "date": "2022-06-24 10:06:10",
    "billing_address": "Baker street 221B, London",
    "request_id": "7b069c5d-3e31-41f1-a196-51ba9cfa9a4e"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "balance": [
            "The balance prohibited with specified BIN."
        ],
        "state": [
            "The state is prohibits when archived is present."
        ],
        "archived": [
            "The archived is prohibits when state is present."
        ]
    },
    "request_id": "5c162bf7-e988-44cc-bff2-001086b4094a"
}
 

Request      

PUT api/v2/cards/{card_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

card_id   integer   

The ID of the card. Example: 1

card   integer   

The ID of the card Example: 16

Body Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

title   string  optional  

The card title. Must be at least 1 character. Must not be greater than 255 characters. Example: Lorem Ipsum

user_id   integer  optional  

The user ID for change cardholder. Example: 1

state   string  optional  

The values of card state: Prohibited when present archived field.
2 - «Active»
3 - «Blocked»
4 - «Paused»
Default: not affected if not present. Example: 2

archived   boolean  optional  

The archive mode. Prohibited when present state field.
false - «Recover from archive (available for archived)»
true - «Throw into archive (available for paused or blocked)»
Default: not affected if not present. Example: false

tags   string[]  optional  

The UUIDs of tags. Has no effect if the request does not have "tags" property. But if the request "tags" are equal to an array, then tags of a card will be overridden (even if array is empty). Must be a valid UUID.

transaction_limit   number  optional  

The limit per transaction. Example: 50

balance   number  optional  

The card balance. Required for BIN with card_balance support. Available for BIN with card_balance support. Example: 123.45

total_limit   number  optional  

The total limit of card. Available for BIN with account_balance support. Prohibited for BIN with card_balance support. Example: 123.45

micro_payments_enabled   boolean  optional  

Indicates whether micropayments should be enabled. (required if presented micro_payments_limit or micro_payments_limit_sum true). Available for BIN with account_balance support.
false - «Disable micropayments»
true - «Activate micropayments»
Default: false when deactivating card. In other cases not affected if not present. Example: false

micro_payments_limit   number  optional  

The allowed limit for each payment from inactive cards (required with micro_payments_enabled equals true). Available for BIN with account_balance support. Example: 123.45

micro_payments_limit_sum   number  optional  

The maximum amount of all micropayments on the card will not exceed this value (required with micro_payments_enabled equals true). Available for BIN with account_balance support. Example: 123.45

topup_auto   boolean  optional  

Indicates whether automatic top-ups should be enabled. Available for BIN with card_balance support. Example: false

topup_to   number  optional  

The total amount of the card balance after automatic top-up (if card balance falls below the threshold). Available for BIN with card_balance support. Example: 123.45

topup_threshold   number  optional  

The minimum card balance threshold for applying automatic top-up. Available for BIN with card_balance support. Example: 123.45

Response

Response Fields

id   integer   

The card ID

title   string   

The card title

last_four   string   

The last four numbers of card

bin   string   

The card BIN number

balance_type   string   

The balance type of available amount

currency   string   

The currency of card amount

available   string   

The available balance

spend   string   

The actual spend of card

archived   boolean   

The card archive mode

topup   object[]   

The settings of top-up (Available for BIN with card_balance support)

auto   boolean   

Indicates whether automatic top-ups should be enabled

amount   number   

The amount of automatic top-up of the card (if card balance falls below the threshold).

threshold   number   

The minimum card balance threshold for applying automatic top-up.

micro_payments_enabled   boolean   

Indicates whether micropayments should be enabled.

micro_payments_limit   number   

The allowed limit for each payment from inactive cards with account_balance supported BINs.

micro_payments_limit_sum   number   

The maximum amount of all micropayments on the cards with account_balance supported BINs.

state   object   

The card state with label (and with deferred_state if exists)

user   object   

The card user with team

tags   object[]   

The card tags with owner

uuid      

The UUID of tag for filter by tag

name      

The tag name

personal      

The sign of belonging to the owner of the card

user      

The tag user

limits   object[]   

The card limits

date   string   

The card creation date (at user timezone)

Log: List changes.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/cards/1/log?tz=America%2FNew_York&page=1&per_page=50" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards/1/log"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "page=1",
    "per_page=50"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/cards/1/log
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "page": 1,
    "per_page": 50,
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards/1/log';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'page' => 1,
            'per_page' => 50,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 2,
            "event": {
                "value": "updated",
                "label": "Updated"
            },
            "changes": [
                {
                    "changed": "total_limit",
                    "before": "50.00",
                    "after": "399.00"
                }
            ],
            "available": "399.00",
            "card": {
                "id": 1,
                "title": "Card title",
                "last_four": "1234"
            },
            "user": {
                "id": 1,
                "name": "Card holder"
            },
            "date": "1999-12-31 12:59:59"
        }
    ],
    "total": 7,
    "per_page": 50,
    "current_page": 1,
    "last_page": 1,
    "request_id": "cba74cf9-45ac-4865-8fb0-65b897979fa7"
}
 

Request      

GET api/v2/cards/{card}/log

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

card   integer   

The card. Example: 1

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

page   integer  optional  

The page number. Must be at least 1. Example: 1

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

Response

Response Fields

id   integer   

The log ID

event   object   

The event name

changes   string[][]   

The changed values before and after

available   string   

The available balance

card   object   

The updated card

user   object   

The user who updated card

date   string   

The date of card update (at user timezone).

total   integer   

The total amount of logs

per_page   integer   

The amount of logs per page

current_page   integer   

The current page number

last_page   integer   

The last page number

Embed: Create link.

requires authentication

Generates a temporary one-time link that will be available until the first use within two days after creation.

Example request: bash javascript json php

curl --request POST \
    "https://private.mybrocard.com/api/v2/cards/1/embed" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards/1/embed"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
POST https://private.mybrocard.com/api/v2/cards/1/embed
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards/1/embed';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "link": "https://private.mybrocard.com/api/v2/cards/1/embed/fc2b5ecf-622d-44a4-a3fa-10ed3238745d",
    "request_id": "9e055f16-58c8-453c-951e-fa98447d386a"
}
 

Request      

POST api/v2/cards/{card_id}/embed

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

card_id   integer   

The ID of the card. Example: 1

card   integer   

The ID of the card Example: 8

Response

Response Fields

link   string   

The card embed link with temporary pre-created one-time UUID

Embed: Show embedded.

Displaying the embedded card for iFrame.
After successfully displaying the result, the link becomes unavailable.
To re-request, you need to generate a new link.

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/cards/1/embed/fc2b5ecf-622d-44a4-a3fa-10ed3238745d" \
    --header "Content-Type: text/html" \
    --header "Accept: text/html"
const url = new URL(
    "https://private.mybrocard.com/api/v2/cards/1/embed/fc2b5ecf-622d-44a4-a3fa-10ed3238745d"
);

const headers = {
    "Content-Type": "text/html",
    "Accept": "text/html",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/cards/1/embed/fc2b5ecf-622d-44a4-a3fa-10ed3238745d
Content-Typetext/html
Accepttext/html
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/cards/1/embed/fc2b5ecf-622d-44a4-a3fa-10ed3238745d';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'text/html',
            'Accept' => 'text/html',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


<!doctype html>
<html lang="en">
<head>
    <title>Embedded card</title>
    <link rel="stylesheet" type="text/css" href="">
    <style> /* style */ </style>
    <script type="text/javascript"> /* script */ </script>
</head>
<body>
<div id="card">
    <div class="logo"><img src="" alt=""></div>
    <div class="paymentSystem"><img src="" alt=""></div>
    <div id="pan">
        <span>1234</span><span class="pan-separator"></span>
        <span>5678</span><span class="pan-separator"></span>
        <span>9012</span><span class="pan-separator"></span>
        <span>3456</span><img class="pan-icon" src="" alt="">
    </div>
    <div id="expiry-wrapper">
        <div id="date">
            <span class="low-description">EXP</span>
            12/99<img class="low-description-icon" src="" alt="">
        </div>
    </div>
    <div id="cvv-wrapper">
        <div>
            <span class="low-description">CVV</span>
            123<img class="low-description-icon" src="" alt="">
        </div>
    </div>
</div>
</body>
</html>

 

Request      

GET api/v2/cards/{card_id}/embed/{token}

Headers

Content-Type      

Example: text/html

Accept      

Example: text/html

URL Parameters

card_id   integer   

The ID of the card. Example: 1

token   string   

The temporary pre-created one-time UUID for embed request. Example: fc2b5ecf-622d-44a4-a3fa-10ed3238745d

card   integer   

The ID of the card Example: 16

Company.

BIN: List card bins.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/company/bins" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/company/bins"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/company/bins
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/company/bins';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "bin": "123456",
            "description": "123456 Visa Credit USD",
            "balance_type": "card_balance",
            "payment_restrictions": "For advertisement payments only"
        },
        {
            "bin": "654321",
            "description": "654321 Mastercard Credit USD",
            "balance_type": "account_balance",
            "payment_restrictions": "For advertisement payments and services"
        }
    ],
    "total": 2,
    "request_id": "ddbdacfc-a80a-43c6-a152-f027564cf89a"
}
 

Request      

GET api/v2/company/bins

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

bin   string   

The card BIN number

description   string   

The card BIN description

balance_type   string   

Type of balance of issued cards

payment_restrictions   string   

The card BIN restrictions for payments on issued cards

total   integer   

The total amount of bins

Payments

APIs for managing payments statistics

List payments.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/payments-beta?tz=America%2FNew_York&page=1&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&bins[]=123456&cards[]=1&countries[]=1&declines[]=balance-less-than-amount&ids[]=1&merchants[]=1&states[]=1&teams[]=1&users[]=1&tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0&micro=only" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/payments-beta"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "page=1",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "bins[]=123456",
    "cards[]=1",
    "countries[]=1",
    "declines[]=balance-less-than-amount",
    "ids[]=1",
    "merchants[]=1",
    "states[]=1",
    "teams[]=1",
    "users[]=1",
    "tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0",
    "micro=only"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/payments-beta
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "page": 1,
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "bins": ["123456"],
    "cards": [1],
    "countries": [1],
    "declines": ["balance-less-than-amount"],
    "ids": [1],
    "merchants": [1],
    "states": [1],
    "teams": [1],
    "users": [1],
    "tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
    "micro": "only",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/payments-beta';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'page' => 1,
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'bins' => ['123456'],
            'cards' => [1],
            'countries' => [1],
            'declines' => ['balance-less-than-amount'],
            'ids' => [1],
            'merchants' => [1],
            'states' => [1],
            'teams' => [1],
            'users' => [1],
            'tags' => ['b001a675-6fd6-41f4-8139-a4dcb8a917b0'],
            'micro' => 'only',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 1,
            "amount": "100.00",
            "currency": "USD",
            "merchant": {
                "id": 1,
                "mcc": "0123",
                "name": "Facebook",
                "descriptor": "FACEBK ADS",
                "country": {
                    "id": 2,
                    "code": "US"
                }
            },
            "state": {
                "value": 1,
                "label": "SETTLED"
            },
            "is_micro": true,
            "decline": "card-blocked",
            "user": {
                "id": 2,
                "email": "payer@email.host",
                "name": "payer",
                "team": {
                    "id": 1,
                    "name": "Dummy team"
                }
            },
            "card": {
                "id": 1,
                "title": "Card title",
                "last_four": "1234",
                "bin": "123456"
            },
            "fees": [
                {
                    "type": "payment fee",
                    "amount": "1.23",
                    "currency": "USD"
                }
            ],
            "date": "1999-12-31 23:59:59",
            "date_received": "2000-01-01 00:00:00"
        }
    ],
    "total": 100,
    "per_page": 50,
    "current_page": 1,
    "last_page": 2,
    "request_id": "bce26baa-1873-4b14-8d92-60dba063bf50"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "dates.begin": [
            "The dates.begin does not match the format Y-m-d H:i:s."
        ],
        "dates.end": [
            "The dates.end does not match the format Y-m-d H:i:s."
        ],
        "states.0": [
            "The states.0 field is not a valid enum."
        ]
    },
    "request_id": "a50feedf-d23b-47d6-81a9-e33a45c13e09"
}
 

Request      

GET api/v2/payments-beta

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

page   integer  optional  

The page number. Must be at least 1. Example: 1

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or at custom timezone from tz param).
If this field is empty, then last 30 days will be applied.

dates.begin   string  optional  

Begin of the date range.
If this field is empty, then last 30 days will be applied. Example: 2024-08-04

dates.end   string  optional  

End of the date range.
If this field is empty, then last 30 days will be applied. Example: 2024-08-05

bins   string[]  optional  

The card BIN numbers.

cards   integer[]  optional  

The IDs of cards.

countries   integer[]  optional  

The IDs of countries.

declines   string[]  optional  

The decline reasons:
balance-less-than-amount - «Account balance exceeded»
limit-transaction-less-than-amount - «Transaction limit exceeded»
limit-cart-less-than-amount - «Card limit exceeded»
unknown-descriptor - «Unknown descriptor»
merchant-not-allowed - «Merchant not allowed»
unknown-mcc - «Unknown merchant»
card-paused - «Card paused»
card-blocked - «Card blocked»
declined-by-merchant - «Card declined by merchant»
verification-error - «Card verification error»
declined-by-bank - «Card declined by bank»
network-error - «Network error»
card-balance-less-than-amount - «Card balance exceeded»
fraud_suspicion - «Suspicion of fraud»
negative_balance - «Negative balance»
Default: not affected if not present.

ids   integer[]  optional  

The IDs of payments.

merchants   integer[]  optional  

The IDs of merchants.

states   string[]  optional  

The values of payment states:
1 - «Settled»
2 - «Void»
3 - «Pending»
4 - «Declined»
Default: not affected if not present.

teams   integer[]  optional  

The IDs of teams.

users   integer[]  optional  

The IDs of users.

tags   string[]  optional  

The UUIDs of tags. Must be a valid UUID.

micro   string  optional  

The filter of micro payments:
include - «All, include micro payments»
only - «Only micro payments»
exclude - «All, exclude micro payments»
Default: include. Example: only

Response

Response Fields

id   integer   

The payment ID

amount   string   

The payment amount

currency   string   

The currency of payment amount

state   object   

The payment state with label

is_micro   boolean   

The allowed payment from inactive card

decline   string   

The decline reason

merchant   object   

The merchant descriptor with mcc and country

user   object   

The payment user with team

card   object   

The payment card with BIN number

fees   object   

The list of payment commissions

date   string   

The payment creation date (at user timezone)

date_received   string   

The payment received date (at user timezone)

total   integer   

The total amount of payments

per_page   integer   

The amount of payments per page

current_page   integer   

The current page number

last_page   integer   

The last page number

List payments (DEPRECATED).

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/payments?tz=America%2FNew_York&cursor=null&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&bins[]=123456&cards[]=1&countries[]=1&declines[]=balance-less-than-amount&ids[]=1&merchants[]=1&states[]=1&teams[]=1&users[]=1&tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0&micro=only" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/payments"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "cursor=null",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "bins[]=123456",
    "cards[]=1",
    "countries[]=1",
    "declines[]=balance-less-than-amount",
    "ids[]=1",
    "merchants[]=1",
    "states[]=1",
    "teams[]=1",
    "users[]=1",
    "tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0",
    "micro=only"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/payments
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "cursor": "null",
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "bins": ["123456"],
    "cards": [1],
    "countries": [1],
    "declines": ["balance-less-than-amount"],
    "ids": [1],
    "merchants": [1],
    "states": [1],
    "teams": [1],
    "users": [1],
    "tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
    "micro": "only",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/payments';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'cursor' => 'null',
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'bins' => ['123456'],
            'cards' => [1],
            'countries' => [1],
            'declines' => ['balance-less-than-amount'],
            'ids' => [1],
            'merchants' => [1],
            'states' => [1],
            'teams' => [1],
            'users' => [1],
            'tags' => ['b001a675-6fd6-41f4-8139-a4dcb8a917b0'],
            'micro' => 'only',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 1,
            "amount": "100.00",
            "currency": "USD",
            "merchant": {
                "id": 1,
                "mcc": "0123",
                "name": "Facebook",
                "descriptor": "FACEBK ADS",
                "country": {
                    "id": 2,
                    "code": "US"
                }
            },
            "state": {
                "value": 1,
                "label": "SETTLED"
            },
            "is_micro": true,
            "decline": "card-blocked",
            "user": {
                "id": 2,
                "email": "payer@email.host",
                "name": "payer",
                "team": {
                    "id": 1,
                    "name": "Dummy team"
                }
            },
            "card": {
                "id": 1,
                "title": "Card title",
                "last_four": "1234",
                "bin": "123456"
            },
            "fees": [
                {
                    "type": "payment fee",
                    "amount": "1.23",
                    "currency": "USD"
                }
            ],
            "date": "1999-12-31 23:59:59",
            "date_received": "2000-01-01 00:00:00"
        }
    ],
    "per_page": 20,
    "prev_cursor": "eyJwYXltZW50cy5pZCI6MywiX3BvaW50c1RvTmV4dEl0ZW1zIjpmYWxzZX0",
    "next_cursor": "eyJwYXltZW50cy5pZCI6NCwiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ",
    "request_id": "bce26baa-1873-4b14-8d92-60dba063bf50"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "dates.begin": [
            "The dates.begin does not match the format Y-m-d H:i:s."
        ],
        "dates.end": [
            "The dates.end does not match the format Y-m-d H:i:s."
        ],
        "states.0": [
            "The states.0 field is not a valid enum."
        ]
    },
    "request_id": "a50feedf-d23b-47d6-81a9-e33a45c13e09"
}
 

Request      

GET api/v2/payments

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

cursor   string  optional  

The cursor from response to any page. Example: null

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or at custom timezone from tz param).

dates.begin   string  optional  

Begin of the date range. Example: 2024-08-04

dates.end   string  optional  

End of the date range. Example: 2024-08-05

bins   string[]  optional  

The card BIN numbers.

cards   integer[]  optional  

The IDs of cards.

countries   integer[]  optional  

The IDs of countries.

declines   string[]  optional  

The decline reasons:
balance-less-than-amount - «Account balance exceeded»
limit-transaction-less-than-amount - «Transaction limit exceeded»
limit-cart-less-than-amount - «Card limit exceeded»
unknown-descriptor - «Unknown descriptor»
merchant-not-allowed - «Merchant not allowed»
unknown-mcc - «Unknown merchant»
card-paused - «Card paused»
card-blocked - «Card blocked»
declined-by-merchant - «Card declined by merchant»
verification-error - «Card verification error»
declined-by-bank - «Card declined by bank»
network-error - «Network error»
card-balance-less-than-amount - «Card balance exceeded»
fraud_suspicion - «Suspicion of fraud»
negative_balance - «Negative balance»
Default: not affected if not present.

ids   integer[]  optional  

The IDs of payments.

merchants   integer[]  optional  

The IDs of merchants.

states   string[]  optional  

The values of payment states:
1 - «Settled»
2 - «Void»
3 - «Pending»
4 - «Declined»
Default: not affected if not present.

teams   integer[]  optional  

The IDs of teams.

users   integer[]  optional  

The IDs of users.

tags   string[]  optional  

The UUIDs of tags. Must be a valid UUID.

micro   string  optional  

The filter of micro payments:
include - «All, include micro payments»
only - «Only micro payments»
exclude - «All, exclude micro payments»
Default: include. Example: only

Response

Response Fields

id   integer   

The payment ID

amount   string   

The payment amount

currency   string   

The currency of payment amount

state   object   

The payment state with label

is_micro   boolean   

The allowed payment from inactive card

decline   string   

The decline reason

merchant   object   

The merchant descriptor with mcc and country

user   object   

The payment user with team

card   object   

The payment card with BIN number

fees   object   

The list of payment commissions

date   string   

The payment creation date (at user timezone)

date_received   string   

The payment received date (at user timezone)

per_page   integer   

The amount of payments per page

prev_cursor   string   

The cursor to previous page

next_cursor   string   

The cursor to next page

Show payment.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/payments/1?tz=America%2FNew_York" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/payments/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/payments/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/payments/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 1,
    "amount": "100.00",
    "currency": "USD",
    "merchant": {
        "id": 1,
        "mcc": "0123",
        "name": "Facebook",
        "descriptor": "FACEBK ADS",
        "country": {
            "id": 2,
            "code": "US"
        }
    },
    "state": {
        "value": 1,
        "label": "SETTLED"
    },
    "is_micro": true,
    "decline": "card-blocked",
    "user": {
        "id": 2,
        "email": "payer@email.host",
        "name": "payer",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "card": {
        "id": 1,
        "title": "Card title",
        "last_four": "1234",
        "bin": "123456"
    },
    "fees": [
        {
            "type": "payment fee",
            "amount": "1.23",
            "currency": "USD"
        }
    ],
    "date": "2022-06-19 05:48:01",
    "date_received": "2022-06-19 05:48:02",
    "request_id": "9d4ac0da-ad72-48a4-a5b0-7689448607a4"
}
 

Request      

GET api/v2/payments/{payment_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

payment_id   integer   

The ID of the payment. Example: 1

payment   integer   

The ID of the payment. Example: 12

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

Response

Response Fields

id   integer   

The payment ID

amount   string   

The payment amount

currency   string   

The currency of payment amount

state   object   

The payment state with label

is_micro   boolean   

The allowed payment from inactive card

decline   string   

The decline reason

merchant   object   

The merchant descriptor with mcc and country

user   object   

The payment user with team

card   object   

The payment card with BIN number

fees   object   

The payment commissions

date   string   

The payment creation date (at user timezone)

date_received   string   

The payment received date (at user timezone)

Groups of payments.

requires authentication

This endpoint allows you to group your payments by different criteria for getting statistics.

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/payments/group?tz=America%2FNew_York&page=1&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&group=user&bins[]=123456&cards[]=1&countries[]=1&declines[]=balance-less-than-amount&ids[]=1&merchants[]=1&states[]=1&teams[]=1&users[]=1&tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0&micro=only" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/payments/group"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "page=1",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "group=user",
    "bins[]=123456",
    "cards[]=1",
    "countries[]=1",
    "declines[]=balance-less-than-amount",
    "ids[]=1",
    "merchants[]=1",
    "states[]=1",
    "teams[]=1",
    "users[]=1",
    "tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0",
    "micro=only"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/payments/group
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "page": 1,
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "group": "user",
    "bins": ["123456"],
    "cards": [1],
    "countries": [1],
    "declines": ["balance-less-than-amount"],
    "ids": [1],
    "merchants": [1],
    "states": [1],
    "teams": [1],
    "users": [1],
    "tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
    "micro": "only",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/payments/group';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'page' => 1,
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'group' => 'user',
            'bins' => ['123456'],
            'cards' => [1],
            'countries' => [1],
            'declines' => ['balance-less-than-amount'],
            'ids' => [1],
            'merchants' => [1],
            'states' => [1],
            'teams' => [1],
            'users' => [1],
            'tags' => ['b001a675-6fd6-41f4-8139-a4dcb8a917b0'],
            'micro' => 'only',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, group by team):


{
    "data": [
        {
            "group": {
                "type": "team",
                "entity": {
                    "id": 1,
                    "name": "customer_team"
                }
            },
            "settled": {
                "amount": "7101.00",
                "count": 16
            },
            "pending": {
                "amount": "0.00",
                "count": 0
            },
            "void": {
                "amount": "3373.00",
                "count": 5
            },
            "declined": {
                "amount": "2834.00",
                "count": 4
            },
            "commission": {
                "payment": {
                    "amount": "80.10",
                    "count": 15
                },
                "decline": {
                    "amount": "15.75",
                    "count": 4
                }
            },
            "decline_rate": 8,
            "amount": "7196.85",
            "count": 25
        }
    ],
    "summary": {
        "group": {
            "label": "by Team",
            "type": "team"
        },
        "settled": {
            "amount": "7101.00",
            "count": 16
        },
        "pending": {
            "amount": "0.00",
            "count": 0
        },
        "void": {
            "amount": "3373.00",
            "count": 5
        },
        "declined": {
            "amount": "2834.00",
            "count": 4
        },
        "commission": {
            "payment": {
                "amount": "80.10",
                "count": 15
            },
            "decline": {
                "amount": "15.75",
                "count": 4
            }
        },
        "decline_rate": 8,
        "amount": "7196.85",
        "count": 25
    },
    "total": 1,
    "per_page": 50,
    "current_page": 1,
    "last_page": 1,
    "request_id": "61a37ce9-c039-4c5a-b31a-dd4916d71082"
}
 

Example response (200, group by month):


{
    "data": [
        {
            "group": {
                "type": "month",
                "entity": {
                    "short": "2024-02",
                    "begin": "2024-02-01 00:00:00",
                    "end": "2024-02-29 23:59:59"
                }
            },
            "settled": {
                "amount": "7101.00",
                "count": 16
            },
            "pending": {
                "amount": "0.00",
                "count": 0
            },
            "void": {
                "amount": "3373.00",
                "count": 5
            },
            "declined": {
                "amount": "2834.00",
                "count": 4
            },
            "commission": {
                "payment": {
                    "amount": "80.10",
                    "count": 15
                },
                "decline": {
                    "amount": "15.75",
                    "count": 4
                }
            },
            "decline_rate": 8,
            "amount": "7196.85",
            "count": 25
        }
    ],
    "summary": {
        "group": {
            "label": "by Month",
            "type": "month"
        },
        "settled": {
            "amount": "7101.00",
            "count": 16
        },
        "pending": {
            "amount": "0.00",
            "count": 0
        },
        "void": {
            "amount": "3373.00",
            "count": 5
        },
        "declined": {
            "amount": "2834.00",
            "count": 4
        },
        "commission": {
            "payment": {
                "amount": "80.10",
                "count": 15
            },
            "decline": {
                "amount": "15.75",
                "count": 4
            }
        },
        "decline_rate": 8,
        "amount": "7196.85",
        "count": 25
    },
    "total": 1,
    "per_page": 50,
    "current_page": 1,
    "last_page": 1,
    "request_id": "61a37ce9-c039-4c5a-b31a-dd4916d71082"
}
 

Example response (422, validation error):


{
    "message": "The group field is required.",
    "errors": {
        "group": [
            "The group field is required."
        ]
    },
    "request_id": "f269088a-2698-4f86-bc8f-ca89d9c4ee67"
}
 

Request      

GET api/v2/payments/group

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

page   integer  optional  

The page number. Must be at least 1. Example: 1

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or custom timezone from tz param).

dates.begin   string  optional  

Begin of the date range. This field is required when group is date, week, or month. Example: 2024-08-04

dates.end   string  optional  

End of the date range. This field is required when group is date, week, or month. Example: 2024-08-05

group   string   

The grouping cases:
date - «by Date»
week - «by Week»
month - «by Month»
team - «by Team»
user - «by User»
card - «by Card»
country - «by Country»
merchant - «by Merchant»
mcc - «by MCC»
tag - «by Tag»
Example: user

bins   string[]  optional  

The card BIN numbers.

cards   integer[]  optional  

The IDs of cards.

countries   integer[]  optional  

The IDs of countries.

declines   string[]  optional  

The decline reasons:
balance-less-than-amount - «Account balance exceeded»
limit-transaction-less-than-amount - «Transaction limit exceeded»
limit-cart-less-than-amount - «Card limit exceeded»
unknown-descriptor - «Unknown descriptor»
merchant-not-allowed - «Merchant not allowed»
unknown-mcc - «Unknown merchant»
card-paused - «Card paused»
card-blocked - «Card blocked»
declined-by-merchant - «Card declined by merchant»
verification-error - «Card verification error»
declined-by-bank - «Card declined by bank»
network-error - «Network error»
card-balance-less-than-amount - «Card balance exceeded»
fraud_suspicion - «Suspicion of fraud»
negative_balance - «Negative balance»
Default: not affected if not present.

ids   integer[]  optional  

The IDs of payments.

merchants   integer[]  optional  

The IDs of merchants.

states   string[]  optional  

The values of payment states:
1 - «Settled»
2 - «Void»
3 - «Pending»
4 - «Declined»
Default: not affected if not present.

teams   integer[]  optional  

The IDs of teams.

users   integer[]  optional  

The IDs of users.

tags   string[]  optional  

The UUIDs of tags. Must be a valid UUID.

micro   string  optional  

The filter of micro payments:
include - «All, include micro payments»
only - «Only micro payments»
exclude - «All, exclude micro payments»
Default: include. Example: only

Response

Response Fields

data   object[]   

The list of grouped payments

group   object   

Describing grouped entity

type   string   

The type of grouping

Must be one of:
  • date
  • week
  • month
  • team
  • user
  • card
  • country
  • merchant
  • mcc
  • tag
entity   object   

The brief info about grouped entity

settled   object   

Settled payments

amount   number   
count   integer   
pending   object   

Pending payments

amount   number   
count   integer   
void   object   

Void payments

amount   number   
count   integer   
declined   object   

Declined payments

amount   number   
count   integer   
commission   object   

Commissions of payments and declines

payment   object   

Payment commission

amount   number   
count   integer   
decline   object   

Decline commission

amount   number   
count   integer   
decline_rate   object   

Decline rate

amount   number   

Total amount of expenses

count   integer   

Total count of payments

summary   object   

The totals of filtered groups (for all pages)

group   object   

The type and label of grouping

type   string   

Grouping type

Must be one of:
  • date
  • week
  • month
  • team
  • user
  • card
  • country
  • merchant
  • mcc
  • tag
label   string   

Label of grouping type

settled   object   

Settled payments

amount   number   
count   integer   
pending   object   

Pending payments

amount   number   
count   integer   
void   object   

Void payments

amount   number   
count   integer   
declined   object   

Declined payments

amount   number   
count   integer   
commission   object   

Commissions of payments and declines

payment   object   

Payment commission

amount   number   
count   integer   
decline   object   

Decline commission

amount   number   
count   integer   
decline_rate   number   

Decline rate

amount   number   

Total expense

count   integer   

Total payments

total   integer   

The total amount of groups

per_page   integer   

The amount of groups per page

current_page   integer   

The current page number

last_page   integer   

The last page number

Refunds

List refunds.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/refunds?tz=America%2FNew_York&cursor=null&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&bins[]=654321&cards[]=1&ids[]=1&teams[]=1&users[]=1" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/refunds"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "cursor=null",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "bins[]=654321",
    "cards[]=1",
    "ids[]=1",
    "teams[]=1",
    "users[]=1"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/refunds
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "cursor": "null",
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "bins": ["654321"],
    "cards": [1],
    "ids": [1],
    "teams": [1],
    "users": [1],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/refunds';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'cursor' => 'null',
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'bins' => ['654321'],
            'cards' => [1],
            'ids' => [1],
            'teams' => [1],
            'users' => [1],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 1,
            "amount": "100.00",
            "currency": "USD",
            "user": {
                "id": 2,
                "email": "payer@email.host",
                "name": "payer",
                "team": {
                    "id": 1,
                    "name": "Dummy team"
                }
            },
            "card": {
                "id": 1,
                "title": "Card title",
                "last_four": "1234",
                "bin": "123456"
            },
            "date": "1999-12-31 23:59:59"
        }
    ],
    "per_page": 20,
    "prev_cursor": "eyJwYXltZW50cy5pZCI6MywiX3BvaW50c1RvTmV4dEl0ZW1zIjpmYWxzZX0",
    "next_cursor": "eyJwYXltZW50cy5pZCI6NCwiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ",
    "request_id": "bce26baa-1873-4b14-8d92-60dba063bf50"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "dates.begin": [
            "The dates.begin does not match the format Y-m-d H:i:s."
        ],
        "dates.end": [
            "The dates.end does not match the format Y-m-d H:i:s."
        ]
    },
    "request_id": "a50feedf-d23b-47d6-81a9-e33a45c13e09"
}
 

Request      

GET api/v2/refunds

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

cursor   string  optional  

The cursor from response to any page. Example: null

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or at custom timezone from tz param).

dates.begin   string  optional  

Begin of the date range. Example: 2024-08-04

dates.end   string  optional  

End of the date range. Example: 2024-08-05

bins   string[]  optional  

The card BIN numbers.

cards   integer[]  optional  

The IDs of cards.

ids   integer[]  optional  

The IDs of refunds.

teams   integer[]  optional  

The IDs of teams.

users   integer[]  optional  

The IDs of users.

Response

Response Fields

id   integer   

The refund ID

amount   string   

The refund amount

currency   string   

The currency of refund amount

user   object   

The refund user with team

card   object   

The refund card with BIN number

date   string   

The refund creation date (at user timezone)

per_page   integer   

The amount of payments per page

prev_cursor   string   

The cursor to previous page

next_cursor   string   

The cursor to next page

Show refund.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/refunds/1?tz=America%2FNew_York" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/refunds/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/refunds/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/refunds/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 1,
    "amount": "100.00",
    "currency": "USD",
    "user": {
        "id": 2,
        "email": "payer@email.host",
        "name": "payer",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "card": {
        "id": 1,
        "title": "Card title",
        "last_four": "1234",
        "bin": "123456"
    },
    "date": "1999-12-31 23:59:59",
    "request_id": "2141b47b-aad8-4eeb-99de-0ed027c7393d"
}
 

Request      

GET api/v2/refunds/{refund_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

refund_id   integer   

The ID of the refund. Example: 1

refund   integer   

The ID of the refund. Example: 11

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

Response

Response Fields

id   integer   

The refund ID

amount   string   

The refund amount

currency   string   

The currency of refund amount

user   object   

The refund user with team

card   object   

The refund card with BIN number

date   string   

The refund creation date (at user timezone)

Tags.

List tags.

requires authentication

The list of card tags created by all company members.

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/tags?users[]=56" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/tags"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "users[]=56"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/tags
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "users": [56],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/tags';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'users' => [56],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "uuid": "b001a675-6fd6-41f4-8139-a4dcb8a917b0",
            "name": "Team owner tag",
            "user": {
                "id": 2,
                "uuid": "9f9657e1-4bc9-11ee-858c-0242c0a8dc07",
                "email": "cardholder@email.host",
                "name": "Card holder"
            }
        }
    ],
    "total": 2,
    "request_id": "2ba90ad8-0020-4f95-ae6c-0b9db7f67e47"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "users.0": [
            "The selected users.0 is invalid."
        ]
    },
    "request_id": "8ec74a0c-ba85-4b04-bc46-90a767d062d2"
}
 

Request      

GET api/v2/tags

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

users   integer[]  optional  

The IDs of users.

Response

Response Fields

uuid   string   

The tag UUID

name   string   

The tag name

user   object   

The user info with id, name and email

total   integer   

The total amount of tags

Top-ups

List top-ups.

requires authentication

Personal top-ups list

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/top-ups?tz=America%2FNew_York&cursor=null&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&ids[]=1&methods[]=marketcall&teams[]=1&users[]=1&states[]=2" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/top-ups"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "cursor=null",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "ids[]=1",
    "methods[]=marketcall",
    "teams[]=1",
    "users[]=1",
    "states[]=2"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/top-ups
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "cursor": "null",
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "ids": [1],
    "methods": ["marketcall"],
    "teams": [1],
    "users": [1],
    "states": [2],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/top-ups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'cursor' => 'null',
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'ids' => [1],
            'methods' => ['marketcall'],
            'teams' => [1],
            'users' => [1],
            'states' => [2],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 1,
            "amount": "900.00",
            "income": "1000.00",
            "commission": "10.00",
            "currency": "USD",
            "state": {
                "value": 2,
                "label": "Committed"
            },
            "user": {
                "id": 2,
                "name": "Dummy user",
                "email": "user@email.host",
                "team": {
                    "id": 1,
                    "name": "Dummy team"
                }
            },
            "method": "marketcall",
            "date": "2022-08-30 10:05:31"
        }
    ],
    "per_page": 50,
    "prev_cursor": null,
    "next_cursor": null,
    "request_id": "a3c36e85-342d-49fa-92cf-3fce1de36a14"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "dates.begin": [
            "The dates.begin does not match the format Y-m-d H:i:s."
        ],
        "dates.end": [
            "The dates.end does not match the format Y-m-d H:i:s."
        ],
        "methods.0": [
            "The selected methods.0 is invalid."
        ],
        "states.0": [
            "The states.0 field is not a valid enum."
        ]
    },
    "request_id": "bdddcc10-8936-49a6-acce-26a1660554cc"
}
 

Request      

GET api/v2/top-ups

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

cursor   string  optional  

The cursor from response to any page. Example: null

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or at custom timezone from tz param).

dates.begin   string  optional  

Begin of the date range. Example: 2024-08-04

dates.end   string  optional  

End of the date range. Example: 2024-08-05

ids   integer[]  optional  

The IDs of top-ups.

methods   string[]  optional  

The aliases of top-up methods:
other - «Other»
marketcall - «Marketcall»
capitalist - «Capitalist»
wire - «Wire»
usdt_erc - «USDT (ERC20)»
usdt_trc - «USDT (TRC20)»
usdt_trc_tron - «USDT (TRC20) Tron»
usdt_erc_ether - «USDT (ERC20) Etherium»
usdt_binance - «USDT Binance»
usdt_trc_tron_autotopup - «USDT (TRC20) Tron. NEW!!!»
Default: not affected if not present.

teams   integer[]  optional  

The IDs of teams.

users   integer[]  optional  

The IDs of users.

states   string[]  optional  

The values of top-up states:
1 - «Pending»
2 - «Committed»
3 - «Processing Error»
4 - «Expired»
5 - «Reverted»
Default: not affected if not present.

Response

Response Fields

id   integer   

The top-up ID

amount   string   

The top-up amount after commission

income   string   

The top-up income before commission

commission   string   

The top-up commission from income

currency   string   

The currency of top-up amount

state   object   

The top-up state

user   object   

The top-up user with team

method   string   

The top-up method

date   string   

The top-up creation date (at user timezone)

per_page   integer   

The amount of payments per page

prev_cursor      

The cursor to previous page

next_cursor      

The cursor to next page

Transfers

List Transfers.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/transfers?tz=America%2FNew_York&page=1&per_page=50&dates[begin]=2024-08-04&dates[end]=2024-08-05&ids[]=1&from[]=1&to[]=1" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/transfers"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "page=1",
    "per_page=50",
    "dates[begin]=2024-08-04",
    "dates[end]=2024-08-05",
    "ids[]=1",
    "from[]=1",
    "to[]=1"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/transfers
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "page": 1,
    "per_page": 50,
    "dates": {
        "begin": "2024-08-04",
        "end": "2024-08-05",
    },
    "ids": [1],
    "from": [1],
    "to": [1],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/transfers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'page' => 1,
            'per_page' => 50,
            'dates' => [
                'begin' => '2024-08-04',
                'end' => '2024-08-05',
            ],
            'ids' => [1],
            'from' => [1],
            'to' => [1],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 100500,
            "amount": "123.45",
            "currency": "USD",
            "responsible": {
                "id": 1,
                "email": "owner@email.host",
                "name": "Owner",
                "role": {
                    "id": 3,
                    "name": "team_owner"
                }
            },
            "from": {
                "id": 2,
                "email": "sender@email.host",
                "name": "Sender",
                "role": {
                    "id": 5,
                    "name": "team_media_buyer"
                }
            },
            "to": {
                "id": 3,
                "email": "recipient@email.host",
                "name": "Recipient",
                "role": {
                    "id": 5,
                    "name": "team_media_buyer"
                }
            },
            "comment": "Lorem ipsum",
            "created_at": "2000-01-31 12:59:59"
        }
    ],
    "total": 100,
    "per_page": 50,
    "current_page": 1,
    "last_page": 2,
    "request_id": "afda013d-1089-4691-9c26-47a3c4fbbded"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "dates.begin": [
            "The dates.begin does not match the format Y-m-d H:i:s."
        ],
        "dates.end": [
            "The dates.end does not match the format Y-m-d H:i:s."
        ],
        "from.0": [
            "The from.0 must be an integer."
        ]
    },
    "request_id": "c1088044-813e-4cbb-af00-de8b70dcb031"
}
 

Request      

GET api/v2/transfers

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

page   integer  optional  

The page number. Must be at least 1. Example: 1

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

dates   object  optional  

The date range object at user's profile timezone (or at custom timezone from tz param).

dates.begin   string  optional  

Begin of the date range. Example: 2024-08-04

dates.end   string  optional  

End of the date range. Example: 2024-08-05

ids   integer[]  optional  

The IDs of transfers.

from   integer[]  optional  

The IDs of users (senders).

to   integer[]  optional  

The IDs of users (recipients).

Response

Response Fields

id   integer   

The identifier of money transfer.

amount   string   

The transfer amount.

currency   string   

The currency of transfer amount.

responsible   object   

The user responsible for the transfer.

from   object   

The sender user.

to   object   

The recipient user.

comment   string   

The optional description.

created_at   string   

The datetime string (at user timezone).

total   integer   

The total amount of transfers

per_page   integer   

The amount of transfers per page

current_page   integer   

The current page number

last_page   integer   

The last page number

Create Transfer.

requires authentication

Create money transfer between your team members, or to another team member

Example request: bash javascript json php

curl --request POST \
    "https://private.mybrocard.com/api/v2/transfers" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tz\": \"America\\/New_York\",
    \"from\": \"sender@email.host\",
    \"to\": \"recipient@email.host\",
    \"amount\": 123.45,
    \"currency\": \"USD\",
    \"comment\": \"Lorem ipsum\"
}"
const url = new URL(
    "https://private.mybrocard.com/api/v2/transfers"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tz": "America\/New_York",
    "from": "sender@email.host",
    "to": "recipient@email.host",
    "amount": 123.45,
    "currency": "USD",
    "comment": "Lorem ipsum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
POST https://private.mybrocard.com/api/v2/transfers
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "from": "sender@email.host",
    "to": "recipient@email.host",
    "amount": 123.45,
    "currency": "USD",
    "comment": "Lorem ipsum",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/transfers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tz' => 'America/New_York',
            'from' => 'sender@email.host',
            'to' => 'recipient@email.host',
            'amount' => 123.45,
            'currency' => 'USD',
            'comment' => 'Lorem ipsum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "id": 100500,
    "amount": "123.45",
    "currency": "USD",
    "responsible": {
        "id": 1,
        "email": "owner@email.host",
        "name": "Owner",
        "role": {
            "id": 3,
            "name": "team_owner"
        }
    },
    "from": {
        "id": 2,
        "email": "sender@email.host",
        "name": "Sender",
        "role": {
            "id": 5,
            "name": "team_media_buyer"
        }
    },
    "to": {
        "id": 3,
        "email": "recipient@email.host",
        "name": "Recipient",
        "role": {
            "id": 5,
            "name": "team_media_buyer"
        }
    },
    "comment": "Lorem ipsum",
    "created_at": "2000-01-31 12:59:59",
    "request_id": "9fec70fe-f034-47c5-91e5-31a1b774a57b"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "from": [
            "The from field is required."
        ],
        "to": [
            "The to field is required."
        ],
        "amount": [
            "The amount field is required."
        ]
    },
    "request_id": "aee0e16e-e2ba-4e1c-9159-104fdb7edc20"
}
 

Request      

POST api/v2/transfers

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

from   string   

The definition of sender. Example: sender@email.host

to   string   

The definition of recipient. The value and from must be different. Example: recipient@email.host

amount   number   

The transfer amount. Example: 123.45

currency   string   

The currency of transfer amount. Example: USD

Must be one of:
  • USD
comment   string  optional  

The optional description. Must not be greater than 255 characters. Example: Lorem ipsum

Response

Response Fields

id   integer   

The identifier of money transfer.

amount   string   

The transfer amount.

currency   string   

The currency of transfer amount.

responsible   object   

The user responsible for the transfer.

from   object   

The sender user.

to   object   

The recipient user.

comment   string   

The optional description.

created_at   string   

The datetime string (at user timezone).

Show Transfer.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/transfers/1?tz=America%2FNew_York" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/transfers/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/transfers/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/transfers/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 100500,
    "amount": "123.45",
    "currency": "USD",
    "responsible": {
        "id": 1,
        "email": "owner@email.host",
        "name": "Owner",
        "role": {
            "id": 3,
            "name": "team_owner"
        }
    },
    "from": {
        "id": 2,
        "email": "sender@email.host",
        "name": "Sender",
        "role": {
            "id": 5,
            "name": "team_media_buyer"
        }
    },
    "to": {
        "id": 3,
        "email": "recipient@email.host",
        "name": "Recipient",
        "role": {
            "id": 5,
            "name": "team_media_buyer"
        }
    },
    "comment": "Lorem ipsum",
    "created_at": "2000-01-31 12:59:59",
    "request_id": "9fec70fe-f034-47c5-91e5-31a1b774a57b"
}
 

Request      

GET api/v2/transfers/{transfer_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

transfer_id   integer   

The ID of the transfer. Example: 1

transfer   integer   

The ID of the transfer Example: 8

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

Response

Response Fields

id   integer   

The identifier of money transfer.

amount   string   

The transfer amount.

currency   string   

The currency of transfer amount.

responsible   object   

The user responsible for the transfer.

from   object   

The sender user.

to   object   

The recipient user.

comment   string   

The optional description.

created_at   string   

The datetime string (at user timezone).

Users.

List users.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/users?tz=America%2FNew_York&page=1&per_page=50&ids[]=2&teams[]=1&roles[]=1&states[]=1" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/users"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York",
    "page=1",
    "per_page=50",
    "ids[]=2",
    "teams[]=1",
    "roles[]=1",
    "states[]=1"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/users
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "page": 1,
    "per_page": 50,
    "ids": [2],
    "teams": [1],
    "roles": [1],
    "states": [1],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
            'page' => 1,
            'per_page' => 50,
            'ids' => [2],
            'teams' => [1],
            'roles' => [1],
            'states' => [1],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "id": 2,
            "name": "Dummy user",
            "email": "user@email.host",
            "team": {
                "id": 1,
                "name": "Dummy team"
            },
            "role": {
                "id": 2,
                "name": "team_owner"
            },
            "state": {
                "value": 1,
                "label": "Active"
            },
            "balances": [
                {
                    "total": "1000.00",
                    "reserved": "100.00",
                    "available": "900.00",
                    "currency": "USD"
                }
            ],
            "limits": [
                {
                    "type": "daily_cards_limit",
                    "amount": "10.00"
                },
                {
                    "type": "transaction_limit",
                    "amount": "1000.00"
                }
            ],
            "permissions": {
                "can_edit_card_limits": true,
                "can_block_company_members": true
            },
            "created_at": "2022-07-22 16:01:22",
            "spend": [
                {
                    "total": "750.21",
                    "currency": "USD"
                }
            ]
        }
    ],
    "total": 1,
    "per_page": 50,
    "current_page": 1,
    "last_page": 1,
    "request_id": "8dda3c04-a68c-4285-ac8c-8d1b222e806e"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "ids": [
            "The ids must be an array."
        ],
        "teams": [
            "The teams must be an array."
        ],
        "roles": [
            "The roles must be an array."
        ],
        "states": [
            "The states must be an array."
        ]
    },
    "request_id": "507173eb-6b00-4d6e-9617-e6904f2a9ffe"
}
 

Request      

GET api/v2/users

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

page   integer  optional  

The page number. Must be at least 1. Example: 1

per_page   integer  optional  

The amount of items per page. Must be at least 0. Must not be greater than 1000. Example: 50

ids   integer[]  optional  

The IDs of users.

teams   integer[]  optional  

The IDs of teams.

roles   integer[]  optional  

The IDs of roles.

states   string[]  optional  

The values of user states:
1 - «Active»
2 - «Blocked»
3 - «Pending»
4 - «Suspended»
5 - «Rejected»
6 - «Waiting for interview»
Default: not affected if not present.

Response

Response Fields

id   integer   

The user ID

name   string   

The username

email   string   

The user email

team   object   

The user team

role   object   

The user role

state   object   

The user state with label

balances   object[]   

The user balances

limits   object[]   

The user limits

permissions   object   
can_edit_card_limits   object   

The permission allows user to change limits of cards

can_block_company_members   boolean   

The permission for blocking member of company

created_at   string   

The user creation date (at user timezone)

spend   object[]   

amounts of money spent from various accounts

total   integer   

The total amount of users

per_page   integer   

The amount of users per page

current_page   integer   

The current page number

last_page   integer   

The last page number

Create user.

requires authentication

Invite user to allowed team.

Example request: bash javascript json php

curl --request POST \
    "https://private.mybrocard.com/api/v2/users" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tz\": \"America\\/New_York\",
    \"name\": \"Dummy User\",
    \"email\": \"dummy@email.host\",
    \"team_id\": 1,
    \"role_id\": 4,
    \"can_edit_card_limits\": false,
    \"can_block_company_members\": false,
    \"active_cards_limit\": 10
}"
const url = new URL(
    "https://private.mybrocard.com/api/v2/users"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tz": "America\/New_York",
    "name": "Dummy User",
    "email": "dummy@email.host",
    "team_id": 1,
    "role_id": 4,
    "can_edit_card_limits": false,
    "can_block_company_members": false,
    "active_cards_limit": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
POST https://private.mybrocard.com/api/v2/users
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "name": "Dummy User",
    "email": "dummy@email.host",
    "team_id": 1,
    "role_id": 4,
    "can_edit_card_limits": false,
    "can_block_company_members": false,
    "active_cards_limit": 10,
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/users';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tz' => 'America/New_York',
            'name' => 'Dummy User',
            'email' => 'dummy@email.host',
            'team_id' => 1,
            'role_id' => 4,
            'can_edit_card_limits' => false,
            'can_block_company_members' => false,
            'active_cards_limit' => 10,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "id": 2,
    "name": "Dummy user",
    "email": "user@email.host",
    "team": {
        "id": 1,
        "name": "Dummy team"
    },
    "role": {
        "id": 2,
        "name": "team_owner"
    },
    "state": {
        "value": 1,
        "label": "Active"
    },
    "balances": [
        {
            "total": "1000.00",
            "reserved": "100.00",
            "available": "900.00",
            "currency": "USD"
        }
    ],
    "limits": [
        {
            "type": "daily_cards_limit",
            "amount": "10.00"
        },
        {
            "type": "transaction_limit",
            "amount": "1000.00"
        }
    ],
    "permissions": {
        "can_edit_card_limits": true,
        "can_block_company_members": true
    },
    "created_at": "2022-07-22 16:01:22",
    "request_id": "0bcc3dab-febe-4202-a8aa-4aef2d72353a",
    "spend": [
        {
            "total": "750.21",
            "currency": "USD"
        }
    ],
    "topup_credentials": [
        {
            "type": "crypto",
            "alias": "usdt_trc_tron_autotopup",
            "details": {
                "address": "TXwmV6eFQfqw21jnkehrNLqdE9SBMKKB",
                "net": "TRC",
                "token": 1
            }
        }
    ],
    "available_bins": [
        {
            "bin": "123456",
            "description": "123456 Visa Credit USD",
            "balance_type": "card_balance",
            "payment_restrictions": "For advertisement payments only"
        },
        {
            "bin": "654321",
            "description": "654321 Mastercard Credit USD",
            "balance_type": "account_balance",
            "payment_restrictions": "For advertisement payments and services"
        }
    ]
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "email": [
            "The email field is required."
        ],
        "role_id": [
            "The role_id field is required."
        ],
        "can_edit_card_limits": [
            "The can_edit_card_limits field is required."
        ]
    },
    "request_id": "41928e71-bfdb-4dfe-bd5b-004e396491b9"
}
 

Request      

POST api/v2/users

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

name   string   

The username. Must be at least 1 character. Must not be greater than 255 characters. Example: Dummy User

email   string   

The login email. Must be a valid email address. Example: dummy@email.host

team_id   integer  optional  

The team ID. Default applied your team (if field not present). Example: 1

role_id   integer   

The role ID. Example: 4

can_edit_card_limits   boolean   

The permission for change cards limit. Unlimited if null. Example: false

can_block_company_members   boolean  optional  

The permission for blocking member of company. Example: false

active_cards_limit   integer  optional  

The number of active cards limit. Example: 10

Response

Response Fields

id   integer   

The user ID

name   string   

The username

email   string   

The user email

team   object   

The user team

role   object   

The user role

state   object   

The user state with label

balances   object[]   

The user balances

limits   object[]   

The user limits

permissions   object   
can_edit_card_limits   object   

The permission allows user to change limits of cards

can_block_company_members   boolean   

The permission for blocking member of company

created_at   string   

The user creation date (at user timezone)

spend   object[]   

amounts of money spent from various accounts

topup_credentials   object[]   

available topup credentials (crypto wallets and etc.)

Show user.

requires authentication

Example request: bash javascript json php

curl --request GET \
    --get "https://private.mybrocard.com/api/v2/users/1?tz=America%2FNew_York" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://private.mybrocard.com/api/v2/users/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

    url.search = encodeURI([
    "tz=America/New_York"
].join("&"));

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
GET https://private.mybrocard.com/api/v2/users/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/users/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'tz' => 'America/New_York',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 2,
    "name": "Dummy user",
    "email": "user@email.host",
    "team": {
        "id": 1,
        "name": "Dummy team"
    },
    "role": {
        "id": 2,
        "name": "team_owner"
    },
    "state": {
        "value": 1,
        "label": "Active"
    },
    "balances": [
        {
            "total": "1000.00",
            "reserved": "100.00",
            "available": "900.00",
            "currency": "USD"
        }
    ],
    "limits": [
        {
            "type": "daily_cards_limit",
            "amount": "10.00"
        },
        {
            "type": "transaction_limit",
            "amount": "1000.00"
        }
    ],
    "permissions": {
        "can_edit_card_limits": true,
        "can_block_company_members": true
    },
    "created_at": "2022-07-22 16:01:22",
    "request_id": "0bcc3dab-febe-4202-a8aa-4aef2d72353a",
    "spend": [
        {
            "total": "750.21",
            "currency": "USD"
        }
    ],
    "topup_credentials": [
        {
            "type": "crypto",
            "alias": "usdt_trc_tron_autotopup",
            "details": {
                "address": "TXwmV6eFQfqw21jnkehrNLqdE9SBMKKB",
                "net": "TRC",
                "token": 1
            }
        }
    ],
    "available_bins": [
        {
            "bin": "123456",
            "description": "123456 Visa Credit USD",
            "balance_type": "card_balance",
            "payment_restrictions": "For advertisement payments only"
        },
        {
            "bin": "654321",
            "description": "654321 Mastercard Credit USD",
            "balance_type": "account_balance",
            "payment_restrictions": "For advertisement payments and services"
        }
    ]
}
 

Request      

GET api/v2/users/{user_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 1

user   integer   

The ID of the user Example: 8

Query Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

Response

Response Fields

id   integer   

The user ID

name   string   

The username

email   string   

The user email

team   object   

The user team

role   object   

The user role

state   object   

The user state with label

balances   object[]   

The user balances

limits   object[]   

The user limits

permissions   object   
can_edit_card_limits   object   

The permission allows user to change limits of cards

can_block_company_members   boolean   

The permission for blocking member of company

created_at   string   

The user creation date (at user timezone)

spend   object[]   

amounts of money spent from various accounts

topup_credentials   object[]   

available topup credentials (crypto wallets and etc.)

available_bins   object[]   

available bins

Edit user.

requires authentication

Example request: bash javascript json php

curl --request PUT \
    "https://private.mybrocard.com/api/v2/users/1" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tz\": \"America\\/New_York\",
    \"name\": \"Dummy User\",
    \"state\": \"Dummy User\",
    \"role_id\": 4,
    \"team_id\": 1,
    \"can_edit_card_limits\": false,
    \"active_cards_limit\": 10,
    \"can_block_company_members\": false
}"
const url = new URL(
    "https://private.mybrocard.com/api/v2/users/1"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tz": "America\/New_York",
    "name": "Dummy User",
    "state": "Dummy User",
    "role_id": 4,
    "team_id": 1,
    "can_edit_card_limits": false,
    "active_cards_limit": 10,
    "can_block_company_members": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
PUT https://private.mybrocard.com/api/v2/users/1
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "tz": "America/New_York",
    "name": "Dummy User",
    "state": "Dummy User",
    "role_id": 4,
    "team_id": 1,
    "can_edit_card_limits": false,
    "active_cards_limit": 10,
    "can_block_company_members": false,
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/users/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'tz' => 'America/New_York',
            'name' => 'Dummy User',
            'state' => 'Dummy User',
            'role_id' => 4,
            'team_id' => 1,
            'can_edit_card_limits' => false,
            'active_cards_limit' => 10,
            'can_block_company_members' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "id": 2,
    "name": "Dummy user",
    "email": "user@email.host",
    "team": {
        "id": 1,
        "name": "Dummy team"
    },
    "role": {
        "id": 2,
        "name": "team_owner"
    },
    "state": {
        "value": 1,
        "label": "Active"
    },
    "balances": [
        {
            "total": "1000.00",
            "reserved": "100.00",
            "available": "900.00",
            "currency": "USD"
        }
    ],
    "limits": [
        {
            "type": "daily_cards_limit",
            "amount": "10.00"
        },
        {
            "type": "transaction_limit",
            "amount": "1000.00"
        }
    ],
    "permissions": {
        "can_edit_card_limits": true,
        "can_block_company_members": true
    },
    "created_at": "2022-07-22 16:01:22",
    "request_id": "0bcc3dab-febe-4202-a8aa-4aef2d72353a",
    "spend": [
        {
            "total": "750.21",
            "currency": "USD"
        }
    ],
    "topup_credentials": [
        {
            "type": "crypto",
            "alias": "usdt_trc_tron_autotopup",
            "details": {
                "address": "TXwmV6eFQfqw21jnkehrNLqdE9SBMKKB",
                "net": "TRC",
                "token": 1
            }
        }
    ],
    "available_bins": [
        {
            "bin": "123456",
            "description": "123456 Visa Credit USD",
            "balance_type": "card_balance",
            "payment_restrictions": "For advertisement payments only"
        },
        {
            "bin": "654321",
            "description": "654321 Mastercard Credit USD",
            "balance_type": "account_balance",
            "payment_restrictions": "For advertisement payments and services"
        }
    ]
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "email": [
            "The email field is required."
        ],
        "role_id": [
            "The role_id field is required."
        ],
        "can_edit_card_limits": [
            "The can_edit_card_limits field is required."
        ]
    },
    "request_id": "41928e71-bfdb-4dfe-bd5b-004e396491b9"
}
 

Request      

PUT api/v2/users/{user_id}

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 1

user   integer   

The ID of the user Example: 1

Body Parameters

tz   string  optional  

The custom optional timezone for request and response.
If this field is empty, the user's profile timezone will be applied.
Must be a valid time zone, such as Africa/Accra. Example: America/New_York

name   string  optional  

The username. Must be at least 1 character. Must not be greater than 255 characters. Example: Dummy User

state   string  optional  

The value of user state:
1 - «Active»
2 - «Blocked»
4 - «Suspended»
5 - «Rejected»
6 - «Waiting for interview»
Default: not affected if not present. Example: Dummy User

role_id   integer  optional  

The role ID. Example: 4

team_id   integer  optional  

The team ID. Example: 1

can_edit_card_limits   boolean  optional  

The permission for change cards limit. Unlimited if null. Example: false

active_cards_limit   integer  optional  

The number of active cards limit. Example: 10

can_block_company_members   boolean  optional  

The permission for blocking member of company. Example: false

Response

Response Fields

id   integer   

The user ID

name   string   

The username

email   string   

The user email

team   object   

The user team

role   object   

The user role

state   object   

The user state with label

balances   object[]   

The user balances

limits   object[]   

The user limits

permissions   object   
can_edit_card_limits   object   

The permission allows user to change limits of cards

can_block_company_members   boolean   

The permission for blocking member of company

created_at   string   

The user creation date (at user timezone)

spend   object[]   

amounts of money spent from various accounts

topup_credentials   object[]   

available topup credentials (crypto wallets and etc.)

Edit available bins to user.

requires authentication

Example request: bash javascript json php

curl --request PUT \
    "https://private.mybrocard.com/api/v2/users/16/available-bins" \
    --header "Authorization: Bearer {API_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bins\": [
        \"123123\"
    ]
}"
const url = new URL(
    "https://private.mybrocard.com/api/v2/users/16/available-bins"
);

const headers = {
    "Authorization": "Bearer {API_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bins": [
        "123123"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
PUT https://private.mybrocard.com/api/v2/users/16/available-bins
AuthorizationBearer {API_KEY}
Content-Typeapplication/json
Acceptapplication/json
{
    "bins": ["123123"],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/users/16/available-bins';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {API_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'bins' => [
                '123123',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": [
        {
            "bin": "123456",
            "description": "123456 Visa Credit USD",
            "balance_type": "card_balance",
            "payment_restrictions": "For advertisement payments only"
        },
        {
            "bin": "654321",
            "description": "654321 Mastercard Credit USD",
            "balance_type": "account_balance",
            "payment_restrictions": "For advertisement payments and services"
        }
    ],
    "request_id": "ddbdacfc-a80a-43c6-a152-f027564cf89a"
}
 

Example response (422):


{
    "message": "The bins field must be present.",
    "errors": {
        "bins": [
            "The bins field must be present."
        ]
    },
    "request_id": "03f94d3c-29fb-4e12-aeb1-527844d03ee5"
}
 

Request      

PUT api/v2/users/{user_id}/available-bins

Headers

Authorization      

Example: Bearer {API_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user Example: 16

Body Parameters

bins   string[]  optional  

The card BIN number.

Response

Response Fields

bin   string   

The card BIN number

description   string   

The card BIN description

balance_type   string   

Type of balance of issued cards

payment_restrictions   string   

The card BIN restrictions for payments on issued cards

Webhooks

You can enable webhooks in your personal account in the webhooks section of your profile.

Webhook refund.

To customize your url for webhooks you should follow to Profile - Automation - Webhooks - Webhooks URL

Example body


{
    "id": 1,
    "amount": "100.00",
    "currency": "USD",
    "user": {
        "id": 2,
        "email": "payer@email.host",
        "name": "payer",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "card": {
        "id": 1,
        "title": "Card title",
        "last_four": "1234",
        "bin": "123456"
    },
    "date": "1999-12-31 23:59:59",
    "webhook_type": "refund"
}
 

Request   

POST https://YOUR-URL/for-webhooks-of-refunds

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

The refund ID

amount   string   

The refund amount

currency   string   

The currency of refund amount

user   object   

The refund user with team

card   object   

The refund card with BIN number

date   string   

The refund creation date (at user timezone)

webhook_type   string   

The webhook type

Webhook payment.

To customize your url for webhooks you should follow to Profile - Automation - Webhooks - Webhooks URL

Example body


{
    "id": 1,
    "amount": "100.00",
    "currency": "USD",
    "merchant": {
        "id": 1,
        "descriptor": "GOOGLE",
        "country": {
            "id": 2,
            "code": "US"
        }
    },
    "state": {
        "value": 1,
        "label": "SETTLED"
    },
    "is_micro": true,
    "decline": "card-blocked",
    "user": {
        "id": 2,
        "email": "payer@email.host",
        "name": "payer",
        "team": {
            "id": 1,
            "name": "Dummy team"
        }
    },
    "card": {
        "id": 1,
        "title": "Card title",
        "last_four": "1234",
        "bin": "123456"
    },
    "fees": [
        {
            "type": "international",
            "amount": "1.23",
            "currency": "USD"
        }
    ],
    "date": "2022-06-19 05:48:01",
    "date_received": "2022-06-19 05:48:02",
    "webhook_type": "payment"
}
 

Request   

POST https://YOUR-URL/for-webhooks-of-payments

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

The payment ID

amount   string   

The payment amount

currency   string   

The currency of payment amount

state   object   

The payment state with label

is_micro   boolean   

The allowed payment from inactive card

decline   string   

The decline reason

merchant   object   

The merchant descriptor with country

user   object   

The payment user with team

card   object   

The payment card with BIN number

fees   object   

The payment commissions

date   string   

The payment creation date (at user timezone)

date_received   string   

The payment received date (at user timezone)

webhook_type   string   

The webhook type

Webhook 3DS.

To customize your url for webhooks you should follow to Profile - Automation - 3DS Webhooks - Webhooks URL

Example body


{
    "id": 1,
    "code": "123456",
    "card_last_four": "0000",
    "amount": "1",
    "currency": "USD",
    "webhook_type": "otp_code",
    "recipient_id": 3
}
 

Request   

POST https://YOUR-URL/for-3ds-webhooks

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

The 3DS code ID

code   string   

The 3DS code

password   string  optional  

The 3DS password

card   object   

The payment card

amount   string   

The payment amount

currency   string   

The currency of payment

webhook_type   string   

The webhook type

recipient_id   integer   

The recipient user ID