Payr withdrawal (Cashflows)

Payment Method Payr withdrawal (Payout) is available for Payr users to transfer funds onto a Payr card, such as in the case of winnings to be paid out of the customer’s account.

The following method IDs are covered in this section:

ID

Name

Credit/Debit State

Reversal State

312

PayrWithdrawal

WithdrawnByProvider (20)

Payment method interaction type: Synchronous execution (see Interaction Types).

After choosing to withdraw funds on Payr reloadable card the merchant sends request to Payout to PXP Financial. PXP Financial sends request to CashFlows and receive response. Response with payment details is sent to merchant.

Payment flow

Following diagram describe Payr withdraw:

521521

Backend2Backend Integration

The following parameters can be provided in initiatePaymentRequest:

key (value type, account type, required)

value

paymentAccountID (string, required)

initiatePaymentRequest for Payr reloadable card option should be created with unique account ID and it will be passed in PaymentAccountID element.

Scenario: Successful Payment

Example: initiatePaymentRequest:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
    <merchantID>KalixaAcceptDEMO</merchantID>
    <shopID>KalixaAcceptDEMO</shopID>
    <merchantTransactionID>d342323234312394ce-222sd222d2</merchantTransactionID>
    <paymentMethodID>312</paymentMethodID>
    <amount currencyCode="EUR">10.12</amount>
    <userID>7d46ad35-923a-4ba2-946e-64f65b</userID>
    <userIP>127.0.0.1</userIP>
    <userSessionID>bf4cae33-6b62-45f9-8e83-66b05eef7400</userSessionID>
    <creationTypeID>1</creationTypeID>
    <paymentAccountID>94470ac6-ff19-4fa7-83e7-da043897d410</paymentAccountID>
</initiatePaymentRequest>

Example: initiatePaymentResponse:

<initiatePaymentResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <payment xsi:type="paymentWithPaymentAccount">
        <merchantID>KalixaAcceptDEMO</merchantID>
        <shopID>KalixaAcceptDEMO</shopID>
        <paymentMethod>
            <key>312</key>
            <value>PayrWithdrawal</value>
        </paymentMethod>
        <merchantTransactionID>55555377-6815-4131-94ce-d51555s2</merchantTransactionID>
        <paymentID>39bc2f34-8e66-494d-9ca9-d6cfa8cc0935</paymentID>
        <userID>7d46ad35-923a-4ba2-946e-64f65b</userID>
        <paymentProvider>
            <key>150</key>
            <value>Cashflows</value>
        </paymentProvider>
        <amount currencyCode="EUR">10.12</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>4661fad1-a855-4674-a26c-73a7d2ceac1f</id>
            <definition>
                <key>20</key>
                <value>WithdrawnByProvider</value>
            </definition>
            <createdOn>2018-06-06T09:30:44.4637325Z</createdOn>
            <paymentStateDetails xsi:nil="true"></paymentStateDetails>
        </state>
        <isExecuted>true</isExecuted>
        <baseAmount currencyCode="EUR">10.12</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>39bc2f34-8e66-494d-9ca9-d6cfa8cc0935</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>93470ac6-ff19-4fa7-83e7-da043897d410</paymentAccountID>
        </paymentAccount>
    </payment>
</initiatePaymentResponse>

Test Data used in the above sample request:

field=value

result/output value

initiatePaymentRequest.merchantID=KalixaAcceptDEMO

initiatePaymentRequest.shopID=KalixaAcceptDEMO

initiatePaymentRequest.userID=7d46ad35-923a-4ba2-946e-64f65b

initiatePaymentRequest.paymentAccountID=93470ac6-ff19-4fa7-83e7-da043897d410

initiatePaymentRequest.amount=10.12

initiatePaymentRequest.amount.currencyCode=EUR

PXP Financial System responds synchronously with:

initiatePaymentResponse.payment.state.definition.key = 20

initiatePaymentResponse.payment.state.definition.value = WithdrawnByProvider

Scenario: Unsuccessful Payment - WithdrawErrorReportedByProvider

Same initiatePaymentRequest with following values:

field=value

result/output value

initiatePaymentRequest.merchantID=KalixaAcceptDEMO

initiatePaymentRequest.shopID=KalixaAcceptDEMO

initiatePaymentRequest.userID=8d46ad35-923a-4ba2-946e-64f65b

initiatePaymentRequest.paymentAccountID=94470ac6-ff19-4fa7-83e7-da043897d410

initiatePaymentRequest.amount=10.12

initiatePaymentRequest.amount.currencyCode=EUR

PXP Financial System responds synchronously with:

initiatePaymentResponse.payment.state.definition.key = 21

initiatePaymentResponse.payment.state.definition.value = WithdrawErrorReportedByProvider

Scenario: Unsuccessful Payment - RefusedByProvider

Option 1: Same initiatePaymentRequest with any initiatePaymentRequest.amount higher than available in your test account.

📘

Following test case is configured against PXP Financial mock environment.

Option 2:

field=value

result/output value

initiatePaymentRequest.merchantID=KalixaAcceptDEMO

initiatePaymentRequest.shopID=KalixaAcceptDEMO_2

initiatePaymentRequest.userID=7d46ad35-923a-4ba2-946e-64f65b

initiatePaymentRequest.paymentAccountID=94470ac6-ff19-4fa7-83e7-da043897d410

initiatePaymentRequest.amount=34.01

initiatePaymentRequest.amount.currencyCode=EUR

PXP Financial System responds synchronously with:

initiatePaymentResponse.payment.state.definition.key = 100

initiatePaymentResponse.payment.state.definition.value = RefusedByProvider

State diagram:

Diagram below follows transaction states of Payr withdraw:

609609