Attach Payment Intent
Endpoint
POST
/api/v1/transactions/attach-intentImportant behavior
This endpoint links a Stripe PaymentIntent to an existing Clive transaction (legacy two-step flow).
- Clive expects a valid
stripe_payment_intent_id. - This call updates transaction status to
pending. - For new integrations, use
/transactions/checkout-intentto avoid separate attach calls.
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 you have a PaymentIntent ID for the transaction.
- If you retry, reuse the same
idempotency-keyfor safe replay behavior. - Legacy integrations that create intents externally should keep a deterministic descriptor suffix for statement clarity.