Customers

Manage customer records associated with your business. Customers can have multiple emails, phone numbers, identification documents, and withdrawal methods.

The customer model

Properties

  • Name
    publicId
    Type
    string
    Description

    Unique customer identifier (UUID).

  • Name
    firstName
    Type
    string
    Description

    Customer's first name.

  • Name
    lastName
    Type
    string
    Description

    Customer's last name.

  • Name
    street
    Type
    string
    Description

    Street address.

  • Name
    city
    Type
    string
    Description

    City.

  • Name
    state
    Type
    string
    Description

    State or province.

  • Name
    country
    Type
    string
    Description

    Country.

  • Name
    postalCode
    Type
    string
    Description

    Postal/ZIP code.

  • Name
    dateCreated
    Type
    timestamp
    Description

    Timestamp when the customer was created.


POST/v1/customer

Create customer

Create a new customer record. At least one contact method (email or phone) is required.

Required attributes

  • Name
    first_name
    Type
    string
    Description

    Customer's first name.

  • Name
    last_name
    Type
    string
    Description

    Customer's last name.

  • Name
    street
    Type
    string
    Description

    Street address.

  • Name
    city
    Type
    string
    Description

    City.

  • Name
    state
    Type
    string
    Description

    State or province.

  • Name
    country
    Type
    string
    Description

    Country.

  • Name
    postal_code
    Type
    string
    Description

    Postal/ZIP code.

Optional attributes

  • Name
    emails
    Type
    array
    Description

    Array of email objects with email_address, is_primary, and is_verified fields.

  • Name
    phones
    Type
    array
    Description

    Array of phone objects with phone_number, is_primary, and is_verified fields.

  • Name
    identification
    Type
    array
    Description

    Array of identification objects with id_type, id_number, issuing_country, and expiry_date.

  • Name
    customer_reference
    Type
    string
    Description

    Your custom reference for this customer.

Request

POST
/v1/customer
curl -X POST https://api.zuripay.app/v1/customer \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "street": "123 Main St",
    "city": "Harare",
    "state": "Harare",
    "country": "Zimbabwe",
    "postal_code": "00263",
    "emails": [
      {
        "email_address": "[email protected]",
        "is_primary": true
      }
    ],
    "phones": [
      {
        "phone_number": "+263771234567",
        "is_primary": true
      }
    ]
  }'

Response

{
  "result": "success",
  "customer_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Customer created successfully."
}

GET/v1/customer/list

List customers

Retrieve a list of all customers for your business.

Request

GET
/v1/customer/list
curl https://api.zuripay.app/v1/customer/list \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "result": "success",
  "customers": [
    {
      "publicId": "550e8400-e29b-41d4-a716-446655440000",
      "firstName": "John",
      "lastName": "Doe",
      "emails": [{"emailAddress": "[email protected]", "isPrimary": true}],
      "phones": [{"phoneNumber": "+263771234567", "isPrimary": true}],
      "dateCreated": "2025-01-15T10:30:00Z"
    }
  ]
}

GET/v1/customer/fetch/:customer_reference

Fetch customer

Retrieve a single customer by their reference (public ID or custom reference).

Request

GET
/v1/customer/fetch/550e8400-e29b-41d4-a716-446655440000
curl https://api.zuripay.app/v1/customer/fetch/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer sk_live_your_api_key"

PUT/v1/customer/update/:customer_id

Update customer

Update an existing customer's information.

Optional attributes

  • Name
    first_name
    Type
    string
    Description

    Updated first name.

  • Name
    last_name
    Type
    string
    Description

    Updated last name.

  • Name
    street
    Type
    string
    Description

    Updated street address.

  • Name
    city
    Type
    string
    Description

    Updated city.

  • Name
    state
    Type
    string
    Description

    Updated state.

  • Name
    country
    Type
    string
    Description

    Updated country.

  • Name
    postal_code
    Type
    string
    Description

    Updated postal code.

Request

PUT
/v1/customer/update/550e8400-e29b-41d4-a716-446655440000
curl -X PUT https://api.zuripay.app/v1/customer/update/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Jonathan",
    "city": "Bulawayo"
  }'

Response

{
  "result": "success",
  "message": "Customer updated successfully."
}

DELETE/v1/customer/delete/:customer_id

Delete customer

Delete a customer record. This action is irreversible.

Request

DELETE
/v1/customer/delete/550e8400-e29b-41d4-a716-446655440000
curl -X DELETE https://api.zuripay.app/v1/customer/delete/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "result": "success",
  "message": "Customer deleted successfully."
}

Was this page helpful?