Skip to main content
POST
/
api
/
commerce
/
merchant
/
checkout
/
address
Step 2 - Set shipping address
curl --request POST \
  --url https://api-beta.pepay.io/api/commerce/merchant/checkout/address \
  --header 'Content-Type: application/json' \
  --header 'x-commerce-api-key: <api-key>' \
  --data '
{
  "customer_id": "cust_123456",
  "estimateId": "550e8400-e29b-41d4-a716-446655440000",
  "address": {
    "first_name": "Jane",
    "last_name": "Doe",
    "street_address": "123 Main St",
    "address_line2": "Apt 4B",
    "city": "Miami",
    "state": "FL",
    "zip_code": "33101",
    "country": "US",
    "phone": "+13055550123",
    "email": "[email protected]"
  }
}
'
{
  "success": true,
  "data": {
    "addressId": "550e8400-e29b-41d4-a716-446655440222",
    "validated": true,
    "standardized": {
      "first_name": "Jane",
      "last_name": "Doe",
      "street_address": "123 Main St",
      "address_line2": "Apt 4B",
      "city": "Miami",
      "state": "FL",
      "zip_code": "33101",
      "country": "US",
      "phone": "+13055550123",
      "email": "[email protected]"
    },
    "shippingOptions": [
      {
        "id": "standard",
        "name": "Standard Shipping",
        "price": 5.99,
        "estimatedDays": "5-7 business days"
      }
    ]
  }
}

Authorizations

x-commerce-api-key
string
header
required

Legacy alias for commerce-scoped API keys. Prefer x-api-key with scope=commerce.

Body

application/json

Step 2 request. Sets and validates the shipping address for an existing estimate.

customer_id
string
required
Example:

"cust_123456"

estimateId
string<uuid>
required
address
object
required

Response

200 - application/json

Address set successfully

success
boolean
Example:

true

data
object

Step 2 result. Address ID is used in Step 3 invoice creation.