Void an APM transaction

Background
Before starting this tutorial, make sure you understand the following topics from the Quick start section:

For situations where an APM transaction has been run as auth only, you can void that transaction at a later time, if needed. For the steps to run that auth-only transaction, see Run an auth only transaction.

You can void a transaction using either the API or the Nexio Dashboard.

Dashboard

To void an auth-only APM transaction through the Nexio Dashboard, complete the following steps:

  1. Go to the Nexio Dashboard and log in.
  2. In the top left of the contents pane, select the merchant account or accounts that you want to void the APM transaction for.
  3. Go to the Transactions feature.
  4. Filter the resulting list of transactions as needed. For example, set the Method to "APM" and the Status to "AUTHONLY" to get auth-only transactions for all alternative payment methods.
  5. Click the transaction you want in order to open it.
  6. Click Void.
  7. In the Void Transaction dialog, if needed, change the void amount.
  8. Click Void Transaction.
    The system attempts to void that transaction.
  9. Repeat steps 3-8 as needed.

API

To void an auth-only APM transaction through the Nexio API, complete the following steps:

  1. Make sure you know the payment ID of the auth-only transaction.
    This value is returned as id in the original auth-only transaction.
    If you do not know the paymentId or amount to use, make a call with the View transactions endpoint with the query filters of transactionStatus=11 and plugin= to get an array of possible transactions with the IDs (returned as plugin.originalId).
  2. Send a request to the Void an APM transaction endpoint.
    You need to include the paymentId for the auth-only transaction and the amount to void.
    curl -X POST https://api.nexiopaysandbox.com/apm/v3/void \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "data": {
        "amount": 4.00
      },
      "id": "[payment_id]"
    }'
    
    A successful request returns a message of success, along with other transaction information:
    {
      "id": "[payment_id]",
      "merchantId": "000999",
      "transactionDate": "2024-12-12T23:13:12.149Z",
      "transactionStatus": "voided",
      "amount": 4.00,
      "transactionType": "sale",
      "currency": "USD",
      "gatewayResponse": {
        "gatewayName": "braintreePayPal",
        "message": "voided"
      },
      "data": {
        "amount": 4.00,
        "currency": "USD",
        "settlementCurrency": "USD"
      },
      "message": "success"
    }
    
  3. Repeat steps 1-2 for each APM transaction you want to void.