Debit Money for Withdrawal

There are 2 ways to debit a customer's account in the merchant system when using Redirect Integration / PXP Financial Hosted Payment Pages:

  1. The customer account at the merchant is debited before the customer is redirected to PXP Financial Hosted Payment Pages for selecting a withdrawal method and entering the required details (e.g. bank account data). In this case special attention should be paid for cases when the customer does not finish the data entry (decides to go back to the merchant website), as the money must be credited back to his account.
  2. Customer is redirected to PXP Financial Hosted Payment Pages, chooses a method, enters the required data (e.g. bank account) and presses the Pay button. An additional interaction takes place between PaymentService and the merchant system for debiting the money from the customer's account (using the standard notification mechanism explained in handlePaymentStateChangedNotification), but in a synchronous mode).

The following diagram is a continuation of the process in the previous section and describes in detail option 2 for debiting the customer's account at the merchant:

960960

Step

Description

10

The customer inserts payment details and clicks on Pay button

11

Payment Service will process the request

12

PaymentService will send a handlePaymentStateChangedNotificationRequest to the merchant.

The merchant will answer with a handlePaymentStateChangedNotificationResponse

13

If the merchant refuses the notification (handlePaymentStateChangedNotificationResponse.ResultCode=3), then the customer will be redirected to the “Error Page”.
If the merchant accepts the notification (handlePaymentStateChangedNotificationResponse.ResultCode=0), then the customer will be redirected to the “Success Page”

14,15

If the merchant refuses the notification (handlePaymentStateChangedNotificationResponse:ResultCode=3), then PXP Financial will cancel the payment and send another handlePaymentStateChangedNotificationRequest confirming the cancellation.
If the merchant accepts the notification (handlePaymentStateChangedNotificationResponse.ResultCode=0), then PXP Financial will process the payment and send another handlePaymentStateChangedNotificationRequest confirming the successful processing

The important part is 12 "Sync call for the Created payment state", at which point the merchant must debit the amount from the user’s account. For each unique merchant transaction id only the first notification should be approved and all other calls should be declined or ignored. Please refer to section PaymentStateChangedNotification for general instructions on payment result handling.

The actual withdrawal processing (including communication with the 3rd party payment provider) takes place later. A standard asynchronous notification is sent to the merchant once the withdrawal has been executed or cancelled.