CashToCode Deposit

CashToCode is a paycode based payment method. Users get a paycode on their mobile or print it. At POS they show the paycode and pay in cash. The payment is immediately confirmed and credited to their account.

The following method IDs are covered in this section:

ID

Name

Credit/Debit State

316

CashToCodeDeposit

DepositedByProvider (13)

Payment method interaction type: Redirection to External Payment Provider (see Interaction Types).

Upon the redirection to the external provider, the user is shown the paycode.

When the customer is at the POS, he may decide to pay-in more than only once. The customer can "repay" and the pay-in-process is started over again.

Payment Flow

The following diagram describe the one repay payment flow:

812812

The following diagram describes the CashToCode state machine for the initial payment:

753753

The following diagram describes the CashToCode state machine for the repay (one repay flow):

593593

Redirect Integration

Currently not supported.

Pricepoint lookup

CashToCode offers a variety of available Pricepoints to all merchants. CashtoCode only supports payments with these predefined amounts.

By default, the following pricepoints are available: 10 EUR, 25 EUR, 50 EUR, 100 EUR.
Only in Austria: 200 EUR, 300 EUR, 400 EUR, 500 EUR.
In UK: min: 20 GBP, max 250 GBP. Pricepoints e.g. 20, 50, 100 and 250.

A merchant may request a list of the currently configured pricepoints that are available. The list of the supported predefined amounts along with the countries and shops where these are available can be requested any time by calling getPaymentInputDataList API method.

The following parameters have to be provided in the getPaymentInputDataListRequest.details xml section:

key (value type, account type, required)

value

BrandName (string, required)

The merchant´s brand name.

CountryCode2 (string)

The country code. Can be used for filtering the predefined amounts based on the country it is supported in.

The following data is returned in the getPaymentInputDataListResponse:

ID

The unique identifier of the predefined amount.

DisplayName

The displayable string usually containing amount and currency sign. Can be displayed to the end-user.

Amount

The amount.

CurrencyCode

The currency code.

Partners

The comma-separated list of shops where the predefined amount can be paid in.

Countries

The comma-separated list of countries where the predefined amount is supported.

Version

The version.

Example getPaymentInputDataListRequest:

<getPaymentInputDataListRequest xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <merchantID>KalixaAcceptDEMO</merchantID>
  <shopID>KalixaAcceptDEMO</shopID>
  <user>
    <id>7d46ad35-923a-4ba2-946e-64f65b</id>
  </user>
  <paymentMethodID>316</paymentMethodID>
  <details>
    <data xsi:type="keyStringValuePair">
      <key>BrandName</key>
      <value>kalixa</value>
    </data>
    <data xsi:type="keyStringValuePair">
      <key>CountryCode2</key>
      <value>DE</value>
    </data>
  </details>
</getPaymentInputDataListRequest>

Example getPaymentInputDataListResponse:

<getPaymentInputDataListResponse 
    xmlns="http://www.cqrpayments.com/PaymentProcessing" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <paymentInputDataList>
        <paymentInputData>
            <data xsi:type="keyStringValuePair">
                <key>ID</key>
                <value>12909aa3-22c7-4a13-9bb8-26a47cb1478c</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>DisplayName</key>
                <value>25 €</value>
            </data>
           <data xsi:type="keyStringValuePair">
                <key>Amount</key>
                <value>25</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>CurrencyCode</key>
                <value>EUR</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>Partners</key>
                <value>Bitcard IT, Epay IT, Lekkerland AT, Lekkerland DE, LoadAG AT</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>Countries</key>
                <value>AT, DE, IT</value>
            </data>
        </paymentInputData>
        <paymentInputData>
            <data xsi:type="keyStringValuePair">
                <key>ID</key>
                <value>a1774ff8-c5f6-4c37-8641-f5d99b95a0e6</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>DisplayName</key>
                <value>100 €</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>Amount</key>
                <value>100</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>CurrencyCode</key>
                <value>EUR</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>Partners</key>
                <value>Bitcard IT, Epay IT, Lekkerland AT, Lekkerland DE, LoadAG AT</value>
            </data>
            <data xsi:type="keyStringValuePair">
                <key>Countries</key>
                <value>AT, DE, IT</value>
            </data>
        </paymentInputData>
    </paymentInputDataList>
</getPaymentInputDataListResponse>

Backend2BackendIntegration

