Retrieve Payment Details
The details of an already initiated payment can be retrieved at any time by invoking the getPayments web method of Payment Redirection Service v3 API. Depending on the status of the payment (contained in getPaymentsResponse.payments.payment.state.definition
) additional actions may be triggered on it (see Execute Payment Action.
MerchantTransactionID and multiple payments in response
The
getPaymentsRequest
containsmerchantTransactionID
instead ofpaymentID
, and returns a list of payments, instead of a single payment. The reason for this is that when a merchant triggers a payment, amerchantTransactionID
is passed to Payment Service, which identifies the order in the Merchant System to be paid by the customer. It is possible that the customer tries to pay the order, but does not succeed from the first time, in which case there will be several unsuccessful and one successful payment associated with the order. The usual case is that thegetPaymentsResponse.payments
contains a single item.
See getPayments for an example of getPaymentsRequest
and getPaymentsResponse
messages.
Redirect Integration
The Merchant System generates a merchantTransactionID
and passes it in the call to getRedirectData
, before redirecting the user to PXP Financial Hosted Payment Pages. Once the user is redirected back the merchant may:
- check the order status in its database, which will be updated after processing the push notification from PXP Financial (see PaymentStateChangedNotification) or
- invoke 'getPayments' with the previously generated
merchantTransactionID
to get the status of the payment directly from PaymentService.
Backend2Backend Integration
The Merchant System generates a merchantTransactionID
and passes it in the call to initiatePayment
. Depending on the Payment Method Interaction Type (see Interaction Types) the Merchant System receives:
- the status of the payment in
initiatePaymentResponse
(in case of Synchronous Execution), no call togetPayments
needed - the status
RedirectUrlCreated
ininitiatePaymentResponse
(in case of Redirection to External Payment Provider). After redirecting the user to the External Payment Provider's web site, and upon user's return to the merchant's website, the merchant may (similar to the Redirect Integration described above) rely either on the push notification, or actively invoke thegetPayments
method with the previously generated and storedmerchantTransactionID
.
Updated almost 6 years ago