Skip to content

Set Billing Address

Set or update the billing address for the checkout process.

Endpoint

POST /api/shop/checkout/billing-address

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Request Body

Option 1: Use Saved Address

json
{
  "addressId": 1
}

Option 2: Same as Shipping Address

json
{
  "useShippingAddress": true
}

Option 3: New Address

json
{
  "firstName": "Jane",
  "lastName": "Doe",
  "email": "[email protected]",
  "address": "456 Oak Ave",
  "city": "Los Angeles",
  "state": "CA",
  "country": "US",
  "postcode": "90001",
  "phone": "9876543210"
}

Response Fields (200 OK)

FieldTypeDescription
billingAddressobjectConfirmed billing address
messagestringSuccess message

Billing Address Fields

FieldTypeDescription
idintegerAddress ID
firstNamestringFirst name
lastNamestringLast name
emailstringEmail
addressstringStreet address
citystringCity
statestringState/Province
countrystringCountry code
postcodestringPostal code
phonestringPhone number

Use Cases

  • Set billing destination
  • Use different address for billing
  • Validate billing address
  • Create customer invoice address
  • Proceed to order placement

Released under the MIT License.