Payments API (0.1)

Download OpenAPI specification:Download

The payments API allows you to initiate and manage payments and vendors from your Brex Cash accounts.

Authentication

OAuth2

OAuth2 security scheme

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: https://accounts.brex.com/oauth2/v1/auth
Token URL: https://accounts.brex.com/oauth2/v1/token
Scopes:
  • openid -

    openid

  • offline_access -

    offline access

  • vendors -

    View and manage vendor data

  • vendors.readonly -

    View vendor data

  • transfers -

    View and manage transfer data

  • transfers.readonly -

    View transfer data

Vendors

Endpoints to manage vendors

Lists vendors

This endpoint lists all existing vendors for an account. Takes an optional parameter to match by vendor name.

Request
Security:
query Parameters
cursor
string or null
limit
integer or null <int32>
name
string or null
Responses
200

listVendors 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v1/vendors
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v1/vendors
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Create vendor

This endpoint creates a new vendor.

Request
Security:
header Parameters
Idempotency-Key
required
string
Request Body schema: application/json
company_name
required
string

Name for vendor. The name must be unique.

email
string or null

Email for vendor.

phone
string or null

Phone number for vendor.

Array of objects or null (PaymentAccountRequest)

Payment accounts associated with the vendor.

Responses
200

createVendor 200 response

post/v1/vendors
Request samples
application/json
{
  • "company_name": "string",
  • "email": "string",
  • "phone": "string",
  • "payment_accounts": [
    ]
}
Response samples
application/json
{
  • "id": "string",
  • "company_name": "string",
  • "email": "string",
  • "phone": "string",
  • "payment_accounts": [
    ]
}

Get vendor

This endpoint gets a vendor by ID.

Request
Security:
path Parameters
id
required
string
Responses
200

getVendorById 200 response

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

get/v1/vendors/{id}
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v1/vendors/:id
Response samples
application/json
{
  • "id": "string",
  • "company_name": "string",
  • "email": "string",
  • "phone": "string",
  • "payment_accounts": [
    ]
}

Update vendor

Updates an existing vendor by ID.
Request
Security:
header Parameters
Idempotency-Key
string
Request Body schema: application/json
company_name
string or null

Name for vendor

email
string or null

Email for vendor

phone
string or null

Phone number for vendor

Array of objects or null (PaymentAccountRequest)

To update payment instruments, we require the entire payload for each payment instrument that is being updated.

Responses
200

updateVendor 200 response

put/v1/vendors/{id}
Request samples
application/json
{
  • "company_name": "string",
  • "email": "string",
  • "phone": "string",
  • "payment_accounts": [
    ]
}
Response samples
application/json
{
  • "id": "string",
  • "company_name": "string",
  • "email": "string",
  • "phone": "string",
  • "payment_accounts": [
    ]
}

Delete vendor.

This endpoint deletes a vendor by ID.

Request
Security:
path Parameters
id
required
string
Responses
200

deleteVendor 200 response

delete/v1/vendors/{id}
Request samples
curl -i -X DELETE \
  https://platform.brexapis.com/v1/vendors/:id

Transfers

Endpoints to initiate transfers and view transfer statuses. Note that for all transfer endpoints, the 'money' field is positive or unsigned for outgoing transfers (debits), and negative for incoming transfers (credits).

Lists transfers

This endpoint lists existing transfers for an account.

Currently, the API can only return transfers for the following payment rails:

  • ACH
  • DOMESTIC_WIRE
  • CHEQUE
  • INTERNATIONAL_WIRE
Request
Security:
query Parameters
cursor
string or null
limit
integer or null <int32>
Responses
200

listTransfers 200 response

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

get/v1/transfers
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v1/transfers
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Create transfer

This endpoint creates a new transfer.

Currently, the API can only create transfers for the following payment rails:

  • ACH
  • DOMESTIC_WIRE
  • CHEQUE
  • INTERNATIONAL_WIRES (For vendors already created through dashboard. Rate limited to 100/day - Please reach out to developer-support@brex.com if you need to do more)

Reminder: You may not use the Brex API for any activity that requires a license or registration from any governmental authority without Brex's prior review and approval. This includes but is not limited to any money services business or money transmission activity.

Please review the Brex Access Agreement and contact us if you have any questions.

Request
Security:
header Parameters
Idempotency-Key
required
string
Request Body schema: application/json
required
object (CounterParty)

Counterparty Details for the transfer

required
object (Money)

Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive).

description
required
string

Description of the transfer for internal use. Not exposed externally.

external_memo
required
string <= 90 characters

External memo for the transfer. Payment Instructions for Wires and the Entry Description for ACH payments. Must be at most 90 characters for ACH and WIRE transactions and at most 40 characters for CHEQUES

required
object (OriginatingAccount)

Originating account details for the transfer

Responses
200

createTransfer 200 response

post/v1/transfers
Request samples
application/json
{
  • "counterparty": {
    },
  • "amount": {
    },
  • "description": "string",
  • "external_memo": "string",
  • "originating_account": {
    }
}
Response samples
application/json
{
  • "id": "string",
  • "counterparty": {
    },
  • "description": "string",
  • "payment_type": "ACH",
  • "amount": {
    },
  • "process_date": "2019-08-24",
  • "originating_account": {
    },
  • "status": "PROCESSING",
  • "estimated_delivery_date": "2019-08-24",
  • "creator_user_id": "string",
  • "created_at": "2019-08-24"
}

Get transfer

This endpoint gets a transfer by ID.

Request
Security:
path Parameters
id
required
string
Responses
200

getTransfersById 200 response

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

get/v1/transfers/{id}
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v1/transfers/:id
Response samples
application/json
{
  • "id": "string",
  • "counterparty": {
    },
  • "description": "string",
  • "payment_type": "ACH",
  • "amount": {
    },
  • "process_date": "2019-08-24",
  • "originating_account": {
    },
  • "status": "PROCESSING",
  • "estimated_delivery_date": "2019-08-24",
  • "creator_user_id": "string",
  • "created_at": "2019-08-24"
}
Copyright © Brex 2019–2021. All rights reserved.