HSRCPAY Dökümantasyon
API v1

Create customer address

Appends a billing/shipping/both address; response body is the full customer DTO including addresses.

POST
/customers/{id}/addresses/

Authorization

bearerAuth
AuthorizationBearer <token>

Use Authorization: Bearer <token>. The same header supports: (1) JWT access token from the configured auth provider; (2) secret API key whose value contains sk_ within the first 32 characters (e.g. sk_live_…, sk_test_…); (3) publishable key containing pk_. Sandbox keys typically include _test_ in the string; the server resolves repositories from that.

In: header

Path Parameters

id*Customer ID

Customer to attach the new address to.

Request Body

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.hsrcpay.com/v1/customers/string/addresses/" \  -H "Content-Type: application/json" \  -d '{    "type": "BILLING",    "is_default": true,    "country": "string"  }'
{
  "message": "success",
  "success": true,
  "data": {
    "object": "customer",
    "id": "string",
    "account_id": "string",
    "name": "string",
    "email": "string",
    "phone": "string",
    "country": "string",
    "alternate_emails": [
      "user@example.com"
    ],
    "is_guest": true,
    "deleted": true,
    "metadata": {
      "property1": null,
      "property2": null
    },
    "created_at": null,
    "updated_at": null,
    "addresses": [
      {
        "object": "customer_address",
        "id": "string",
        "customer_id": "string",
        "type": "BILLING",
        "is_default": true,
        "label": "string",
        "country": "string",
        "city": "string",
        "state": "string",
        "line1": "string",
        "line2": "string",
        "zip": "string",
        "created_at": null,
        "updated_at": null,
        "property1": null,
        "property2": null
      }
    ],
    "payment_methods": [
      {
        "id": "string",
        "property1": null,
        "property2": null
      }
    ],
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}
{
  "message": "string",
  "success": false,
  "error": {
    "code": 0,
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    },
    "property1": null,
    "property2": null
  },
  "property1": null,
  "property2": null
}