> ## Documentation Index
> Fetch the complete documentation index at: https://docs-alpha.pepay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Addresses

> Merchant-scoped address lookup and deletion.

## Overview

These endpoints let merchants retrieve and delete saved shipping addresses tied to a customer or wallet.

## Authentication

Requires:

* `x-commerce-api-key`

## Request

Endpoints:

* `GET /api/v1/commerce/merchant/addresses`
* `DELETE /api/v1/commerce/merchant/addresses/{addressId}`

Lookup rules:

* Provide `customer_id`, **or**
* Provide `wallet_address` **and** `wallet_network`
  Optional pagination:
* `limit` (max 100)
* `offset`

Example (list by customer\_id):

```bash theme={null}
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/commerce/merchant/addresses?customer_id=cust_123" \
  -H "x-commerce-api-key: ck_live_..."
```

Example (list by wallet):

```bash theme={null}
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/commerce/merchant/addresses?wallet_address=0x1111111111111111111111111111111111111111&wallet_network=ethereum" \
  -H "x-commerce-api-key: ck_live_..."
```

Example (delete):

```bash theme={null}
BASE_URL=${PEPAY_API_URL}

curl -X DELETE "$BASE_URL/api/v1/commerce/merchant/addresses/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-commerce-api-key: ck_live_..."
```

## Response

Representative list response:

```json theme={null}
{
  "success": true,
  "data": {
    "addresses": [
      {
        "addressId": "addr_123",
        "firstName": "Ava",
        "lastName": "Merchant",
        "addressLine1": "123 Market St",
        "addressLine2": "Apt 5",
        "city": "San Francisco",
        "state": "CA",
        "zipCode": "94105",
        "country": "US",
        "isValidated": true,
        "createdAt": 1766320496
      }
    ]
  }
}
```

## Errors

* `400` missing/invalid customer identification
* `401` missing/invalid commerce API key
* `404` address not found (delete)

## Examples

Use these endpoints alongside checkout flows:

* [Checkout](/api-spec/commerce/checkout)

Next: [Payment sessions](/api-spec/payors/payment-sessions)
