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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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&per_page=50&page=1&dates[begin]=2024-11-17&dates[end]=2024-11-18&archived=includeµ=only&bins[]=123456&ids[]=1&last_fours[]=2222&states[]=2&teams[]=3&users[]=3&accounts[]=4&account_shared=&tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0&reverse=" \
--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",
"per_page=50",
"page=1",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"archived=include",
"micro=only",
"bins[]=123456",
"ids[]=1",
"last_fours[]=2222",
"states[]=2",
"teams[]=3",
"users[]=3",
"accounts[]=4",
"account_shared=",
"tags[]=b001a675-6fd6-41f4-8139-a4dcb8a917b0",
"reverse="
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"archived": "include",
"micro": "only",
"bins": ["123456"],
"ids": [1],
"last_fours": ["2222"],
"states": [2],
"teams": [3],
"users": [3],
"accounts": [4],
"account_shared": false,
"tags": ["b001a675-6fd6-41f4-8139-a4dcb8a917b0"],
"reverse": false,
}
$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',
'per_page' => 50,
'page' => 1,
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'archived' => 'include',
'micro' => 'only',
'bins' => ['123456'],
'ids' => [1],
'last_fours' => ['2222'],
'states' => [2],
'teams' => [3],
'users' => [3],
'accounts' => [4],
'account_shared' => false,
'tags' => ['b001a675-6fd6-41f4-8139-a4dcb8a917b0'],
'reverse' => false,
],
]
);
$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"
}
},
"account": {
"id": 123405,
"type": "personal_account"
},
"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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
account
object
The card account with type
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
},
"account": {
"id": 123405,
"type": "personal_account"
},
"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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
},
"account": {
"id": 123405,
"type": "personal_account"
},
"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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
account
object
The card account with type
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
},
"account": {
"id": 123405,
"type": "personal_account"
},
"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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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&per_page=50&page=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/cards/1/log"
);
const headers = {
"Authorization": "Bearer {API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
url.search = encodeURI([
"tz=America/New_York",
"per_page=50",
"page=1"
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
}
$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',
'per_page' => 50,
'page' => 1,
],
]
);
$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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Content-Type | text/html |
---|---|
Accept | text/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>
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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?tz=America%2FNew_York&per_page=50&page=1&dates[begin]=2024-11-17&dates[end]=2024-11-18&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µ=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",
"per_page=50",
"page=1",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"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',
'per_page' => 50,
'page' => 1,
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
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&per_page=50&page=1&group=user&dates[begin]=2024-11-17&dates[end]=2024-11-18&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µ=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",
"per_page=50",
"page=1",
"group=user",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
"group": "user",
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"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',
'per_page' => 50,
'page' => 1,
'group' => 'user',
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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)
Refunds
APIs for managing refunds statistics
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&per_page=50&cursor=null&dates[begin]=2024-11-17&dates[end]=2024-11-18&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",
"per_page=50",
"cursor=null",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"bins[]=654321",
"cards[]=1",
"ids[]=1",
"teams[]=1",
"users[]=1"
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"cursor": "null",
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"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',
'per_page' => 50,
'cursor' => 'null',
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
Groups of refunds.
requires authentication
This endpoint allows you to group your refunds by different criteria for getting statistics.
Example request: bash javascript json php
curl --request GET \
--get "https://private.mybrocard.com/api/v2/refunds/group?tz=America%2FNew_York&per_page=50&page=1&group=user&dates[begin]=2024-11-17&dates[end]=2024-11-18&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/group"
);
const headers = {
"Authorization": "Bearer {API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
url.search = encodeURI([
"tz=America/New_York",
"per_page=50",
"page=1",
"group=user",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"bins[]=654321",
"cards[]=1",
"ids[]=1",
"teams[]=1",
"users[]=1"
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
"group": "user",
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"bins": ["654321"],
"cards": [1],
"ids": [1],
"teams": [1],
"users": [1],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/refunds/group';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'tz' => 'America/New_York',
'per_page' => 50,
'page' => 1,
'group' => 'user',
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'bins' => ['654321'],
'cards' => [1],
'ids' => [1],
'teams' => [1],
'users' => [1],
],
]
);
$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"
}
},
"amount": "7196.85",
"count": 25
}
],
"summary": {
"group": {
"label": "by Team",
"type": "team"
},
"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"
}
},
"amount": "7196.85",
"count": 25
}
],
"summary": {
"group": {
"label": "by Month",
"type": "month"
},
"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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
object[]
The list of grouped refunds
group
object
Describing grouped entity
type
string
The type of grouping
Must be one of:date
week
month
team
user
card
merchant
entity
object
The brief info about grouped entity
amount
number
Total amount of refunds
count
integer
Total count of refunds
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
merchant
label
string
Label of grouping type
amount
number
Total amount of refunds
count
integer
Total count of refunds
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
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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.
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&per_page=50&cursor=null&dates[begin]=2024-11-17&dates[end]=2024-11-18&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",
"per_page=50",
"cursor=null",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"ids[]=1",
"methods[]=marketcall",
"teams[]=1",
"users[]=1",
"states[]=2"
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"cursor": "null",
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"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',
'per_page' => 50,
'cursor' => 'null',
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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&per_page=50&page=1&dates[begin]=2024-11-17&dates[end]=2024-11-18&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",
"per_page=50",
"page=1",
"dates[begin]=2024-11-17",
"dates[end]=2024-11-18",
"ids[]=1",
"from[]=1",
"to[]=1"
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
"dates": {
"begin": "2024-11-17",
"end": "2024-11-18",
},
"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',
'per_page' => 50,
'page' => 1,
'dates' => [
'begin' => '2024-11-17',
'end' => '2024-11-18',
],
'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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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&per_page=50&page=1&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",
"per_page=50",
"page=1",
"ids[]=2",
"teams[]=1",
"roles[]=1",
"states[]=1"
].join("&"));
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"tz": "America/New_York",
"per_page": 50,
"page": 1,
"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',
'per_page' => 50,
'page' => 1,
'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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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/11/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/11/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());
Authorization | Bearer {API_KEY} |
---|---|
Content-Type | application/json |
Accept | application/json |
{
"bins": ["123123"],
}
$client = new \GuzzleHttp\Client();
$url = 'https://private.mybrocard.com/api/v2/users/11/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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.