For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • Overview
  • Learning Plans
    • Developer Foundations
    • Composable Developer
    • Stencil Developer
    • B2B Developer
  • Courses
        • Order Transactions API
        • Order Refunds
        • Calculating Totals
      • Conclusion
    • Learning Changelog
Dev Portal
LogoLogo
On this page
  • Handling Refunds
  • Refund Quotes
  • Creating a Refund
  • Offline Order Refunds
CoursesCheckout and Orders APIModule 6: Order Transactions API

Order Refunds

Was this page helpful?
Previous

Order Transactions API

Next

Calculating Totals

Built with
Lesson 18 of 26 · 30 min

Handling Refunds

Order v3 exposes endpoints for creating refunds against orders with settled payments. These endpoints are useful when building order management or payment integrations as they make embedding refund functionality directly into the application possible without requiring merchants to return to their BigCommerce control panel.

Refund Quotes

POST /v3/orders/{id}/payment_actions/refund_quotes

A refund quote provides the tax amount, total refund amount, and a list of available payment methods for order refunds.

To get an item_id, make a GET request to v2/orders/{order_id}/products. The returned id value is the item_id needed to create a product refund quote. The returned order_address_id value is the item_id needed to create a shipping refund quote.

To get a list of orders and their ids, make a request to get all orders.

Image

Creating a Refund

POST /v3/orders/{order_id}/payment_actions/refunds

Use the provider_id, the amount and items from the refund quote to create a refund.

  • Tax-exempt custom amount at the order level - set item_type to order and specify the amount to refund
  • Refund shipping or handling - set item_type to shipping or handling and specify the amount to refund
  • Refund products or gift wrapping - set item_type to product or gift_wrapping` and specify the quantity to refund

Image

Offline Order Refunds

Payments collected outside of BigCommerce can be marked as offline when creating a refund. Marking payments as offline is a way to keep track of which portions of an order you refunded. If you did not receive payment using BigCommerce, then the funds cannot be refunded directly to the payment source using BigCommerce’s refund endpoints.