Skip to main content

Attach Payment Intent

Endpoint

POST /api/v1/transactions/attach-intent

Important 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-intent to avoid separate attach calls.

Authentication and headers

HeaderRequired
Content-Type: application/jsonYes
x-api-keyYes
x-clive-hmacYes
idempotency-keyYes

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

HTTPCodeMeaning
400VALIDATION_ERRORInvalid body format
401API_KEY_INVALIDInvalid API key
401HMAC_INVALIDSignature mismatch
400IDEMPOTENCY_KEY_MISSINGMissing idempotency key
404TX_NOT_FOUNDUnknown 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-key for safe replay behavior.
  • Legacy integrations that create intents externally should keep a deterministic descriptor suffix for statement clarity.