OuiPay
API ReferenceCustomers

Create a customer

POST /v1/customers : register a new customer.

POST /v1/customers

Headers

HeaderRequiredValue
AuthorizationyesBearer sk_...
Idempotency-Keyyesunique per operation
Content-Typeyesapplication/json

Body

FieldTypeRequiredNotes
namestringyesFull legal name
emailstringyesUnique per customer
phonestringyesE.164 format
country_codestringyesISO 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

HTTPerror.codeCause
400VALIDATIONInvalid field
409DUPLICATEEmail/phone already registered

On this page