POST /transactions/initialize
Endpoint
POST /api/v1/transactions/initialize
Important behavior
This endpoint creates a Clive transaction record only.
- It does not create a Stripe PaymentIntent.
- It does not set Stripe
statement_descriptor_suffix. - You create the PaymentIntent in your backend, then call
/transactions/attach-intent.
Authentication and required headers
| Header | Required | Example |
|---|---|---|
Content-Type | Yes | application/json |
x-api-key | Yes | cp_live_partner_xxx |
x-clive-hmac | Yes | 40f3... |
idempotency-key | Yes | init-EZ12345-v1 |
Request body
{
"partner_id": "ECHEZONA001",
"client_id": "AIRPEACE001",
"amount": 750,
"currency": "USD",
"echezona_reference": "EZ12345"
}
Field details
| Field | Type | Required | Description |
|---|---|---|---|
partner_id | string | Yes | Partner identifier provisioned by Clive |
client_id | string | Yes | Merchant/client identifier under the partner |
amount | number | Yes | Positive transaction amount in major currency units |
currency | string(3) | Yes | ISO-4217 currency code, for USD use USD |
echezona_reference | string | Yes | Partner-generated immutable transaction reference |
Success response
201 Created
{
"clive_tx_id": "CLVTX_1739378102312_420",
"status": "initialized"
}
Error responses
400 Validation error
{
"error": "Validation failed",
"code": "VALIDATION_ERROR",
"details": {
"fieldErrors": {
"amount": ["Number must be greater than 0"]
},
"formErrors": []
}
}
401 / 403 / 404 domain security errors
Possible code values:
API_KEY_INVALIDHMAC_INVALIDPARTNER_NOT_FOUNDPARTNER_NOT_ACTIVEKYC_NOT_APPROVEDCLIENT_NOT_FOUNDCLIENT_NOT_ACTIVE
cURL example
BODY='{"partner_id":"ECHEZONA001","client_id":"AIRPEACE001","amount":750,"currency":"USD","echezona_reference":"EZ12345"}'
SIG='replace-with-sha256-hmac'
curl -X POST "$CLIVE_API_BASE_URL/transactions/initialize" \
-H "Content-Type: application/json" \
-H "x-api-key: $CLIVE_API_KEY" \
-H "x-clive-hmac: $SIG" \
-H "idempotency-key: init-EZ12345-v1" \
-d "$BODY"