Retrieving transaction list from decline recovery
You can obtain a list of declined and recovered transactions and their recovery status for a specified date range.
To retrieve transactions by recovery status, do the following:
-
Retrieve recovery status
Perform a
GET
request for the declined transactions with the/recovery/v3
endpoint.You can specify a start and end date as part of the request. You can also specify to retrieve transactions of a specific recoveryStatus. The following table shows the possibilities for recoveryStatus and what they mean.
recoveryStatus Status Description 10 Disabled No retry attempt made. Can be enabled if merchant is configured for Decline Recovery service. 20 In progress Transaction request has been sent to the gateway for processing. This is a temporary status. 30 Scheduled The retry attempt has been scheduled. 40 Unrecoverable The declined transaction cannot be retried. 50 Recovered The transaction has been successfully retried. For details on other options with this request, see View recovery status in the Reporting API.
For example, in the following, the request is to retrieve all declined or recovered transactions regardless of status for the second quarter of 2021, starting with the first one and showing only 10 at a time.
Example Request
curl -X GET 'https://api.nexiopaysandbox.com/recovery/v3?startDate=2021-03-01&endDate=2021-06-30&offset=0&limit=10' \ -H 'Authorization: Basic [Base64_encoded_login]'
-
Note the recoveryStatus of the transactions in the response
The response includes a
rows
array with each transaction that matches the request parameters. The information for each item in the array includes a recoveryStatus.This example response shows 3 resulting transactions. Note that the first one has a
recoveryStatus
of 30, indicating that the retry attempt is scheduled. The second one has arecoveryStatus
of 50, indicating that the retry of the transaction was successful. The third one has arecoveryStatus
of 40, indicating that the declined transaction cannot be retried.Example 200 Response
{ "offset": 0, "limit": 10, "rows": [ { "id": 62641, "retryDate": "2021-06-08T19:00:00.000Z", "transactionDate": "2021-05-25T14:08:20.000Z", "originalAmount": 77.65, "originalDeclinePaymentId": "eyJuYW1lIjoiIiwibWVyY2hhbnRJZCI6IjEwMDI2MCIsInJlZk51bWJlciI6IjQwMDY1OTkyNDM3IiwicmFuZG9tIjowLCJjdXJyZW5jeSI6InVzZCJ9", "orderNumber": "210058A", "recoveryStatus": 30, "retryCount": 13, "merchantId": "100260", "userName": "[email protected]", "isEnabledForRecovery": true, "updatedAt": "2021-06-07T19:01:28.000Z", "declineMessage": "This transaction has been declined." }, { "id": 61829, "retryDate": "2021-05-24T15:13:26.000Z", "transactionDate": "2021-05-24T21:09:22.000Z", "originalAmount": 77.58, "originalDeclinePaymentId": "eyJuYW1lIjoiIiwibWVyY2hhbnRJZCI6IjEwMDI2MCIsInJlZk51bWJlciI6IjQwMDY1OTM3MzAyIiwicmFuZG9tIjowLCJjdXJyZW5jeSI6InVzZCJ9", "orderNumber": "210058A", "recoveryStatus": 50, "retryCount": 5, "merchantId": "100039", "userName": "[email protected]", "isEnabledForRecovery": true, "updatedAt": "2021-05-27T21:15:26.000Z", "declineMessage": "This transaction has been declined." }, { "id": 35343, "retryDate": null, "transactionDate": "2021-04-09T16:00:48.000Z", "originalAmount": 109.33, "originalDeclinePaymentId": "eyJuYW1lIjoiIiwibWVyY2hhbnRJZCI6IjEwMDI2MCIsInJlZk51bWJlciI6ImNoXzFJVDd6SUtHTVRlYmRqQjR2bm5RbkVPWCIsInJhbmRvbSI6MCwiY3VycmVuY3kiOiJhdWQifQ==", "orderNumber": "1234567", "recoveryStatus": 40, "retryCount": 0, "merchantId": "100039", "userName": "[email protected]", "isEnabledForRecovery": false, "updatedAt": "2021-04-09T16:01:25.000Z", "declineMessage": "Your card was declined. This transaction requires authentication." } ], "hasMore": false }
Updated 7 months ago