{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/transactions","auth":"optional","examples":{"codes":[]},"method":"put","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","params":[]},"next":{"description":"","pages":[]},"title":"Auth Reversal","type":"endpoint","slug":"auth-reversal","excerpt":"","body":"Auth Reversal is a request that reverses, or voids, a previously approved authorization that has not yet been captured.\n\n**Note:** The reversal must be performed within 8 days of the initial Auth Only request, or else an error will occur. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Amount is not applicable to this request\",\n  \"body\": \"An Auth Reversal will void the entire transaction amount, so the `amount` property is not relevant.\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\n\nSend a **[cardTransaction](doc:card-transaction)** object, with the following:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`cardTransactionType` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, value must be **AUTH_REVERSAL**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required if not using `merchantTransactionId`**</span>, \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value must be the transaction ID from the [Auth Only](doc:auth-only) response\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`merchantTransactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required if not using `transactionId`**</span>, \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value must be the merchant transaction ID from the [Auth Only](doc:auth-only) response\n\n**Note:** If both `transactionId` and `merchantTransactionId` are included, `merchantTransactionId` will be ignored.\n\n***\n\n###Response Details\n\nIf successful, the response HTTP status code is 200 OK.\nThe response will have the same content as the response to the initial [Auth Only](doc:auth-only) request, except that the value of `cardTransactionType` will be **AUTH_REVERSAL**. The `transactionId` or 'merchantTransactionId' in the response will match the ID for the initial [Auth Only](doc:auth-only).\n\n<hr>\n\n##Example\n\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n{\\n    \\\"cardTransactionType\\\": \\\"AUTH_REVERSAL\\\",\\n    \\\"transactionId\\\": 1011671987\\n}'\",\n      \"language\": \"curl\",\n      \"name\": \"Auth Reversal Request\"\n    },\n    {\n      \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n\\n{ \\n   \\\"cardTransactionType\\\": \\\"AUTH_REVERSAL\\\",\\n   \\\"merchantTransactionId\\\": 1011671987 \\n} '\",\n      \"language\": \"curl\",\n      \"name\": \"with Merchant Transaction ID\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 11,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"processingInfo\\\": {\\n        \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n        \\\"processingStatus\\\": \\\"SUCCESS\\\",\\n        \\\"cvvResponseCode\\\": \\\"ND\\\",\\n        \\\"avsResponseCodeName\\\": \\\"U\\\",\\n        \\\"avsResponseCodeZip\\\": \\\"U\\\"\\n    },\\n    \\\"softDescriptor\\\": \\\"BLS&#x2a;DescTest\\\",\\n    \\\"cardHolderInfo\\\": {\\n        \\\"firstName\\\": \\\"test first name\\\",\\n        \\\"lastName\\\": \\\"test last name\\\",\\n      \\t\\\"zip\\\": \\\"123456\\\"\\n    },\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"creditCard\\\": {\\n        \\\"cardLastFourDigits\\\": \\\"0026\\\",\\n        \\\"cardSubType\\\": \\\"CREDIT\\\",\\n        \\\"cardType\\\": \\\"VISA\\\",\\n      \\t\\\"cardCategory\\\": \\\"CLASSIC\\\"\\n    },\\n    \\\"cardTransactionType\\\": \\\"AUTH_REVERSAL\\\",\\n    \\\"transactionId\\\": 1011671987\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Auth Reversal Response: 200 OK\"\n    },\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 11,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"processingInfo\\\": {\\n        \\\"avsResponseCodeAddress\\\": \\\"U\\\",\\n        \\\"processingStatus\\\": \\\"SUCCESS\\\",\\n        \\\"cvvResponseCode\\\": \\\"ND\\\",\\n        \\\"avsResponseCodeName\\\": \\\"U\\\",\\n        \\\"avsResponseCodeZip\\\": \\\"U\\\"\\n    },\\n    \\\"softDescriptor\\\": \\\"BLS&#x2a;DescTest\\\",\\n    \\\"cardHolderInfo\\\": {\\n        \\\"firstName\\\": \\\"test first name\\\",\\n        \\\"lastName\\\": \\\"test last name\\\",\\n      \\t\\\"zip\\\": \\\"123456\\\"\\n    },\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"creditCard\\\": {\\n        \\\"cardLastFourDigits\\\": \\\"0026\\\",\\n        \\\"cardSubType\\\": \\\"CREDIT\\\",\\n        \\\"cardType\\\": \\\"VISA\\\",\\n      \\t\\\"cardCategory\\\": \\\"CLASSIC\\\"\\n    },\\n    \\\"cardTransactionType\\\": \\\"AUTH_REVERSAL\\\",\\n    \\\"merchantTransactionId\\\": 1011671987\\n}\",\n      \"language\": \"text\",\n      \"name\": \"with Merchant Transaction ID\"\n    }\n  ]\n}\n[/block]\n<hr>\n\n##Example Description\n\n####Auth Reversal\nThe example above shows an Auth Reversal request, where the transaction ID received for the initial [Auth Only](doc:auth-only) for this transaction was **1011671985**.\n\n####Auth Reversal with Merchant Transaction ID\nThe example above shows an Auth Reversal request, where the merchant transaction ID is being used instead of the transaction ID. \n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>\n\n<hr>\n\n##API Explorer\nTo test out a call, enter the request content below and then click **Try it!**\n\n**Tip**: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. *The request headers, including authorization, are already built in for you in this test area, so you should not include them here.*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"cardTransactionType\\\": \\\"AUTH_REVERSAL\\\",\\n    \\\"transactionId\\\": 1011671987\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","updates":[],"order":3,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"60fed21a76106200102eae7e","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Card/Wallet Transactions","slug":"payment-transaction-service","order":1,"from_sync":false,"reference":true,"_id":"60fed21a76106200102eae0b","version":"60fed21a76106200102eaec3","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-15T15:28:41.796Z","__v":0},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.39 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["60fed21a76106200102eae0a","60fed21a76106200102eae0b","60fed21a76106200102eae0c","60fed21a76106200102eae0d","60fed21a76106200102eae0e","60fed21a76106200102eae0f","60fed21a76106200102eae10","60fed21a76106200102eae11","60fed21a76106200102eae12","60fed21a76106200102eae13","60fed21a76106200102eae14","60fed21a76106200102eae15","60fed21a76106200102eae16","60fed21a76106200102eae17","60fed21a76106200102eae18","60fed21a76106200102eae19","60fed21a76106200102eae1a","60fed21a76106200102eae1b","60fed21a76106200102eae1c","613a2bc99ca316007473ee77"],"_id":"60fed21a76106200102eaec3","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"60a40b18fa93ca00237af576","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"createdAt":"2016-01-12T16:47:24.121Z","githubsync":"","__v":0}

