API ReferenceCustomers
Create a customer
POST /v1/customers : register a new customer.
POST /v1/customers
Headers
| Header | Required | Value |
|---|---|---|
Authorization | yes | Bearer sk_... |
Idempotency-Key | yes | unique per operation |
Content-Type | yes | application/json |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Full legal name |
email | string | yes | Unique per customer |
phone | string | yes | E.164 format |
country_code | string | yes | ISO 3166-1 alpha-2 |
Request
curl https://api.ouipay.com/v1/customers \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: cust-001" \
-H "Content-Type: application/json" \
-d '{
"name": "Amara Okonkwo",
"email": "amara@example.com",
"phone": "+2348012345678",
"country_code": "NG"
}'Response 201
Returns the customer object.
Errors
| HTTP | error.code | Cause |
|---|---|---|
| 400 | VALIDATION | Invalid field |
| 409 | DUPLICATE | Email/phone already registered |