Resolve
  • Integrations
    • E-commerce transaction flow
    • Shopify / Shopify Plus
      • Processing transactions (Shopify)
      • Hide Resolve from non-B2B Customers in Shopify Checkout
    • BigCommerce
      • Processing transactions (BigCommerce)
      • Multi-Storefront Configuration
      • Payment Method Customization (B2B Edition)
      • Managing Shipments
      • Conditionally Show Resolve At Checkout
      • FAQs
    • Magento 2
      • Processing transactions (Magento 2)
    • WooCommerce
      • Processing transactions (WooCommerce)
    • Resolve checkout-sdk
      • Cancel an Uncaptured Charge
      • Errors
    • Add credit application modal
  • Merchant operations
    • Customer dispute resolution procedures
    • Sales-Rep Led Checkout
    • ERP & eCommerce Integrations
Powered by GitBook
On this page

Was this helpful?

  1. Integrations
  2. Resolve checkout-sdk

Cancel an Uncaptured Charge

PreviousResolve checkout-sdkNextErrors

Last updated 4 months ago

Was this helpful?

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 for more details.

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

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"
}

Already Captured

{
    "error": {
        "code": "INVALID_PARAM",
        "message": "Charge can't be canceled, captured at a time",
        "type": "invalid_request",
    }
}

Already Cancelled

{
    "error": {
        "code": "ALREADY_CANCELED",
        "message": "Charge has already been canceled",
        "type": "invalid_request",
        "env": "sandbox"
    }
}
{
    "error": {
        "code": "NOT_FOUND",
        "message": "Charge not found",
        "type": "not_found_error"
    }
}

archiving records
API documentation