Vendors
Defined in: src/payments/client.gen.ts:151
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Vendors(
_core):Vendors
Defined in: src/payments/client.gen.ts:152
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Vendors
Methods
Section titled “Methods”create()
Section titled “create()”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.
Parameters
Section titled “Parameters”company_name
Section titled “company_name”string
Description
Name for vendor. The name must be unique.
email?
Section titled “email?”string | null
Format: email
Description
Email for vendor.
payment_accounts?
Section titled “payment_accounts?”object[] | null
Description
Payment accounts associated with the vendor.
phone?
Section titled “phone?”string | null
Description
Phone number for vendor.
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>
delete()
Section titled “delete()”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
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”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
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>
list()
Section titled “list()”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.
Parameters
Section titled “Parameters”query?
Section titled “query?”cursor?
Section titled “cursor?”string | null
limit?
Section titled “limit?”number | null
string | null
options?
Section titled “options?”Returns
Section titled “Returns”PagePromise<{ items: object[]; next_cursor?: string | null; }>
update()
Section titled “update()”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.
Parameters
Section titled “Parameters”string
beneficiary_name?
Section titled “beneficiary_name?”string | null
Description
Name for the Beneficiary
company_name?
Section titled “company_name?”string | null
Description
Name for vendor
email?
Section titled “email?”string | null
Format: email
Description
Email for vendor
payment_accounts?
Section titled “payment_accounts?”object[] | null
Description
To update payment instruments, we require the entire payload for each payment instrument that is being updated.
phone?
Section titled “phone?”string | null
Description
Phone number for vendor
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ company_name?: string | null; email?: string | null; id: string; payment_accounts?: object[] | null; phone?: string | null; }>