Skip to content

Class: CBCommerceClient ​

Legacy client for api.commerce.coinbase.com. Coinbase announced a 31 March 2026 migration deadline and the end of Commerce charge creation. These retained methods do not implement the Coinbase Business APIs or guarantee that legacy endpoints remain available.

See the Commerce transition notice and Coinbase Business Checkout APIs for migration guidance.

Extends ​

  • BaseRestClient

Constructors ​

Constructor ​

ts
new CBCommerceClient(restClientOptions?: RestClientOptions, requestOptions?: AxiosRequestConfig): CBCommerceClient;

Parameters ​

ParameterType
restClientOptions?RestClientOptions
requestOptions?AxiosRequestConfig

Returns ​

CBCommerceClient

Overrides ​

BaseRestClient.constructor

Methods ​

createCharge() ​

ts
createCharge(params: object): Promise<any>;

Legacy Commerce wrapper for POST /charges.

Parameters ​

ParameterType
params{ buyer_locale?: string; cancel_url?: string; checkout_id?: string; local_price: { amount: string; currency: string; }; metadata?: { custom_field?: string; custom_field_two?: string; }; pricing_type: string; redirect_url?: string; }
params.buyer_locale?string
params.cancel_url?string
params.checkout_id?string
params.local_price{ amount: string; currency: string; }
params.local_price.amountstring
params.local_price.currencystring
params.metadata?{ custom_field?: string; custom_field_two?: string; }
params.metadata.custom_field?string
params.metadata.custom_field_two?string
params.pricing_typestring
params.redirect_url?string

Returns ​

Promise<any>


createCheckout() ​

ts
createCheckout(params: object): Promise<any>;

Legacy Commerce wrapper for POST /checkouts.

Parameters ​

ParameterType
params{ buyer_locale?: string; metadata?: { custom_field?: string; custom_field_two?: string; }; pricing_type: string; requested_info?: string[]; total_price: { amount: string; currency: string; }; }
params.buyer_locale?string
params.metadata?{ custom_field?: string; custom_field_two?: string; }
params.metadata.custom_field?string
params.metadata.custom_field_two?string
params.pricing_typestring
params.requested_info?string[]
params.total_price{ amount: string; currency: string; }
params.total_price.amountstring
params.total_price.currencystring

Returns ​

Promise<any>


deletePrivate() ​

ts
deletePrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.deletePrivate


generateNewOrderId() ​

ts
generateNewOrderId(): string;

Returns ​

string

Inherited from ​

BaseRestClient.generateNewOrderId


get() ​

ts
get(endpoint: string, params?: object): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?object

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.get


getAllCharges() ​

ts
getAllCharges(): Promise<any>;

Legacy Commerce wrapper for GET /charges. Returns one page, not every charge: the historical API uses cursor pagination and this method neither accepts a cursor nor fetches later pages automatically. This method targets api.commerce.coinbase.com, not Coinbase Business; current endpoint availability is not guaranteed.

Returns ​

Promise<any>


getAllCheckouts() ​

ts
getAllCheckouts(): Promise<any>;

Legacy Commerce wrapper for GET /checkouts. Returns one page, not every checkout: the historical API uses cursor pagination and this method neither accepts a cursor nor fetches later pages automatically. This method targets api.commerce.coinbase.com, not Coinbase Business; current endpoint availability is not guaranteed.

Returns ​

Promise<any>


getCharge() ​

ts
getCharge(params: object): Promise<any>;

Legacy Commerce wrapper for GET /charges/{charge_code_or_charge_id}.

Parameters ​

ParameterType
params{ charge_code_or_charge_id: string; }
params.charge_code_or_charge_idstring

Returns ​

Promise<any>


getCheckout() ​

ts
getCheckout(params: object): Promise<any>;

Legacy Commerce wrapper for GET /checkouts/{checkout_id}.

Parameters ​

ParameterType
params{ checkout_id: string; }
params.checkout_idstring

Returns ​

Promise<any>


getClientType() ​

ts
getClientType(): RestClientType;

Defines the client type (affecting how requests & signatures behave)

Returns ​

RestClientType

Overrides ​

BaseRestClient.getClientType


getPrivate() ​

ts
getPrivate(endpoint: string, params?: object): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?object

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.getPrivate


getSignTimestampMs() ​

ts
getSignTimestampMs(): number;

Timestamp used to sign the request. Override this method to implement your own timestamp/sync mechanism

Returns ​

number

Inherited from ​

BaseRestClient.getSignTimestampMs


listEvents() ​

ts
listEvents(headers: object): Promise<any>;

Legacy Commerce wrapper for GET /events. The historical API paginates event lists; this wrapper returns one response and does not fetch every page automatically. Pass the required X-CC-Version header argument. This method targets api.commerce.coinbase.com, not Coinbase Business; current endpoint availability is not guaranteed.

Parameters ​

ParameterType
headers{ "X-CC-Version": string; }
headers.X-CC-Versionstring

Returns ​

Promise<any>


patchPrivate() ​

ts
patchPrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.patchPrivate


post() ​

ts
post(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.post


postPrivate() ​

ts
postPrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.postPrivate


putPrivate() ​

ts
putPrivate(endpoint: string, params?: ParamsInRequest): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?ParamsInRequest

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.putPrivate


showEvent() ​

ts
showEvent(params: object, headers: object): Promise<any>;

Legacy Commerce wrapper for GET /events/{event_id}. Pass the required X-CC-Version header argument.

Parameters ​

ParameterType
params{ event_id: string; }
params.event_idstring
headers{ "X-CC-Version": string; }
headers.X-CC-Versionstring

Returns ​

Promise<any>

Built by Siebly. Open source SDKs for exchange APIs.