post
https://fin-api.digetpay.com/v1/payment/s2s/void
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Releases a previously authorized payment without capturing the funds.
Use this endpoint when an authorization should be cancelled before settlement.
Authorization required: Void only works for payments created with
auth: Ythat have not yet been captured.
Request
| Method | POST |
| URL | {baseUrl}/payment/s2s/void |
| Auth | Header x-api-key (required) |
Body Parameters
| Parameter | Required | Description |
|---|---|---|
transactionId | Yes | Transaction ID returned from the authorization request |
Important: Once a transaction has been captured, it can no longer be voided. Use the Refund API instead.
Request example
{
"transactionId": "c09fba3c-59e2-434a-9ec1-5d2e71a44a8d"
}Transaction flow
sequenceDiagram
autonumber
participant Merchant as Your Server
participant API as DigetPay API
participant Gateway as Payment Gateway
Note over Merchant,Gateway: Authorization not yet captured
Merchant->>API: POST /payment/s2s/void
API->>Gateway: Release authorization
Gateway-->>API: Void accepted
API-->>Merchant: result=ACCEPTED
Responses
{
"success": {
"status": 200,
"body": {
"code": 200,
"message": "Success",
"errorCode": null,
"data": {
"result": "ACCEPTED",
"action": "CREDITVOID",
"rrn": "609211298866",
"order_id": "8179222228",
"trans_id": "0808779145497567115585",
"card_brand": "MASTER",
"decline_reason": null
}
}
}
}{
"failed": {
"status": 400,
"body": {
"code": 400,
"message": "Transaction already captured",
"errorCode": "400",
"data": null
}
}
}{
"failed_unauthorized": {
"status": 401,
"body": {
"statusCode": 401,
"message": "Missing API key",
"error": "Unauthorized"
}
}
}Response fields
| Field | Description |
|---|---|
result | Void result |
action | Always CREDITVOID |
rrn | Gateway reference number |
trans_id | Gateway payment reference |
card_brand | Card brand used for the payment |
A successful void releases the authorization hold and no funds are captured from the customer's card.
If the authorization has already been captured, use the Refund API to return the payment instead of Void.
