Skip to content

Random Billing Address ​

Returns one randomly generated billing address in the shape of the billing_address object (v1.6.6). Use it to prefill billing_address on /cardholder/create / /cardholder/update, or on /card/apply when opening a card without a cardholder. Nothing is saved, and the endpoint does not require any cardholder on your account.

The address comes from the platform's own address source and is normalized to a clean address: country / state / city / line1 / postcode are always present, address lines contain only English letters, digits and spaces, the postcode has 4–10 characters, and state falls back to the city for countries without states — so the result passes the billing_address validation of /card/apply and of /cardholder/create as is.

Endpoint ​

ItemValue
MethodPOST
Path/api/v1/openapi/cardholder/billing_address/random
AuthHMAC
IdempotencyNot required

Request Fields ​

FieldTypeRequiredDescription
header_idstringhdr_<id> of the header you will open the card on or register the cardholder for (/card_headers/list). It decides the country scope (below). Omit it to get an address from any country
countrystringISO 3166-1 alpha-2, case-insensitive. When set, only that country is tried — there is no fallback to another country. When omitted: the header's issuing region, else any country in scope

Country scope by header:

HeaderScope
Uses cardholders (virtual_v / virtual_r / virtual_g / virtual_a / virtual_s921 headers — all of them require one, required=true on /cardholder/requirement)Only countries in the header's billing country list (rules.country_lists.billing_countries, flat form support_billing_region): no list = any country, a list present but empty = no country. A country outside the list is rejected with cardholder_billing_country_unsupported
Does not use cardholders (virtual_l / virtual_p headers, supported=false)No country list — any country, as /card/apply accepts for billing_address on a card opened without a cardholder. Default country = the header's issuing region
No header_idAny country

Only the header's billing country list is applied. Since v1.6.8 the platform has no residence restriction list of its own; any other country / residence restriction (e.g. rules.country_lists.blocked_residence_countries on /cardholder/requirement) is checked by the issuer at check / submit / card issuance. When the address is meant for a cardholder, you can pass a country that suits the header's rules.country_lists.

json
{ "header_id": "hdr_194" }
json
{ "header_id": "hdr_5", "country": "SG" }

Response Fields ​

data is the billing address object — the same fields as billing_address on /cardholder/create and /card/apply:

FieldTypeDescription
countrystringISO 3166-1 alpha-2, upper case
statestringState / province (the city when the country has none)
citystringCity
districtstringUsually an empty string
line1stringAddress line 1 — English letters, digits and spaces only
line2stringAddress line 2 — may be an empty string
postcodestring4–10 letters or digits

Example Response ​

json
{
  "code": 0,
  "message": "Success",
  "data": {
    "country": "SG",
    "state": "Singapore",
    "city": "Singapore",
    "district": "",
    "line1": "1 Raffles Place",
    "line2": "",
    "postcode": "048616"
  }
}

Common Errors ​

HTTPcodeerror_keyDescription
20040001validation_failedRequest body cannot be parsed
20040000openapi_invalid_header_idheader_id is malformed
40440400cardholder_header_not_foundNo such header
20040000openapi_card_type_not_supportedThe header is not a virtual-card header (OpenAPI only opens virtual cards, so only virtual-card headers are accepted here)
20040000cardholder_country_code_invalidcountry is not two letters (data.field=country)
20040000cardholder_billing_country_unsupportedThe header requires a cardholder and country is not in its support_billing_region (data.field=country)
20040000cardholder_random_address_unavailableNo usable address for the requested country / scope right now (data.field=country) — try another country or let the end user enter the address
20050000cardholder_provider_unavailableThe address source is temporarily unavailable — retry later
20050000cardholder_service_not_configuredThe cardholder service is not enabled — contact us
40140100openapi_invalid_credentialsAuth failure
42942900too_many_requestsRate limited — this endpoint's own quota of 60 calls per account per 60 s, or the general rate limit; honor Retry-After
20050000openapi_cardholder_failedServer error

Notes ​

  • Every call returns a fresh random address; nothing is stored and no card or cardholder is changed. Show it to your end user to confirm or edit before you send it on.
  • A random address is a plausible address, not the end user's real one. Use the real address whenever the header asks for a proof of address (identity.proof_of_address_* in required_fields or in a conditional requirement on /cardholder/requirement) — a random address cannot be backed by a document.
  • /card/billing_address/generate needs an existing card and returns the platform record shape (street / zip_code); this endpoint works before the card exists and returns the create / apply shape.
  • This endpoint has its own quota on top of the general rate limit: 60 calls per account per 60-second window. One random address per end user is normally enough — do not call it in a loop.

Released under MIT-equivalent terms.