Get the status of a return request
In this tutorial, you will learn how to use the Global Payments 2 API to retrieve the status of a return request. By the end of this tutorial, you will know how to use a returnId to manually check and confirm the status of your request.
Before you begin
To check the status of a return request, you will need the returnId value associated with your request. This value is provided in the successful payment response.
Send a request
A successful response contains a returnId value that can be used to retrieve the status of the payment request. To do this, call a GET request to the /returns/{returnId} endpoint, and append your unique returnId to the end of the call:
curl
--request GET \
--url https://api.payments.jpmorgan.com/payment/v2/payments/returns/bre4c092-b90d-4b33-bd19-1a3843370bpt \
--header 'Accept: application/json'Confirm the response
The following example shows a status response for a pending request.
{
"returnId": "bre4c092-b90d-4b33-bd19-1a3843370bpt",
"returnStatus": "PROCESSING",
"paymentType": "RTP",
"originalPaymentIdentifiers": {
"bankReferenceNumber": "ABC12346000"
},
"paymentIdentifiers": {
"endToEndId": "RT202109311350000"
},
"chargeBearer": "DEBTOR",
"country": "BR",
"returnType": "PARTIAL",
"value": {
"amount": "50.00"
},
"additionalInformation": [
"OrderNumber:OD-1234000"
]
}The following example shows a return response with a sub-status indicating that the bank completed the return.
{
"returnId": "bre4c092-b90d-4b33-bd19-1a3843370bpt",
"returnStatus": "COMPLETED",
"returnSubStatus": "COMPLETED_BY_JPM",
"paymentType": "RTP",
"originalPaymentIdentifiers": {
"bankReferenceNumber": "ABC12346000"
},
"paymentIdentifiers": {
"endToEndId": "RT202109311350000"
},
"chargeBearer": "DEBTOR",
"country": "BR",
"returnType": "PARTIAL",
"value": {
"amount": "50.00"
},
"additionalInformation": [
"OrderNumber:OD-1234000"
]
}Related
- For more information about return parameters, see Payment parameters.
- For more information about status responses and error codes supported by the Global Payments 2 API, see Global Payments 2 status responses and error codes.