Payr reloadable deposit (Cashflows)

Payr reloadable allows customers to re-use the same Payr card when they make a purchase. The customer workflow is much smoother, and customers benefit from a single account through which they can view transaction history and manage their own payments.

The following method IDs are covered in this section:

IDNameCredit/Debit State
308PayrReloadableDepositDepositedByProvider(29)

Payment method interaction type: Redirection to External Payment Provider (see Interaction Types).
After choosing the payment method on the merchant's site the user is redirected to the provider's site to proceed with payment. When the payment is executed, Cashflows sends notification whether it's successful or refused.

Payment flow

Following diagrams describe Payr reloadable deposit:

751 751

Redirect Integration

Currently not supported.

Backend2BackendIntegration

The following table contains the fields to be sent in the initiatePaymentRequest xml section:

key (value type, account type, required)value
amount (long integer, required)Deposit amount. Must be numeric in following format: 1000.00

The following table contains the fields to be sent in the initiatePaymentRequest.userData xml section:

key (value type, account type, required)value
street (string, required)
countryCode2 (string, required)User's two-letter ISO 3166 country code
dateOfBirth (datetime, required)User's date of birth in following format:
CCYY-MM-DDThh:mm:ss

The following table contains the fields to be sent in the initiatePaymentRequest.specificPaymentData xml section:

key (value type, account type, required)value
SuccessPageUrl (string, required)URL to which the user will be redirected if
transaction is successful
ErrorPageUrl (string, required)URL to which the user will be redirected if
transaction is unsuccessful
CancelPageUrl (string, required)URL to which the user will be redirected if
transaction is cancelled

The following table contains the fields to be sent in the initiatePaymentRequest.paymentAccountID xml section:

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, TopUp needed

Step 1: Initiate the Payment

<?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>PG</merchantID>
    <shopID>ferrari</shopID>
    <merchantTransactionID>cfdw2dc7-6ada-4260-94bf-3d3f234f</merchantTransactionID>
    <paymentMethodID>308</paymentMethodID>
    <amount currencyCode="EUR">12.45</amount>
    <userID>55667788</userID>
    <userData>
        <address>
          <street>Street Name</street>  
          <countryCode2>AT</countryCode2>
        </address>
        <dateOfBirth>1955-02-15T00:00:00</dateOfBirth>
    </userData>
    <userIP>127.0.0.1</userIP>
  	<userSessionID>7495c35f-3c55-4a08-a0a0-03f3ed917fbc</userSessionID>
	  <creationTypeID>1</creationTypeID>
    <specificPaymentData>
        <data xsi:type="keyStringValuePair">
            <key>SuccessPageUrl</key>
            <value>http://success/?a=b&amp;c=d</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ErrorPageUrl</key>
            <value>http://error/?a=b&amp;c=d</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>CancelPageUrl</key>
            <value>http://cancel/?a=b&amp;c=d</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>LanguageCode</key>
            <value>en</value>
        </data>
    </specificPaymentData>
    <paymentAccountID>91CAADB8-99C9-4349-BB6B-62D6A367F712</paymentAccountID>
