Void
POST /v1/transactions/<transaction_token>/void.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>
HTTPS/1.1 200 OK
{
"transaction": {
"on_test_gateway": true,
"created_at": "2017-11-21T18:51:34Z",
"updated_at": "2017-11-21T18:51:34Z",
"succeeded": true,
"state": "succeeded",
"token": "9IstHnD1haMTBWkIjlYWb5TwuO0",
"transaction_type": "Void",
"order_id": null,
"ip": null,
"description": null,
"email": null,
"merchant_name_descriptor": null,
"merchant_location_descriptor": null,
"gateway_specific_fields": {
},
"gateway_specific_response_fields": {
},
"gateway_transaction_id": "61",
"gateway_latency_ms": 0,
"message_key": "messages.transaction_succeeded",
"message": "Succeeded!",
"gateway_token": "Zi0OHhR0fn1dSGym1Wol302ajDY",
"gateway_type": "test",
"response": {
"success": true,
"message": "Successful void",
"avs_code": null,
"avs_message": null,
"cvv_code": null,
"cvv_message": null,
"pending": false,
"result_unknown": false,
"error_code": "",
"error_detail": null,
"cancelled": false,
"fraud_review": null,
"created_at": "2017-11-21T18:51:34Z",
"updated_at": "2017-11-21T18:51:34Z"
},
"shipping_address": {
"name": null,
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"phone_number": null
},
"reference_token": "FVTLuCm5KfHD8fyZpP8GwjTH71I"
}
}
<transaction>
<on_test_gateway type="boolean">true</on_test_gateway>
<created_at type="dateTime">2017-11-21T18:51:35Z</created_at>
<updated_at type="dateTime">2017-11-21T18:51:35Z</updated_at>
<succeeded type="boolean">true</succeeded>
<state>succeeded</state>
<token>25MTT3u0QeXxlV5ZkXXKzU7983k</token>
<transaction_type>Void</transaction_type>
<order_id nil="true"></order_id>
<ip nil="true"></ip>
<description nil="true"></description>
<email nil="true"></email>
<merchant_name_descriptor nil="true"></merchant_name_descriptor>
<merchant_location_descriptor nil="true"></merchant_location_descriptor>
<gateway_specific_fields>
</gateway_specific_fields>
<gateway_specific_response_fields>
</gateway_specific_response_fields>
<gateway_transaction_id>51</gateway_transaction_id>
<gateway_latency_ms type="integer">0</gateway_latency_ms>
<message key="messages.transaction_succeeded">Succeeded!</message>
<gateway_token>Zi0OHhR0fn1dSGym1Wol302ajDY</gateway_token>
<gateway_type>test</gateway_type>
<shipping_address>
<name nil="true"></name>
<address1 nil="true"></address1>
<address2 nil="true"></address2>
<city nil="true"></city>
<state nil="true"></state>
<zip nil="true"></zip>
<country nil="true"></country>
<phone_number nil="true"></phone_number>
</shipping_address>
<response>
<success type="boolean">true</success>
<message>Successful void</message>
<avs_code nil="true"></avs_code>
<avs_message nil="true"></avs_message>
<cvv_code nil="true"></cvv_code>
<cvv_message nil="true"></cvv_message>
<pending type="boolean">false</pending>
<result_unknown type="boolean">false</result_unknown>
<error_code></error_code>
<error_detail nil="true"></error_detail>
<cancelled type="boolean">false</cancelled>
<fraud_review nil="true"></fraud_review>
<created_at type="dateTime">2017-11-21T18:51:35Z</created_at>
<updated_at type="dateTime">2017-11-21T18:51:35Z</updated_at>
</response>
<reference_token>JYHEX7pkuKqWfZ6SjDrtIp8ZPeJ</reference_token>
</transaction>
Cancel an authorization
transaction or a capture
/purchase
transaction that hasn’t yet settled at the merchant account.
This API call can also be used to cancel a verify
transaction that was part of the Ebanx customer enrollment process. To learn more about this visit Ebanx Gateway.
URL Parameters
Parameter | Description |
---|---|
transaction_token required |
The token identifying the original authorize or purchase transaction |
format required |
One of json or xml |
Response Body
Notable response elements include:
Element | Description |
---|---|
transaction | Root element |
❯ token | The token uniquely identifying this transaction at Spreedly |
❯ succeeded | true if the transaction request was successfully executed, false otherwise |
❯ message | A human-readable string indicating the result of the transaction |
❯ gateway_transaction_id | The id of the transaction at the gateway. To be used when corresponding with the gateway or reconciling transactions. |
❯ response | Unmodified details of the gateway response, including the message and error_code , if applicable. For failed transactions these fields can help determine the root cause. |