{"_id":"59dfa5868b51880010b74af7","category":{"_id":"59dfa5828b51880010b74ab8","version":"59dfa5828b51880010b74ab6","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-15T15:28:41.796Z","from_sync":false,"order":1,"slug":"payment-transaction-service","title":"Card Transactions"},"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","parentDoc":null,"version":{"_id":"59dfa5828b51880010b74ab6","project":"57336fd5a6a9c40e00e13a0b","__v":1,"createdAt":"2017-10-12T17:25:22.850Z","releaseDate":"2017-10-12T17:25:22.850Z","categories":["59dfa5828b51880010b74ab7","59dfa5828b51880010b74ab8","59dfa5828b51880010b74ab9","59dfa5828b51880010b74aba","59dfa5828b51880010b74abb","59dfa5828b51880010b74abc","59dfa5828b51880010b74abd","59dfa5828b51880010b74abe","59dfa5828b51880010b74abf","59dfa5828b51880010b74ac0","59dfa5828b51880010b74ac1","59dfa5828b51880010b74ac2","59dfa5828b51880010b74ac3","59dfa5828b51880010b74ac4","59dfa5828b51880010b74ac5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.23 Release","version_clean":"8976.0.0-JSON","version":"8976-JSON"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-12T16:47:24.121Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[{"code":"","language":"text"}]},"settings":"57ee593a21ceb20e0061959e","auth":"optional","params":[],"url":"/transactions"},"isReference":true,"order":3,"body":"Auth Reversal is a request that reverses, or voids, a previously approved authorization that has not yet been captured.\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\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`transactionId` &nbsp;&nbsp;&nbsp; *string* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, value must be the transaction ID from the [Auth Only](doc:auth-only) response\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` in the response will match the `transactionId`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 POST 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}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"amount\\\": 11,\\n    \\\"vaultedShopperId\\\": 1234,\\n    \\\"recurringTransaction\\\": \\\"ECOMMERCE\\\",\\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}\n[/block]\n<hr>\n\n##Example Description\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<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]","excerpt":"","slug":"auth-reversal","type":"put","title":"Auth Reversal"}

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.

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, value must be the transaction ID from the Auth Only response

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 in the response will match the transactionIdfor the initial Auth Only.


Example

Request Example

curl -v -X POST 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
}'

Response Example

{
    "amount": 11,
    "vaultedShopperId": 1234,
    "recurringTransaction": "ECOMMERCE",
    "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
}


Example Description

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



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 }}