POST /transactions/attach-intent
Endpoint
POST /api/v1/transactions/attach-intent
Important behavior
This endpoint links your pre-created Stripe PaymentIntent to an existing Clive transaction.
- Clive expects
stripe_payment_intent_idfrom your Stripe backend call. - Stripe intent fields (including
statement_descriptor_suffix) are controlled by your system. - Persist
clive_tx_id,stripe_payment_intent_id, andstatement_descriptor_suffixtogether for support and reconciliation.
Authentication and headers
| Header | Required |
|---|---|
Content-Type: application/json | Yes |
x-api-key | Yes |
x-clive-hmac | Yes |
idempotency-key | Yes |
Request body
{
"clive_tx_id": "CLVTX_1739378102312_420",
"stripe_payment_intent_id": "pi_3QxYFh2eZvKYlo2CxA8Nt42p"
}
Success response
200 OK
{
"clive_tx_id": "CLVTX_1739378102312_420",
"status": "pending",
"stripe_payment_intent_id": "pi_3QxYFh2eZvKYlo2CxA8Nt42p"
}
Common errors
| HTTP | Code | Meaning |
|---|---|---|
400 | VALIDATION_ERROR | Invalid body format |
401 | API_KEY_INVALID | Invalid API key |
401 | HMAC_INVALID | Signature mismatch |
400 | IDEMPOTENCY_KEY_MISSING | Missing idempotency key |
404 | TX_NOT_FOUND | Unknown clive_tx_id |
Notes
- This endpoint is the bridge between Clive's internal transaction and Stripe's PaymentIntent.
- Call this once the PaymentIntent is created on your backend.
- If you retry, reuse the same
idempotency-keyfor safe replay behavior. - Your PaymentIntent should already include a deterministic descriptor suffix for statement clarity.