Sending data of the user is essential for this payment method as the data is sent to provider. The following parameters have to be provided in the initiatePaymentRequest.userData xml section:

key (value type, account type, required)

value

UserFirstname (string, required)

The user´s first name

UserLastname (string, required)

The user´s last name

CountryCode2 (string, required)

The user´s country code

DateOfBirth

The user´s date of birth.

The following parameters can be provided in initiatePaymentRequest.specificPaymentData:

key (value type, account type, required)

value

BrandName (string, required)

Differentiation of the brand.
If the brandName is not sent, it can be set by PXP on a per-merchant base only.

SuccessPageUrl (string, required)

URL, to which the user is being redirected to, after pressing the "Finish" button on the Paycode page. This is an optional step for the customer.

CancelPageUrl (string, required)

URL, to which the user is being redirected to if he cancels the payment. Be aware that this does NOT mean that the payment will not be made. It is possible that the customer cancel which the payment has been completed and an asynchronous notification is received seconds later.

Repay (Boolean)

Indicates if a repay is allowed or not. False by default. This parameter is optional.

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>3ee57fd2-5eaf-48b8-82ab-e7bb378d8199</merchantTransactionID>
       <paymentMethodID>316</paymentMethodID>
       <amount currencyCode="EUR">10</amount>
       <userID>0bb4eaab-4c02-4b1d-bfa6-1183e6</userID>
       <userData>
             <username>b745be49-360e-4a8b-a0c3-bced6c</username>
             <firstname>Chloé</firstname>
             <lastname>Täöü</lastname>
             <address>
                    <countryCode2>DE</countryCode2>
             </address>
       </userData>
       <userIP>127.0.0.1</userIP>
       <userSessionID>54b4576d-1ea3-4c69-b6d4-048c61886d97</userSessionID>
       <creationTypeID>1</creationTypeID>
       <specificPaymentData>
             <data xsi:type="keyStringValuePair">
                    <key>SuccessPageUrl</key>
                    <value>https://kalixa.api-test.cashtocode.com/</value>
             </data>
             <data xsi:type="keyStringValuePair">
                    <key>CancelPageUrl</key>
                    <value>https://kalixa.api-test.cashtocode.com/</value>
             </data>
             <data xsi:type="keyStringValuePair">
                    <key>BrandName</key>
                    <value>kalixa</value>
             </data>
             <data xsi:type="keyBooleanValuePair">
                    <key>Repay</key>
                    <value>true</value>
             </data>
       </specificPaymentData>
</initiatePaymentRequest>

Example initiatePaymentResponse:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
       <payment xsi:type="paymentWithPaymentAccount">
             <merchantID>KalixaAcceptDemo</merchantID>
             <shopID>KalixaAcceptDemo</shopID>
             <paymentMethod>
                    <key>316</key>
                    <value>CashtoCodeDeposit</value>
             </paymentMethod>
             <merchantTransactionID>7d4f68c7-fb85-49e9-85f6-9c154dddd63c</merchantTransactionID>
             <paymentID>591a8200-1f00-4d1c-9587-2cc958460731</paymentID>
             <userID>0bb4eaab-4c02-4b1d-bfa6-1183e6</userID>
             <paymentProvider>
                    <key>173</key>
                    <value>CashtoCode</value>
             </paymentProvider>
             <amount currencyCode="EUR">10</amount>
             <creationType>
                    <key>1</key>
                    <value>User</value>
             </creationType>
             <userIP>127.0.0.1</userIP>
             <state>
                    <id>2a04d0a9-46af-4313-8bc8-6fb3ef9f0ac4</id>
                    <definition>
                           <key>30</key>
                           <value>RedirectURLCreated</value>
                    </definition>
                    <createdOn>2018-12-11T12:58:45.5076253Z</createdOn>
                    <description>https://kalixa.wcl-test.cashtocode.com?token=MjEzYzBhODAtNDkxNS00NDk4LTg2YjgtNjNjZjhkYTI2YmE4</description>
                    <paymentStateDetails>
                           <detail xsi:type="keyStringValuePair">
                                  <key>RedirectionUrl</key>
                                  <value>https://kalixa.wcl-test.cashtocode.com?token=MjEzYzBhODAtNDkxNS00NDk4LTg2YjgtNjNjZjhkYTI2YmE4</value>
                           </detail>
                           <detail xsi:type="keyStringValuePair">
                                  <key>PaymentStateReasonID</key>
                                  <value>1</value>
                           </detail>
                    </paymentStateDetails>
             </state>
             <isExecuted>false</isExecuted>
             <baseAmount currencyCode="EUR">10</baseAmount>
             <paymentDetails>
                    <detail xsi:type="keyStringValuePair">
                           <key>ProviderTransactionID</key>
                           <value />
                    </detail>
                    <detail xsi:type="keyStringValuePair">
                           <key>ProviderExternalID</key>
                           <value>591a8200-1f00-4d1c-9587-2cc958460731</value>
                    </detail>
             </paymentDetails>
             <paymentAccount>
                    <paymentAccountID>0</paymentAccountID>
             </paymentAccount>
       </payment>
