Skip to main content

Create Holder

Creates a new card holder. This is an async operation.


Endpoint​

POST /api/v2/organizations/{org_id}/holders

Path Parameters​

ParameterTypeRequiredDescription
org_idstringYesYour organization ID

Request Body​

{
"cardOwnerId": "owner-12345",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1-202-555-0147"
}

Fields​

FieldTypeRequiredDescription
cardOwnerIdstringYesYour internal ID for this holder (e.g., your DB user ID)
firstNamestringYesFirst name
lastNamestringYesLast name
emailstringYesEmail address — must be unique in your organization
phonestringNoPhone 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.