Skip to main content
POST
/
merchant
/
customer
/
create
{
  "success": false,
  "error": {
    "status": 400,
    "code": "DUPLICATE_ENTRY",
    "message": "Customer with this email already exists"
  },
  "data": null
}
Create a new customer for payment processing.
email
string
required
Customer email address
metadata
object
Additional customer metadata
success
boolean
Indicates if the request was successful
data.id
string
Customer ID
data.email
string
Customer email
data.metadata
object
Customer metadata
data.createdAt
string
Creation timestamp

Example Request

curl -X POST https://api.transaction.gg/merchant/customer/create \
  -H "Authorization: Bearer jwt_token" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "metadata": {
      "name": "John Doe",
      "phone": "+1234567890"
    }
  }'

Example Response

{
  "success": true,
  "data": {
    "id": "cus_V6n6SN2KnsIFCuQU",
    "email": "[email protected]",
    "metadata": {
      "name": "John Doe",
      "phone": "+1234567890"
    },
    "createdAt": "2024-01-01T00:00:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": {
    "status": 400,
    "code": "DUPLICATE_ENTRY",
    "message": "Customer with this email already exists"
  },
  "data": null
}