Alokai

addBillingAddress

Add new billing address for the current user.

By default, it uses the addBillingAddressDefaultQuery GraphQL query

Signature

declare function addBillingAddress(
	context: CommercetoolsIntegrationContext,
	params: AddBillingAddressParams,
	customQuery?: CustomQuery
): Promise<AddBillingAddressResponse>;

Parameters

NameRequiredTypeDescription
contextRequiredCommercetoolsIntegrationContext
paramsRequiredAddBillingAddressParams
customQueryOptionalCustomQuery

Referenced Types

Examples

Adding a billing address for the current user

const { user } = await sdk.commerce.addBillingAddress({
  address: { id: "1", country: "US" },
  user: { version: "1" },
});

On this page