Create Holder
Creates a new card holder. This is an async operation.
Endpoint​
POST /api/v2/organizations/{org_id}/holders
Path Parameters​
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | string | Yes | Your organization ID |
Request Body​
{
"cardOwnerId": "owner-12345",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1-202-555-0147"
}
Fields​
| Field | Type | Required | Description |
|---|---|---|---|
cardOwnerId | string | Yes | Your internal ID for this holder (e.g., your DB user ID) |
firstName | string | Yes | First name |
lastName | string | Yes | Last name |
email | string | Yes | Email address — must be unique in your organization |
phone | string | No | Phone number — must be unique if provided |
Request​
curl -X POST "https://api.4pay.cc/api/v2/organizations/{org_id}/holders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cardOwnerId": "owner-12345",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1-202-555-0147"
}'
Response​
201 Created
{
"data": {
"cardOwnerId": "owner-12345",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1-202-555-0147"
}
}
tip
After creating a holder, use their cardOwnerId when issuing cards.