# Charge Management

This guide explains how to work with the charge model after a successful Checkout SDK authorization.

Use this guide if your checkout success flow returns a `charge_id` instead of an `order_id`.

> **Note:** Charge management is available through both the Resolve dashboard and the Merchant API. Use the dashboard if you want manual operational control, or the API if you want to automate these actions in your OMS or fulfillment workflows.


## After checkout success

When checkout completes successfully in the charge model, Resolve redirects the customer to your `success_url` with a `charge_id` query parameter:

```
https://www.merchantsite.com/confirm?charge_id=czTrT9opfkBaYZNh
```

Store the `charge_id` in your order management system. You will use it to fetch, capture, update, or cancel the authorization.

For the shared checkout lifecycle, see [Online Transaction Flow](/guides/online-transaction-flow).

## Charge lifecycle

A charge starts as an authorization. From there, you can:

- fetch the charge
- update charge details before capture
- capture the charge when ready to fulfill
- cancel the charge if it will not be fulfilled


The charge model is best suited for a simpler single-authorization flow.

## Fetch a charge

Use this when you need the latest state before acting on the charge.

Key fields to monitor:

- `captured`
- `captured_at`
- `canceled`
- `canceled_at`
- `amount`
- `amount_refunded`


API reference:

- [Fetch a charge](/merchant-api/openapi/charges#operation/fetchCharge)


## Update a charge

Use this before capture if you need to adjust the charge details.

Common update fields:

- `amount`
- `invoice_url`
- `order_number`
- `po_number`
- `metadata`


Payload guidance:

| Field | Required | Notes |
|  --- | --- | --- |
| `amount` | No | Updated charge amount. |
| `invoice_url` | No | Public URL to the invoice PDF. |
| `order_number` | No | Merchant order reference. |
| `po_number` | No | Purchase order reference. |
| `metadata` | No | Custom metadata stored on the charge. |


Example:

```json
{
  "amount": 1000,
  "invoice_url": "https://example.com/invoices/inv-1001.pdf",
  "order_number": "ORD-1001",
  "po_number": "PO-1001"
}
```

API reference:

- [Update a charge](/merchant-api/openapi/charges/updatecharge)


## Capture a charge

Capture the charge when you are ready to receive funds and start the customer's billing clock.

| Environment | Endpoint |
|  --- | --- |
| Production | `POST` `https://app.resolvepay.com/api/charges/<charge_id>/capture` |
| Sandbox | `POST` `https://app-sandbox.resolvepay.com/api/charges/<charge_id>/capture` |


Payload guidance:

| Field | Required | Notes |
|  --- | --- | --- |
| `amount` | No | If omitted, Resolve captures the full authorized amount. |
| `order_number` | No | Optional order number override applied during capture. |
| `po_number` | No | Optional PO number override applied during capture. |


Example:

```json
{
  "amount": 1000,
  "order_number": "ORD-1001",
  "po_number": "PO-1001"
}
```

API reference:

- [Capture a charge](/merchant-api/openapi/charges/capturecharge)


## Cancel a charge

Cancel the charge if the order will not be fulfilled.

| Environment | Endpoint |
|  --- | --- |
| Production | `POST` `https://app.resolvepay.com/api/charges/<charge_id>/cancel` |
| Sandbox | `POST` `https://app-sandbox.resolvepay.com/api/charges/<charge_id>/cancel` |


The charge must not have been previously captured to be eligible for cancellation.

Cancelled charges remain visible in the Resolve merchant dashboard when filtering for "All" invoices. You can archive the invoice to hide cancelled charges from the dashboard.

API reference:

- [Cancel a charge](/merchant-api/openapi/charges/cancelcharge)


## Refunds after capture

After a charge has been captured, refunds or reversals should be handled against the resulting invoice by issuing a credit note.

Payload guidance for credit notes:

| Field | Required | Notes |
|  --- | --- | --- |
| `invoice_id` | Yes | The captured invoice you want to refund or reduce. |
| `amount` | Yes | Credit note amount. |
| `reason_code` | Yes | Reason for the refund or adjustment. |
| `number` | No | Merchant credit note number. |
| `reason_message` | No | Additional explanation. |
| `credit_note_url` | No | Public URL to the credit note PDF. |


API reference:

- [Create a credit note](/merchant-api/openapi/credit-notes/createcreditnote)


For legacy integrations, see the [v2 API documentation](https://app.resolvepay.com/docs/api/v2).

Use either HTTP Basic Auth (`merchant_id` + `secret_key`) or Bearer token auth.

For production credential setup and authentication configuration, see the [Direct API Access and Authentication](/guides/direct-api-access-and-authentication) guide.