</initiatePaymentResponse>

Notifications

The standard notification mechanism is used for notifying the merchant in the background (asynchronously) about payment state changes. For more information see PaymentStateChangedNotification.

Later the provider notifies PXP Financial on payments that are successful (state DepositedByProvider), or have expired (state Expired).

For repay payment the payment service sends a notification with the MerchantTransactionID from the initial payment, but with a different (unique) paymentID.

DepositedByProvider

Success state

Expired

Expired payment

Example handlePaymentStateChangedNotificationRequest for successful payments:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <payment xmlns:q1="http://www.cqrpayments.com/PaymentProcessing" xsi:type="paymentWithPaymentAccount">
    <merchantID>KalixaAcceptDEMO</merchantID>
    <shopID>KalixaAcceptDEMO</shopID>
    <paymentMethod>
      <key>316</key>
      <value>CashtoCodeDeposit</value>
    </paymentMethod>
    <merchantTransactionID>cashtocodedeposit00001</merchantTransactionID>
    <paymentID>af22b173-af90-43ea-b6c5-fc8b3738bc12</paymentID>
    <userID>7d46ad35-923a-4ba2-946e-64f65b</userID>
    <paymentProvider>
      <key>173</key>
      <value>CashtoCode</value>
    </paymentProvider>
    <amount currencyCode="EUR">10.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>0bca09d7-4ade-44e7-bbb7-199b308294d2</id>
      <definition>
        <key>29</key>
        <value>DepositedByProvider</value>
      </definition>
      <createdOn>2018-11-15T17:46:32.957</createdOn>
      <description />
      <paymentStateDetails>
        <detail xsi:type="keyIntValuePair">
          <key>PaymentStateReasonID</key>
          <value>1</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>false</isExecuted>
    <baseAmount currencyCode="EUR">10.0000</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>af22b173-af90-43ea-b6c5-fc8b3738bc12</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>7de21e13-b699-4529-bdb5-d3e81cab5063</value>
      </detail>
    </paymentDetails>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest for expired payments:

<?xml version="1.0" encoding="utf-16"?>
<handlePaymentStateChangedNotificationRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <payment xmlns:q1="http://www.cqrpayments.com/PaymentProcessing" xsi:type="paymentWithPaymentAccount">
    <merchantID>KalixaAcceptDEMO</merchantID>
    <shopID>KalixaAcceptDEMO</shopID>
    <paymentMethod>
      <key>316</key>
      <value>CashtoCodeDeposit</value>
    </paymentMethod>
    <merchantTransactionID>cashtocodedeposit00001</merchantTransactionID>
    <paymentID>af22b173-af90-43ea-b6c5-fc8b3738bc12</paymentID>
    <userID>7d46ad35-923a-4ba2-946e-64f65b</userID>
    <paymentProvider>
      <key>173</key>
      <value>CashtoCode</value>
    </paymentProvider>
    <amount currencyCode="EUR">10.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>86a95b67-2f00-4021-97f1-d12afeefd5f0</id>
      <definition>
        <key>102</key>
        <value>Expired</value>
      </definition>
      <createdOn>2018-11-16T09:44:54.243</createdOn>
      <description />
      <paymentStateDetails>
        <detail xsi:type="keyIntValuePair">
          <key>PaymentStateReasonID</key>
          <value>1</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>false</isExecuted>
    <baseAmount currencyCode="EUR">10.0000</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>af22b173-af90-43ea-b6c5-fc8b3738bc12</value>
      </detail>
    </paymentDetails>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Error codes

When an error occurs, the payment is moved to state AddStateHere - errors logged in the payments stated additional details in field 'ProviderErrorCode' and 'Provider Error Message'.