Cancel an Uncaptured Charge

Cancel a Charge

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

If an order has been cancelled in your eCommerce platform, it's possible to cancel the related charge using the charge_id. In order to cancel a charge, the charge must have not been previously captured. See Resolve checkout-sdk for details on the checkout flow.

Cancelled charges are still visible from the Resolve merchant dashboard when filtering for "All" invoices. To hide cancelled charges from the dashboard you can archive the invoice, see archiving records for more details.

For details on Resolve's REST API such as rate limits and more, explore the API documentation.

Headers

Name
Value

Content-Type

application/json

Authorization

<username>:<password>

Response

{
    "id": "irrOFxsH0V",
    "number": "R33B-VYV9",
    "amount": 27.49,
    "captured": false,
    "captured_at": null,
    "canceled": true,
    "canceled_at": "2024-12-03T21:13:57.345Z",
    "created_at": "2024-12-03T21:13:29.455Z",
    "updated_at": "2024-12-03T21:13:57.344Z",
    "metadata": null,
    "fee": 0.8,
    "fee_refunded": 0,
    "merchant_cart": {
        "items": [
            {
                "sku": "ABC-123",
                "name": "T-Shirt",
                "quantity": 1,
                "unit_price": 19.99
            }
        ],
        "modal": true,
        "billing": {
            "name": "",
            "phone": "",
            "address_city": "",
            "company_name": "",
            "address_line1": "",
            "address_line2": "",
            "address_state": "",
            "address_postal": "",
            "address_country": ""
        },
        "sandbox": true,
        "customer": {
            "name": "Example Name",
            "email": "",
            "phone": "",
            "last_name": "Example Name",
            "first_name": "Example Name"
        },
        "merchant": {
            "id": "exampleid",
            "cancel_url": "https://www.merchantsite.com/cancel",
            "success_url": "https://www.merchantsite.com/confirm"
        },
        "metadata": {
            "platform_type": "checkout-sdk",
            "platform_resolve": "1.0.0",
            "platform_version": "1.0.0"
        },
        "shipping": {
            "name": "Example Name",
            "phone": "4153334567",
            "address_city": "San Francisco",
            "company_name": "Company Name",
            "address_line1": "633 Folsom St",
            "address_line2": "FL 7",
            "address_state": "CA",
            "address_postal": "94017",
            "address_country": "US"
        },
        "po_number": "",
        "tax_amount": 2.5,
        "order_number": "111112",
        "total_amount": 27.49,
        "shipping_amount": 5
    },
    "po_number": "",
    "order_number": "111112"
}

Last updated