Apply shipping and billing addresses to cart
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.
address
: An object of type CartAddressInput
representing the shipping address details.useAsBillingAddress
: (Optional) A boolean indicating if the shipping address should also be used as the billing address.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:
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.
address
: An object of type CartAddressInput
representing the billing address details.useAsShippingAddress
: (Optional) A boolean indicating if the billing address should also be used as the shipping address.Example:
Apply shipping and billing addresses to cart
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.
address
: An object of type CartAddressInput
representing the shipping address details.useAsBillingAddress
: (Optional) A boolean indicating if the shipping address should also be used as the billing address.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:
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.
address
: An object of type CartAddressInput
representing the billing address details.useAsShippingAddress
: (Optional) A boolean indicating if the billing address should also be used as the shipping address.Example: