Checkout Billing Address
Add Checkout Billing Address
POST https://yourstore.example.com/api/storefront/checkouts/{checkoutId}/billing-addressRequest
Adds a billing address to an existing Checkout.
Required Fields
- country_code
Note
- The
email
property is only required if the customer is a guest shopper. Otherwise, it is set automatically. - Sending
email
property as a payload in POST request triggers the abandoned cart notification process. - Substitute your storefront domain for
yourstore.example.com
. - The Send a Test Request feature is not currently supported for this endpoint.
- This endpoint requires using Stencil CLI, a local session, and a csrf token to work.
Parameters
- store_domain in path - string
- checkoutId in path - stringrequiredThe ID of the subject checkout. Identical to the cart ID.
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
address1string
address2string
citystring
companystring
countrystring
Country name.countryCodestring
requiredISO 3166-1 alpha-2 country code. (See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)customFieldsarray[object]
emailstring
firstNamestring
lastNamestring
stateOrProvincestring
Represents state or province.stateOrProvinceCodestring
phonestring
postalCodestring
versioninteger
The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.Example: 1
example
{
"address1": "string",
"address2": "string",
"city": "string",
"company": "string",
"country": "string",
"countryCode": "string",
"customFields": [
{
"fieldId": "string",
"fieldValue": "string"
}
],
"email": "string",
"firstName": "string",
"lastName": "string",
"stateOrProvince": "string",
"stateOrProvinceCode": "string",
"phone": "string",
"postalCode": "string",
"version": 1
}
Response
Body
object | application/json
billingAddressobject
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.channelIdinteger
Channel ID.consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.feesarray[object]
Fees applied at the checkout level.createdTimestring
Time when the cart was created.customerobject
Customer details.customerMessagestring
Shopperʼs message provided as details for the order to be created from this cartgiftCertificatesarray[object]
Applied gift certificate (as a payment method).giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.idstring
isStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.orderIdstring or null
outstandingBalancenumber
grandTotal
subtract the store-credit amountpaymentsarray[object]
promotionsarray[object]
shippingCostBeforeDiscountnumber
The shipping cost before discounts are applied.shippingCostTotalnumber
Shipping cost before any discounts are applied.shouldExecuteSpamCheckboolean
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.taxesarray[object]
taxTotalnumber
updatedTimestring
Time when the cart was last updated.versioninteger
The current version of the checkout increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.Example: 1
example
{
"value": {
"billingAddress": {
"address1": "123 Main Street",
"address2": "",
"city": "Austin",
"company": "",
"country": "United States",
"countryCode": "US",
"customFields": [
{
"fieldId": "field_25",
"fieldValue": "Leave in backyard"
}
],
"email": "janedoe@example.com",
"firstName": "Jane",
"id": "5ba11e4a10fb5",
"lastName": "Doe",
"phone": "1234567890",
"postalCode": "78751",
"stateOrProvince": "Texas",
"stateOrProvinceCode": "TX"
},
"cart": {
"baseAmount": 119.93,
"cartAmount": 112.93,
"createdTime": "2018-09-18T15:48:26+00:00",
Update Checkout Billing Address
PUT https://yourstore.example.com/api/storefront/checkouts/{checkoutId}/billing-address/{addressId}Request
Parameters
- store_domain in path - string
- checkoutId in path - stringrequiredThe ID of the subject checkout. Identical to the cart ID.
- addressId in path - numberrequiredThe ID of the subject address.
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
address1string
address2string
citystring
companystring
countrystring
Country name.countryCodestring
requiredISO 3166-1 alpha-2 country code. (See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)customFieldsarray[object]
emailstring
firstNamestring
lastNamestring
stateOrProvincestring
Represents state or province.stateOrProvinceCodestring
phonestring
postalCodestring
versioninteger
The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.Example: 1
example
{
"address1": "string",
"address2": "string",
"city": "string",
"company": "string",
"country": "string",
"countryCode": "string",
"customFields": [
{
"fieldId": "string",
"fieldValue": "string"
}
],
"email": "string",
"firstName": "string",
"lastName": "string",
"stateOrProvince": "string",
"stateOrProvinceCode": "string",
"phone": "string",
"postalCode": "string",
"version": 1
}
Response
Body
object | application/json
billingAddressobject
cartobject
A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.channelIdinteger
Channel ID.consignmentsarray[object]
couponsarray[object]
Coupons applied at the checkout level.feesarray[object]
Fees applied at the checkout level.createdTimestring
Time when the cart was created.customerobject
Customer details.customerMessagestring
Shopperʼs message provided as details for the order to be created from this cartgiftCertificatesarray[object]
Applied gift certificate (as a payment method).giftWrappingCostTotalnumber
Gift wrapping cost for all items, including or excluding tax.grandTotalnumber
The total payable amount, before applying any store credit or gift certificate.handlingCostTotalnumber
Handling cost for all consignments including or excluding tax.idstring
isStoreCreditAppliedboolean
true
value indicates StoreCredit has been applied.orderIdstring or null
outstandingBalancenumber
grandTotal
subtract the store-credit amountpaymentsarray[object]
promotionsarray[object]
shippingCostBeforeDiscountnumber
The shipping cost before discounts are applied.shippingCostTotalnumber
Shipping cost before any discounts are applied.shouldExecuteSpamCheckboolean
subtotalnumber
Subtotal of the checkout before applying item-level discounts. Tax inclusive based on the store settings.taxesarray[object]
taxTotalnumber
updatedTimestring
Time when the cart was last updated.versioninteger
The current version of the checkout increments with each successful update. You can use it to enable optimistic concurrency control for subsequent updates.Example: 1
example
{
"value": {
"billingAddress": {
"address1": "123 Main Street",
"address2": "",
"city": "Austin",
"company": "",
"country": "United States",
"countryCode": "US",
"customFields": [
{
"fieldId": "field_25",
"fieldValue": "Leave in backyard"
}
],
"email": "janedoe@example.com",
"firstName": "Jane",
"id": "5ba11e4a10fb5",
"lastName": "Doe",
"phone": "1234567890",
"postalCode": "78751",
"stateOrProvince": "Texas",
"stateOrProvinceCode": "TX"
},
"cart": {
"baseAmount": 119.93,
"cartAmount": 112.93,
"createdTime": "2018-09-18T15:48:26+00:00",
Did you find what you were looking for?