Skip to content

Vendors

Defined in: src/payments/client.gen.ts:151

new Vendors(_core): Vendors

Defined in: src/payments/client.gen.ts:152

BrexCore

Vendors

create(body, options?): Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>

Defined in: src/payments/client.gen.ts:162

Create vendor

This endpoint creates a new vendor.

POST /v1/vendors — requires OAuth scope: vendors Sends an Idempotency-Key header: options.idempotencyKey, or an auto-generated UUID.

string

Description

Name for vendor. The name must be unique.

string | null

Format: email

Description

Email for vendor.

object[] | null

Description

Payment accounts associated with the vendor.

string | null

Description

Phone number for vendor.

RequestOptions

Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>


delete(id, options?): Promise<void>

Defined in: src/payments/client.gen.ts:180

Delete vendor.

This endpoint deletes a vendor by ID.

DELETE /v1/vendors/{id} — requires OAuth scope: vendors

string

RequestOptions

Promise<void>


get(id, options?): Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>

Defined in: src/payments/client.gen.ts:196

Get vendor

This endpoint gets a vendor by ID.

GET /v1/vendors/{id} — requires OAuth scope: vendors.readonly

string

RequestOptions

Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>


list(query?, options?): PagePromise<{ items: object[]; next_cursor?: string | null; }>

Defined in: src/payments/client.gen.ts:216

Lists vendors

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

GET /v1/vendors — requires OAuth scope: vendors.readonly Await for a single page, or for await to iterate items across all pages.

string | null

number | null

string | null

RequestOptions

PagePromise<{ items: object[]; next_cursor?: string | null; }>


update(id, body, options?): Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>

Defined in: src/payments/client.gen.ts:233

Update vendor

Updates an existing vendor by ID.

PUT /v1/vendors/{id} — requires OAuth scope: vendors Supports an optional Idempotency-Key via options.idempotencyKey.

string

string | null

Description

Name for the Beneficiary

string | null

Description

Name for vendor

string | null

Format: email

Description

Email for vendor

object[] | null

Description

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

string | null

Description

Phone number for vendor

RequestOptions

Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>