Payments

Cancel Payment Intent

Cancel an existing payment intent

Cancel an existing payment intent.

Endpoint

POST /api/intents/{intent_id}/cancel

Authentication: Required (API Key or Intent Token)

Important Restrictions

  • Can only cancel intents in selection status
  • Intents that are pending, success, or failed cannot be canceled
  • Prevents inconsistencies with payment processors

Parameters

Path Parameters

ParameterTypeRequiredDescription
intent_idUUIDYesThe payment intent ID

Example Request

curl -X POST "https://app.infinic.com/api/intents/550e8400-e29b-41d4-a716-446655440000/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Success (200 OK)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "canceled",
  "success": true,
  "redirect_url": null
}

Use Cases

  • Customer abandons checkout
  • Merchant cancels order before payment
  • Clean up stale intents