Definition

{{ api_url }}{{ page_api_url }}

Documentation

Auth Reversal is a request that reverses, or voids, a previously approved authorization that has not yet been captured.

Note: The reversal must be performed within 8 days of the initial Auth Only request, or else an error will occur.

Amount is not applicable to this request

An Auth Reversal will void the entire transaction amount, so the amount property is not relevant.

Try it in the API Explorer

Request Content

Send a cardTransaction object, with the following:

      cardTransactionType     string    required, value must be AUTH_REVERSAL
      transactionId     string    required if not using merchantTransactionId,
      value must be the transaction ID from the Auth Only response
      merchantTransactionId     string    required if not using transactionId,
      value must be the merchant transaction ID from the Auth Only response

Note: If both transactionId and merchantTransactionId are included, merchantTransactionId will be ignored.


Response Details

If successful, the response HTTP status code is 200 OK.
The response will have the same content as the response to the initial Auth Only request, except that the value of cardTransactionType will be AUTH_REVERSAL. The transactionId or 'merchantTransactionId' in the response will match the ID for the initial Auth Only.


Example

Request Example

curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "cardTransactionType": "AUTH_REVERSAL",
    "transactionId": 1011671987
}'
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

{ 
   "cardTransactionType": "AUTH_REVERSAL",
   "merchantTransactionId": 1011671987 
} '

Response Example

{
    "amount": 11,
    "vaultedShopperId": 1234,
    "processingInfo": {
        "avsResponseCodeAddress": "U",
        "processingStatus": "SUCCESS",
        "cvvResponseCode": "ND",
        "avsResponseCodeName": "U",
        "avsResponseCodeZip": "U"
    },
    "softDescriptor": "BLS&#x2a;DescTest",
    "cardHolderInfo": {
        "firstName": "test first name",
        "lastName": "test last name",
      	"zip": "123456"
    },
    "currency": "USD",
    "creditCard": {
        "cardLastFourDigits": "0026",
        "cardSubType": "CREDIT",
        "cardType": "VISA",
      	"cardCategory": "CLASSIC"
    },
    "cardTransactionType": "AUTH_REVERSAL",
    "transactionId": 1011671987
}
{
    "amount": 11,
    "vaultedShopperId": 1234,
    "processingInfo": {
        "avsResponseCodeAddress": "U",
        "processingStatus": "SUCCESS",
        "cvvResponseCode": "ND",
        "avsResponseCodeName": "U",
        "avsResponseCodeZip": "U"
    },
    "softDescriptor": "BLS&#x2a;DescTest",
    "cardHolderInfo": {
        "firstName": "test first name",
        "lastName": "test last name",
      	"zip": "123456"
    },
    "currency": "USD",
    "creditCard": {
        "cardLastFourDigits": "0026",
        "cardSubType": "CREDIT",
        "cardType": "VISA",
      	"cardCategory": "CLASSIC"
    },
    "cardTransactionType": "AUTH_REVERSAL",
    "merchantTransactionId": 1011671987
}


Example Description

Auth Reversal

The example above shows an Auth Reversal request, where the transaction ID received for the initial Auth Only for this transaction was 1011671985.

Auth Reversal with Merchant Transaction ID

The example above shows an Auth Reversal request, where the merchant transaction ID is being used instead of the transaction ID.


Back to Top


API Explorer

To test out a call, enter the request content below and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{
    "cardTransactionType": "AUTH_REVERSAL",
    "transactionId": 1011671987
}

User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}