</initiatePaymentRequest>
<?xml version="1.0" encoding="utf-8"?>
<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>PG</merchantID>
        <shopID>ferrari</shopID>
        <paymentMethod>
            <key>308</key>
            <value>PayrReloadableDeposit</value>
        </paymentMethod>
        <merchantTransactionID>cfdw2dc7-6ada-4260-94bf-3d3f234f</merchantTransactionID>
        <paymentID>e44e2046-6e43-4f2a-86b2-b3759a1a430c</paymentID>
        <userID>55667788</userID>
        <paymentProvider>
            <key>150</key>
            <value>Cashflows</value>
        </paymentProvider>
        <amount currencyCode="EUR">12.45</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>cd3197f0-40d5-4dee-b727-8861f796d28a</id>
            <definition>
                <key>30</key>
                <value>RedirectURLCreated</value>
            </definition>
            <createdOn>2018-04-17T14:27:21.084595Z</createdOn>
            <description>http://dev.backend.cqrpayments.com/WebMockProviders/CashflowsFrontend/Index?ID=e44e2046-6e43-4f2a-86b2-b3759a1a430c</description>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>RedirectionUrl</key>
                    <value>http://dev.backend.cqrpayments.com/WebMockProviders/CashflowsFrontend/Index?ID=e44e2046-6e43-4f2a-86b2-b3759a1a430c</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>PaymentStateReasonID</key>
                    <value>1</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>false</isExecuted>
        <baseAmount currencyCode="EUR">12.45</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>e44e2046-6e43-4f2a-86b2-b3759a1a430c</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>91CAADB8-99C9-4349-BB6B-62D6A367F712</paymentAccountID>
        </paymentAccount>
    </payment>
</initiatePaymentResponse>

Step 2: User is redirected to provider's website.

Step 3: CashFlows payment notification is processed, and a notification to the merchant is sent:

<?xml version="1.0" encoding="utf-8"?>
<handlePaymentStateChangedNotificationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <payment xmlns="http://www.cqrpayments.com/PaymentProcessing" xsi:type="paymentWithPaymentAccount">
        <merchantID>PG</merchantID>
        <shopID>ferrari</shopID>
        <paymentMethod>
            <key>308</key>
            <value>PayrReloadableDeposit</value>
        </paymentMethod>
        <merchantTransactionID>cfdw2dc7-6ada-4260-94bf-3d3f234f</merchantTransactionID>
        <paymentID>e44e2046-6e43-4f2a-86b2-b3759a1a430c</paymentID>
        <userID>55667788</userID>
        <paymentProvider>
            <key>150</key>
            <value>Cashflows</value>
        </paymentProvider>
        <amount currencyCode="EUR">12.45</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>a8962b3b-65b5-4107-b5a1-726c4f2815ff</id>
            <definition>
                <key>29</key>
                <value>DepositedByProvider</value>
            </definition>
            <createdOn>2018-04-18T11:40:44.967</createdOn>
            <description>Successful</description>
            <paymentStateDetails xsi:nil="true" />
        </state>
        <isExecuted>true</isExecuted>
        <baseAmount currencyCode="EUR">12.45</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>1fbd94d7-690f-471a-bea8-7fa7d4fbb74a</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>91CAADB8-99C9-4349-BB6B-62D6A367F712</paymentAccountID>
        </paymentAccount>
    </payment>
</handlePaymentStateChangedNotificationRequest>

Test Data used in the above sample request/response:

field=valueresult/output value
initiatePaymentRequest.merchantID = PG
initiatePaymentRequest.shopID = ferrari
initiatePaymentRequest.userID = 55667788
initiatePaymentRequest.paymentAccountID = 91CAADB8-99C9-4349-BB6B-62D6A367F712
initiatePaymentRequest.amount = 12.45
initiatePaymentRequest.amount.currencyCode = EUR
Step 1: PXP Financial System responds synchronously with:

initiatePaymentResponse.payment.state.definition.key = 30
initiatePaymentResponse.payment.state.definition.value = RedirectURLCreated

Step 2: Then the user is redirected to providers site to finalise the payment

Step 3: After that PXP Financial System sends a notification to the merchant:

handlePaymentStateChangedNotificationRequest.state.definition.key = 29
handlePaymentStateChangedNotificationRequest.state.definition.value = DepositedByProvider

Scenario: Successful or Unsuccessful Payment, User has enough funds in Payr account to cover the payment:

Same as above initiatePaymentRequest, with some values replaced as per Test Data table below.

Same as above initiatePaymentResponse, with some values replaced as per Test Data table below.

Same as above handlePaymentStateChangedNotificationRequest, with some values replaced as per Test Data table below.

Test Data used in the above sample request/response/notification:

field=valueresult/output value
initiatePaymentRequest.merchantID = PG
initiatePaymentRequest.shopID = ferrari
initiatePaymentRequest.userID = 55667788
initiatePaymentRequest.paymentAccountID = 91CAADB8-99C9-4349-BB6B-62D6A367F712
initiatePaymentRequest.amount = 33.01
initiatePaymentRequest.amount.currencyCode = EUR
initiatePaymentResponse.payment.state.definition.key = 29
initiatePaymentResponse.payment.state.definition.value = DepositedByProvider

The payment is finalised and moved in state DepositedByProvider

After that PXP Financial System sends a notification to the merchant:

handlePaymentStateChangedNotificationRequest.state.definition.key = 29
handlePaymentStateChangedNotificationRequest.state.definition.value = DepositedByProvider
initiatePaymentRequest.merchantID = PG
initiatePaymentRequest.shopID = ferrari
initiatePaymentRequest.userID = 55667788
initiatePaymentRequest.paymentAccountID = 91CAADB8-99C9-4349-BB6B-62D6A367F712
initiatePaymentRequest.amount = 35.01
initiatePaymentRequest.amount.currencyCode = EUR
initiatePaymentResponse.payment.state.definition.key = 100
initiatePaymentResponse.payment.state.definition.value = RefusedByProvider

After that PXP Financial System sends a notification to the merchant:

handlePaymentStateChangedNotificationRequest.state.definition.key = 100
handlePaymentStateChangedNotificationRequest.state.definition.value = RefusedByProvider

Other Scenarios

Use the below test data to simulate the following alternative scenarios:

scenariofield=valueresult/output value
Unsuccessful payment, user is redirected to Payr but payment is refusedinitiatePaymentRequest.amount = 16.01
initiatePaymentRequest.amount.currencyCode = EUR
initiatePaymentResponse.payment.state.definition.key = 100
initiatePaymentResponse.payment.state.definition.value = RefusedByProvider

handlePaymentStateChangedNotificationRequest.state.definition.key = 100
handlePaymentStateChangedNotificationRequest.state.definition.value = RefusedByProvider
Unsuccessful payment, user is redirected to Payr but aborted the process of purchasing an iCheque product or aborted the process after purchasing an iCheque productinitiatePaymentRequest.amount = 16.02 or 16.04
initiatePaymentRequest.amount.currencyCode = EUR
initiatePaymentResponse.payment.state.definition.key = 101
initiatePaymentResponse.payment.state.definition.value = AbortedByCustomer

handlePaymentStateChangedNotificationRequest.state.definition.key = 101
handlePaymentStateChangedNotificationRequest.state.definition.value = AbortedByCustomer
Unsuccessful payment, user is redirected to Payr but an error occurred during the transactioninitiatePaymentRequest.amount = 16.03
initiatePaymentRequest.amount.currencyCode = EUR
initiatePaymentResponse.payment.state.definition.key = 152
initiatePaymentResponse.payment.state.definition.value = DepositErrorReportedByProvider

handlePaymentStateChangedNotificationRequest.state.definition.key = 152
handlePaymentStateChangedNotificationRequest.state.definition.value = DepositErrorReportedByProvider

initiatePaymentResponse and handlePaymentStateChangedNotificationRequest states:

StateDescription
RedirectURLCreated (30)User is redirected to providers site to finalise the payment

Only returned in initiatePaymentResponse.
DepositedByProvider (29)The payment is finalised and moved in state DepositedByProvider
RefusedByProvider (100)Unsuccessful transaction reported by provider
DepositErrorReportedByProvider (152)Unsuccessful transaction due to redirect URL failure reported by provider
AbortedByCustomerUnsuccessful transaction due to customer cancellation

Only returned in handlePaymentStateChangedNotificationRequest.

For more information on notifications see PaymentStateChangedNotification.

List of CashFlows response codes:

https://www.cashflows.com/response-codes

State diagrams:

Diagrams below follows transaction states of Payr reloadable deposit

659 659