post

/v2/customers

Creates a new customer that can be set up with payment method sources and can make payments. Each customer should represent a unique individual or corporate body.

If a customer is resetting a payment method, edit the payment method on the existing customer. Duplicate customer entities may lead to failed payment initiation and incorrect fraud flagging.

The mobile and email for the customer must be unique across your Stronghold Pay account. At least one of mobile or email is required.

The country should be set retail or delivery location for the customer’s orders, being the merchant’s country in the case of goods pickup or where services are being provided. state must be provided if the country is US; otherwise, it may be omitted. For a list of valid countries, states, and territories, see Countries.

You can link a Stronghold Pay customer entity to your internal customer users in two ways:

  1. track the customer.id returned from the API; or,
  2. send your own customer ID as the external_id when creating a customer.

Request Body

Schema
object
$schema: http://json-schema.org/draft-04/schema#
individual
object
country
string

The ISO 3166 alpha-2 country code to assign to the customer. For individuals, pick the country of order/service delivery, or the merchant’s country for pick up.

1 validation + required
state
string or null

If the country is set to ‘US’, the state for the customer.

1 validation
external_id
string or null

An integrator-specific alphanumeric ID to assign to the customer. Useful if not saving the Stronghold-generated customer ID. Can use numbers, letters, underscores and dashes.

1 validation

Responses

The newly created customer.

Schema
object
$schema: http://json-schema.org/draft-04/schema#
result
object
response_id
string

The response ID.

1 validation + required
time
string

The response time.

1 validation + required
status_code
integer

The HTTP status code.

4 validations + required

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.