🛒 Checkout
Apply addresses to cart
Apply shipping and billing addresses to cart
Apply Shipping Address
The cartApplyShippingAddress allows you to apply a shipping address to a specific cart. Optionally, you can also use the shipping address as the billing address.
After setting the shipping address, the function provides an updated Cart as the result.
Input Parameters
CartApplyShippingAddressInput
address
: An object of typeCartAddressInput
representing the shipping address details.useAsBillingAddress
: (Optional) A boolean indicating if the shipping address should also be used as the billing address.
CartAddressInput
firstName
: First name of the recipient.lastName
: Last name of the recipient.address1
: Primary address line.address2
: (Optional) Secondary address line.postalCode
: Postal code of the address.city
: City of the address.countryCode
: Country code of the address.regionCode
: (Optional) Region or state code of the address.phone
: Phone number of the recipient.email
: Email address of the recipient.
Example:
Apply Billing Address
The cartApplyBillingAddress lets you apply a billing address to a specific cart. Optionally, you can also use the billing address as the shipping address.
After setting the billing address, the function provides an updated Cart as the result.
Input Parameters
CartApplyBillingAddressInput
address
: An object of typeCartAddressInput
representing the billing address details.useAsShippingAddress
: (Optional) A boolean indicating if the billing address should also be used as the shipping address.
Example: