customers
Create a customer linked to a merchant
POST
/
merchants
/
{merchantId}
/
customers
curl --request POST \
--url https://api-sandbox.paygood.co/merchants/{merchantId}/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"entityType": "individual",
"firstName": "Ahmadou",
"lastName": "Diallo",
"email": "ahmadou.diallo@example.com",
"phone": "+12025550125"
}
'
{
"customerId": "<string>",
"name": "<string>",
"displayName": "<string>",
"email": "jsmith@example.com",
"entityType": "individual",
"createdAt": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"phone": "<string>",
"metadata": {}
}Authorizations
Merchant API key bearer token.
Headers
Client-supplied unique key for safe retries of this mutating request. Scoped per merchant or resource as documented on each endpoint.
Example:
"idem-01"
Path Parameters
Merchant TypeID (mer_...) for the owner context.
Body
application/json
Create a customer under the merchant scope. Request shape depends on entityType.
- Option 1
- Option 2
Available options:
individual Individual legal first name.
Minimum string length:
1Individual legal last name.
Minimum string length:
1Optional customer phone number.
Minimum string length:
1Response
201 - application/json
Minimum string length:
1Minimum string length:
1Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Available options:
individual, organization Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Show child attributes
Show child attributes
⌘I
curl --request POST \
--url https://api-sandbox.paygood.co/merchants/{merchantId}/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"entityType": "individual",
"firstName": "Ahmadou",
"lastName": "Diallo",
"email": "ahmadou.diallo@example.com",
"phone": "+12025550125"
}
'
{
"customerId": "<string>",
"name": "<string>",
"displayName": "<string>",
"email": "jsmith@example.com",
"entityType": "individual",
"createdAt": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"organizationName": "<string>",
"phone": "<string>",
"metadata": {}
}