---
title: "Save billing and shipping addresses for checkout"
method: POST
path: "/checkout-addresses"
tags: ["Checkout"]
---

# Save billing and shipping addresses for checkout

`POST /checkout-addresses`

## Request

- Base URL: `http://localhost:8000/api/shop`
- URL: `http://localhost:8000/api/shop/checkout-addresses`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-shop-api/docs/checkout-addresses/post.ts> (a function with typed inputs; its response is checked against the schema)

Saves billing and shipping addresses to the current cart. Use `useForShipping: true` to copy billing as shipping, or provide shipping fields for a different shipping address.

## Headers

- `X-STOREFRONT-KEY` string, required
- `X-Locale` string
- `X-Channel` string
- `X-Currency` string

## Request body

- object
  - `billingFirstName` string, required
  - `billingLastName` string, required
  - `billingEmail` string, required
  - `billingCompanyName` string
  - `billingAddress` string, required
  - `billingCity` string, required
  - `billingCountry` string, required
  - `billingState` string, required
  - `billingPostcode` string, required
  - `billingPhoneNumber` string, required
  - `useForShipping` boolean
  - `shippingFirstName` string
  - `shippingLastName` string
  - `shippingEmail` string
  - `shippingCompanyName` string
  - `shippingAddress` string
  - `shippingCity` string
  - `shippingCountry` string
  - `shippingState` string
  - `shippingPostcode` string
  - `shippingPhoneNumber` string

## Response `201`

Addresses saved successfully.

## Other responses

- `400`: Invalid input
- `422`: Validation Error
- `500`: Billing address missing/invalid, or no active cart.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-shop-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-shop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-shop-api/revisions/f619df36bf29?raw)
