RapidCents Developer Documentation
Customers API Guide
v1.0 · REST API

Customers

Public API v1 · Create, list, retrieve, and update customers for your business

Summary

Customers represent the people or businesses you bill. Create a customer before attaching payment methods or subscriptions. All customer endpoints are scoped to the business resolved from your secret key.

💡

Either name or email is required on create. When an email is provided, create is idempotent: a matching email for the same business returns the existing customer (200) instead of creating a duplicate (201).

Authentication

Server-to-server. Authenticate with a RapidCents rc_sk_ secret key.

Authorization: Bearer {rc_sk_secret_key}
Content-Type: application/json
Accept: application/json

Base URL pattern: /api/v1/customers. Business is resolved from the secret key and is never accepted from the request body.

Customer Object

Response shape
{
  "id": "customer-uuid",
  "object": "customer",
  "name": "Jane Doe",
  "email": "[email protected]",
  "phone": "+15551234567",
  "metadata": {},
  "created": 1710000000
}
FieldTypeDescription
idstring (UUID)Unique customer identifier
objectstringAlways customer
namestring | nullFull name (stored as first + last)
emailstring | nullNormalized lowercase email
phonestring | nullPhone number
metadataobjectKey/value bag for your own data
createdintegerUnix timestamp

Create Customer

POST /api/v1/customers

Request Body

FieldTypeRequiredDescription
namestringEither name or emailCustomer full name (max 255)
emailstringEither name or emailValid email (max 255). Dedupes by business + email
phonestringNoPhone (max 50)
metadataobjectNoArbitrary key/value metadata
Request
POST /api/v1/customers
Authorization: Bearer {rc_sk_...}

{
  "name": "Jane Doe",
  "email": "[email protected]",
  "phone": "+15551234567"
}
Response — 201 Created (or 200 if email already exists)
{
  "id": "customer-uuid",
  "object": "customer",
  "name": "Jane Doe",
  "email": "[email protected]",
  "phone": "+15551234567",
  "metadata": {},
  "created": 1710000000
}

List Customers

GET /api/v1/customers

Returns a cursor-paginated list of customers for the authenticated business.

Query Parameters

ParamTypeDescription
limitintegerPage size (1–100, default 10)
starting_afterstringCursor: return records after this id
ending_beforestringCursor: return records before this id
Response — 200 OK
{
  "object": "list",
  "data": [ { /* customer */ } ],
  "has_more": false
}

Get Customer

GET /api/v1/customers/{customer}

Retrieves a single customer by id. Returns 404 if the customer does not belong to the authenticated business.

Update Customer

PATCH /api/v1/customers/{customer}

Partially updates customer fields. Changing email to an address already used by another customer in the same business returns 409.

Request Body

FieldTypeRequiredDescription
namestring | nullNoReplace full name
emailstring | nullNoReplace email (must be unique per business)
phonestring | nullNoReplace phone
metadataobject | nullNoReplace metadata object
Request
PATCH /api/v1/customers/{customer}
Authorization: Bearer {rc_sk_...}

{
  "name": "Jane Doe Updated",
  "phone": "+15559876543"
}

List Customer Payment Methods

GET /api/v1/customers/{customer}/payment_methods

Lists stored payment methods for a customer. Same pagination query params as list customers (limit, starting_after, ending_before).

Creating or deleting payment methods uses /api/v1/payment_methods (tokenize card). That surface is documented separately from this Customers guide.

All Endpoints

MethodEndpointDescription
POST/api/v1/customersCreate customer
GET/api/v1/customersList customers
GET/api/v1/customers/{id}Get customer
PATCH/api/v1/customers/{id}Update customer
GET/api/v1/customers/{id}/payment_methodsList customer payment methods

Error Handling

HTTP CodeScenarioDescription
422Validation errorMissing name and email, invalid email, or field constraints
409ConflictEmail already used by another customer in this business
404Not foundCustomer does not exist for this business
401UnauthorizedMissing or invalid secret key