Get payment return details

Prev Next

This tutorial describes how you can get payment return details with the Payments Hub API.

For this tutorial, consider a scenario where a merchant has received a payment, which they have returned to the payee for some reason, and they later want to see the payment return ID and return amount for that return. The Payments Hub API can be used to retrieve these details. The tutorial describes how you can retrieve the payment return details using the ISO pacs.004 message.

Retrieve the payment return details

This section describes how to retrieve the payment return details via a pacs.004 HTTP request to the Payments Hub API. To send this request, you need to provide the Payments Hub ID. This section also illustrates a successful response.

Request

Create and send a request using the following operation:

GET https://sandbox.api.pagonxt.com/payments/pacs004/v09/{paymentsHubId}

Headers

The request must contain the headers shown in the following table.

Header name

Description

Required/ Optional

Values

X-Client-Id

Client ID

Required

<Client ID>

Parameters

The request must contain the path parameter shown in the following table.

Parameter type

Parameter name

Description

Data format

Required/ Optional

Path

paymentsHubId

Payments Hub ID related to the payment return whose details you want to retrieve. This is the value you received when you originally submitted the payment return request.

String

Required

Response

If the request is valid, you receive an HTTP 200 OK response, which means that the payment return details were successfully retrieved. For further details of HTTP response codes and instructions on how to handle errors, see HTTP codes and request error handling .

In addition to the response code, the response body returns the pmtRtr JSON object, which contains a pacs.004 ISO message. This message contains different elements depending on which payment scheme was used in the original transaction.

Response body

The following tutorials provide specific examples of the pacs.004 message per scheme