Developer Docs
  • 👋Get Started
  • Add Payment Methods in Optty
  • Custom API | Headless
    • 🖥️Direct API Integration
      • Environments
      • Order Flow
      • 1️⃣Create Access Token
      • 2️⃣Get APM Options
      • 3️⃣Create Order
      • 4️⃣Handle Payment Response
      • 5️⃣Refund Order
      • 🔥Handling Exceptions
  • Platforms
    • ◾BigCommerce
      • 🚀Activate Optty
      • ⚡Add Optty Widgets
        • 1️⃣Install the App
        • 2️⃣Create Widget Token
        • 3️⃣Edit Your Template
        • 4️⃣Widget Configuration
      • 💳Refunds
    • Magento 2
      • Install Optty Module
      • Configure the Optty Extension
      • One Step Checkout
    • Salesforce Commerce Cloud
      • Component Overview
      • Implementation Guide
      • Operation and Management
      • User Guide
    • 🟪WooCommerce
      • 🚀Install Optty
      • ⚡Setup Widgets
      • 💳Refunds
  • Widget
    • Widget Setup and Integration
    • Create Order Widget Integration
    • Handle Order Payment Widget Integration
  • API References
    • Create Order
      • Create Order Response
    • Refund Order
    • Void Order
    • Capture Order
    • Transaction Details
    • Create Customer Session
    • Best Practice
  • Go Live
  • Universal Payment Platform
    • Support Articles
Powered by GitBook
On this page
  • Resource URL
  • Headers
  • Parameters
  • Request Parameters
  • Response Parameters
  • Sample Request/Response
  1. API References

Void Order

This endpoint is for fully or partially void an order for an authorized (deferred payment request.

Resource URL

POST http://api.qa.optty.com/orders/{orderReference}/void

For live environment, please update the endpoint to https://api.optty.com

Headers

Key
Value

Content-Type

application/json

Authorization

Bearer {GENERATED_ACCESS_TOKEN}

Parameters

Request Parameters

Field
Type
Description
Required

voidReference

string

The reference for voiding request

Yes

description

string

The description or reason for the voiding

No

amount

numeric

The amount to be voided from the total order amount

Yes

Response Parameters

Field
Type
Description
Required

voidReference

string

The reference passed for the voiding request

voidedId

string

The returned Id for the completion execution of the request

amount

numeric

The amount processed for the voiding operation

Sample Request/Response

{
    "voidReference": "LatEHAuPtpN2HSrTMK-1",
    "description": "Please void this order",
    "amount": 100
}
{
    "voidReference": "LatEHAuPtpN2HSrTMK-1",
    "amount": 100,
    "voidedId": "LatEHAuPtpN2HSrTMK-1"
}

PreviousRefund OrderNextCapture Order

Last updated 3 months ago