Skip to main content

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_id from your Stripe backend call.
  • Stripe intent fields (including statement_descriptor_suffix) are controlled by your system.
  • Persist clive_tx_id, stripe_payment_intent_id, and statement_descriptor_suffix together for support and reconciliation.

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 the PaymentIntent is created on your backend.
  • If you retry, reuse the same idempotency-key for safe replay behavior.
  • Your PaymentIntent should already include a deterministic descriptor suffix for statement clarity.