> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# payment_intents_cancel

> Cancel a payment, releasing any authorised funds back to the customer.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://api.stripe.com/v1/payment_intents/{intent}/cancel"}</code></div>

```python stripe_payment_intents_cancel.py theme={null}
from charter.packs import stripe

result = await stripe.payment_intents_cancel.ainvoke({"intent": ...})
```

## Path parameters

<div className="reference-table">
  | Field                                                          | Type     | Description                  |
  | -------------------------------------------------------------- | -------- | ---------------------------- |
  | `intent` <span className="required" title="required">\*</span> | `string` | The ID of the PaymentIntent. |
</div>

## Body

<div className="reference-table">
  | Field                | Type                                                                                   | Description                                                                                                                          |
  | -------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
  | `cancellationReason` | [CancellationReason](/charter/charter/packs/stripe/payment_intents/objects#cancellationreason) | Why the payment is being cancelled. Stripe records its own reasons for cancellations it makes; these four are the ones you may send. |
</div>
