BankTransferRedirectDeposit (Callpay)

The BankTransferRedirectDeposit method supports EFT bank transfers through provider Callpay in South Africa.

The following method IDs are covered in this section:

IDNameCredit/Debit State
264BankTransferRedirectDepositDepositedByProvider (29)

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

Flow

Redirect Integration

Currently not supported.

Backend2BackendIntegration

The following parameters can be provided in initiatePaymentRequest.specificPaymentData:

key (value type, account type, required)value
SuccessPageUrl
(string, required)
URL to redirect for successful payments
CancelPageUrl (string, required)URL to redirect if payment is cancelled
ErrorPageUrl (string, required)URL to redirect in case of error
BankName (string, optional)Bank name for bank preselection.
Available bank names are:
absa, standard, capitec, fnb, nedbank, investec, bidvest, tyme, windhoek, afribank, oldmutual, discovery

Example initiatePaymentRequest:

<initiatePaymentRequest xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <merchantID>{{merchant}}</merchantID>
    <shopID>{{shop]]</shopID>
    <merchantTransactionID>AD-000002</merchantTransactionID>
    <paymentMethodID>264</paymentMethodID>
    <amount currencyCode="ZAR">10.00</amount>
    <userID>AD-Callpay01</userID>
    <userData>
        <username>ad_callpay01</username>
        <firstname>John</firstname>
        <lastname>Doe</lastname>
        <currencyCode>ZAR</currencyCode>
        <languageCode>EN</languageCode>
        <email>[email protected]</email>
        <address>
            <street>196 Rus St</street>
            <houseNumber>1b</houseNumber>
            <postalCode>7582</postalCode>
            <city>Kuils River</city>
            <state>WC</state>
            <countryCode2>ZA</countryCode2>
            <telephoneNumber>270839661769</telephoneNumber>
        </address>
        <dateOfBirth>1980-10-10T00:00:00</dateOfBirth>
        <gender>Male</gender>
    </userData>
    <userIP>80.121.151.158</userIP>
    <userSessionID>t02d03hwaxkrl5gmabcypwmm</userSessionID>
    <creationTypeID>1</creationTypeID>
    <specificPaymentData>
        <data xsi:type="keyStringValuePair">
            <key>SuccessPageUrl</key>
            <value>https://success.com</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>CancelPageUrl</key>
            <value>https://cancel.com</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ErrorPageUrl</key>
            <value>https://error.com</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>BankName</key>
            <value>investec</value>
        </data>
      <data xsi:type="keyIntValuePair">
        <key>PaymentProviderID</key>
        <value>206</value>
        </data>
    </specificPaymentData>
</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>{{merchant}}</merchantID>
        <shopID>{{shop}}</shopID>
        <paymentMethod>
            <key>264</key>
            <value>BankTransferRedirectDeposit</value>
        </paymentMethod>
        <merchantTransactionID>hc-20230302-132729</merchantTransactionID>
        <paymentID>ca919b62-9cd9-4850-9011-278710366a0f</paymentID>
        <userID>hc20230302132729</userID>
        <paymentProvider>
            <key>206</key>
            <value>Callpay</value>
        </paymentProvider>
        <amount currencyCode="ZAR">10.00</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>80.121.151.158</userIP>
        <state>
            <id>24813906-7206-4cb5-bbbc-fcc2cd7a18b1</id>
            <definition>
                <key>30</key>
                <value>RedirectURLCreated</value>
            </definition>
            <createdOn>2023-03-02T12:27:30.2059542Z</createdOn>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>RedirectionUrl</key>
                    <value>https://agent.callpay.com/pay/hosted?payment_key=67ea35f10351c3087744b1149c977876&amp;payment_type=eft</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>PaymentStateReasonID</key>
                    <value>1</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>false</isExecuted>
        <baseAmount currencyCode="EUR">0.76</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>BankName</key>
                <value>investec</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>324</value>
            </detail>
        </paymentDetails>
    </payment>
</initiatePaymentResponse>

📘

Error States

Relevant error cases for the merchant include:
InitiateRefusedByProvider
RefusedByProvider

The error states may be tested by using the merchant mock. Please contact the support team for getting this configured on TEST1. (Available from September 4th 2023)

Example initiatePaymentResponse with error InitiateRefusedByProvider

<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>{{merchant}}</merchantID>
        <shopID>{{shop}}</shopID>
        <paymentMethod>
            <key>264</key>
            <value>BankTransferRedirectDeposit</value>
        </paymentMethod>
        <merchantTransactionID>AD-000002</merchantTransactionID>
        <paymentID>0d4dd33f-31e8-4284-bd53-edbb774e2293</paymentID>
        <userID>AD-Callpay01</userID>
        <paymentProvider>
            <key>206</key>
            <value>Callpay</value>
        </paymentProvider>
        <amount currencyCode="ZAR">10.00</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>80.121.151.158</userIP>
        <state>
            <id>82827e77-1f74-48e6-8510-7ac4a8380510</id>
            <definition>
                <key>550</key>
                <value>InitiateRefusedByProvider</value>
            </definition>
            <createdOn>2023-03-23T09:11:58.879864Z</createdOn>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseMessage</key>
                    <value>Invalid merchant data specified. Error Url is not a valid URL.</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>PaymentStateReasonID</key>
                    <value>1</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>false</isExecuted>
        <baseAmount currencyCode="EUR">0.76</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>BankName</key>
                <value>investec</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>2331</value>
            </detail>
        </paymentDetails>
    </payment>
</initiatePaymentResponse>

Example initiatePaymentResponse with error InitiateRequestProviderCommunicationErrorOccurred:

<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>{{merchant}}</merchantID>
        <shopID>{{shop}}</shopID>
        <paymentMethod>
            <key>264</key>
            <value>BankTransferRedirectDeposit</value>
        </paymentMethod>
        <merchantTransactionID>hc-20230302-134050</merchantTransactionID>
        <paymentID>6a445fa7-c3df-4b5d-b5ec-fe3daac8ebc7</paymentID>
        <userID>hc20230302134050</userID>
        <paymentProvider>
            <key>206</key>
            <value>Callpay</value>
        </paymentProvider>
        <amount currencyCode="ZAR">10.00</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>80.121.151.158</userIP>
        <state>
            <id>0f37fca3-893f-4921-9eb6-f03b7588868d</id>
            <definition>
                <key>325</key>
                <value>InitiateRequestProviderCommunicationErrorOccurred</value>
            </definition>
            <createdOn>2023-03-02T12:41:11.0366373Z</createdOn>
            <description>Error occurred while processing payment communication for Payment[ID='45985955'].</description>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>PaymentStateReasonID</key>
                    <value>1</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>false</isExecuted>
        <baseAmount currencyCode="EUR">0.76</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>332</value>
            </detail>
        </paymentDetails>
    </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.

Example handlePaymentStateChangedNotificationRequest (DepositedByProvider) with all payment account details and PaymentAccountID value.

<?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="http://www.cqrpayments.com/PaymentProcessing" xsi:type="paymentWithPaymentAccount">
    <merchantID>B2BTestMerchant</merchantID>
    <shopID>CallpayMockShop</shopID>
    <paymentMethod>
      <key>264</key>
      <value>BankTransferRedirectDeposit</value>
    </paymentMethod>
    <merchantTransactionID>c85c4eb3-ce42-4f70-9441-6b5aa3e128ae</merchantTransactionID>
    <paymentID>c554ec06-b2d8-4edf-b58c-8fdc317748b9</paymentID>
    <userID>d407dd21-763f-47e7-bb30-ba3308</userID>
    <paymentProvider>
      <key>206</key>
      <value>Callpay</value>
    </paymentProvider>
    <amount currencyCode="ZAR">20.0100</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>b05b19a5-915c-4617-b16a-d2691f797bd1</id>
      <definition>
        <key>29</key>
        <value>DepositedByProvider</value>
      </definition>
      <createdOn>2023-08-28T21:25:02.047</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>OK</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderStatusCode</key>
          <value>complete</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">1.5100</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>12170</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>532841463</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>2952fcfd-2f81-4088-b3ee-d03ecb00d4ce</paymentAccountID>
      <details>
        <detail xsi:type="keyStringValuePair">
          <key>AccountNumber</key>
          <value>4062229999</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankName</key>
          <value>ABSA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCountryCode2</key>
          <value>ZA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountOwner</key>
          <value>Chloé Läoü</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountType</key>
          <value>current</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCode</key>
          <value>632005</value>
        </detail>
      </details>
    </paymentAccount>

📘

Account details

All account details that were returned from Callpay, will be provided on the payment account.

The account details may include AccountNumber, BankName, BankCountryCode2, AccountOwner (name), AccountType and BankCode.

The payment account will at least (theoretically) include the BankCountryCode2, but in practice more data will be present.

If an existing account will be returned, it will be selected and may be updated - AccountType will be updated, while AccountOwner and BankName will not be updated.

As a payment account might include only partial data, this needs to be consider when a bank transfer withdrawal will be initiated and the missing data has to be provided.

Example handlePaymentStateChangedNotificationRequest (DepositedByProvider) with missing account number and account type:

<?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>B2BTestMerchant</merchantID>
    <shopID>CallpayMockShop</shopID>
    <paymentMethod>
      <key>264</key>
      <value>BankTransferRedirectDeposit</value>
    </paymentMethod>
    <merchantTransactionID>53e88be9-296f-46be-863a-b929d1b2af03</merchantTransactionID>
    <paymentID>f5eac861-8fb8-41fc-8ee0-3117a9163ace</paymentID>
    <userID>c1bff6e6-9296-41ab-a3f0-299912</userID>
    <paymentProvider>
      <key>206</key>
      <value>Callpay</value>
    </paymentProvider>
    <amount currencyCode="ZAR">20.0100</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>f4967ac6-48cd-4dc0-b556-121c8c119a94</id>
      <definition>
        <key>29</key>
        <value>DepositedByProvider</value>
      </definition>
      <createdOn>2023-08-28T21:20:43.243</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>OK</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderStatusCode</key>
          <value>complete</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">1.5100</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>12167</value>
      </detail>
      <detail xsi:type="keyIntValuePair">
        <key>MerchantSettlementCurrencyID</key>
        <value>2</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>897947998</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>c6fc2d5d-945a-4422-ad05-2ab3f17e6de6</paymentAccountID>
      <details>
        <detail xsi:type="keyStringValuePair">
          <key>BankName</key>
          <value>ABSA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCountryCode2</key>
          <value>ZA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountOwner</key>
          <value>Chloé Läoü</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCode</key>
          <value>632005</value>
        </detail>
      </details>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest (DepositedByProvider) with missing account owner and account type:

<?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>B2BTestMerchant</merchantID>
    <shopID>CallpayMockShop</shopID>
    <paymentMethod>
      <key>264</key>
      <value>BankTransferRedirectDeposit</value>
    </paymentMethod>
    <merchantTransactionID>24b700f6-6a24-4bd0-85f6-8055e7c4c8f4</merchantTransactionID>
    <paymentID>52b2072c-55e9-4315-895d-e250d9445340</paymentID>
    <userID>64d140a3-39b4-4164-b8d3-9789cb</userID>
    <paymentProvider>
      <key>206</key>
      <value>Callpay</value>
    </paymentProvider>
    <amount currencyCode="ZAR">20.0100</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>0e439fd7-73cd-4412-ac30-a18333048bad</id>
      <definition>
        <key>29</key>
        <value>DepositedByProvider</value>
      </definition>
      <createdOn>2023-08-28T21:20:03.507</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>OK</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderStatusCode</key>
          <value>complete</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">1.5100</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>12166</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>285879055</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>f4ca8d40-b1cc-460a-b21d-41bb41abf6e0</paymentAccountID>
      <details>
        <detail xsi:type="keyStringValuePair">
          <key>AccountNumber</key>
          <value>4062229999</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankName</key>
          <value>ABSA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCountryCode2</key>
          <value>ZA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCode</key>
          <value>632005</value>
        </detail>
      </details>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest (DepositedByProvider) with missing bank code and account type:

<?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>B2BTestMerchant</merchantID>
    <shopID>CallpayMockShop</shopID>
    <paymentMethod>
      <key>264</key>
      <value>BankTransferRedirectDeposit</value>
    </paymentMethod>
    <merchantTransactionID>bc92b257-d7c4-49d6-aa85-bbd8d8dd0112</merchantTransactionID>
    <paymentID>aac66b83-d631-4db4-a32d-6930f0872e76</paymentID>
    <userID>2f27b283-51e2-43aa-bd70-349771</userID>
    <paymentProvider>
      <key>206</key>
      <value>Callpay</value>
    </paymentProvider>
    <amount currencyCode="ZAR">20.0100</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>822feac1-a7d6-4f65-9517-fd99040257e9</id>
      <definition>
        <key>29</key>
        <value>DepositedByProvider</value>
      </definition>
      <createdOn>2023-08-28T21:23:49.45</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>OK</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderStatusCode</key>
          <value>complete</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">1.5100</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>12169</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>640356621</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>99079aee-2a4e-4508-85d5-4957e8c74e83</paymentAccountID>
      <details>
        <detail xsi:type="keyStringValuePair">
          <key>AccountNumber</key>
          <value>4062229999</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankName</key>
          <value>ABSA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCountryCode2</key>
          <value>ZA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountOwner</key>
          <value>Chloé Läoü</value>
        </detail>
      </details>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest (DepositedByProvider) with missing bank name and account type:

<?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>B2BTestMerchant</merchantID>
    <shopID>CallpayMockShop</shopID>
    <paymentMethod>
      <key>264</key>
      <value>BankTransferRedirectDeposit</value>
    </paymentMethod>
    <merchantTransactionID>7d736f7b-d94a-4ea3-aaf8-68ea2362d2e8</merchantTransactionID>
    <paymentID>fb2e040d-6753-4b76-862c-f8cea944368d</paymentID>
    <userID>6df8e932-54dc-405e-abe8-16755f</userID>
    <paymentProvider>
      <key>206</key>
      <value>Callpay</value>
    </paymentProvider>
    <amount currencyCode="ZAR">20.0100</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>3ae4dc31-7a98-46d3-9c88-ae4473baa86c</id>
      <definition>
        <key>29</key>
        <value>DepositedByProvider</value>
      </definition>
      <createdOn>2023-08-28T21:22:50.357</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>OK</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderStatusCode</key>
          <value>complete</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">1.5100</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>12168</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>516739075</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>e7065289-7c6b-4c69-8e56-7c740b7a6838</paymentAccountID>
      <details>
        <detail xsi:type="keyStringValuePair">
          <key>AccountNumber</key>
          <value>4062229999</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCountryCode2</key>
          <value>ZA</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>AccountOwner</key>
          <value>Chloé Läoü</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>BankCode</key>
          <value>632005</value>
        </detail>
      </details>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest (RefusedByProvider):

<?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="http://www.cqrpayments.com/PaymentProcessing"
	         xsi:type="paymentWithPaymentAccount">
		<merchantID>{{merchant}}</merchantID>
        <shopID>{{shop}}</shopID>
		<paymentMethod>
			<key>264</key>
			<value>BankTransferRedirectDeposit</value>
		</paymentMethod>
		<merchantTransactionID>hc-20230302-125538</merchantTransactionID>
		<paymentID>6857fe6c-44be-4a42-8285-2628f1b9cde3</paymentID>
		<userID>hc20230302125538</userID>
		<paymentProvider>
			<key>206</key>
			<value>Callpay</value>
		</paymentProvider>
		<amount currencyCode="ZAR">10.0000</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>80.121.151.158</userIP>
		<state>
			<id>31a58ee2-4dc1-4f45-b478-d3a3ccdc9e32</id>
			<definition>
				<key>100</key>
				<value>RefusedByProvider</value>
			</definition>
			<createdOn>2023-03-02T11:56:07.407</createdOn>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseMessage</key>
					<value>Insufficient funds</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderStatusCode</key>
					<value>failed</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">0.7600</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>317</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderTransactionID</key>
				<value>91677403</value>
			</detail>
		</paymentDetails>
	</payment>
</handlePaymentStateChangedNotificationRequest>

Example handlePaymentStateChangedNotificationRequest (Aborted):

<?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="http://www.cqrpayments.com/PaymentProcessing"
	         xsi:type="paymentWithPaymentAccount">
		<merchantID>B2BTestMerchant</merchantID>
		<shopID>CallpayMockShop</shopID>
		<paymentMethod>
			<key>264</key>
			<value>BankTransferRedirectDeposit</value>
		</paymentMethod>
		<merchantTransactionID>f1029f72-68cc-43b5-bc25-fa466f4d5ba5</merchantTransactionID>
		<paymentID>4e71376f-e453-4d60-8fe6-8cd50ec08e7d</paymentID>
		<userID>d889f27e-53f5-4f5a-997e-2b854f</userID>
		<paymentProvider>
			<key>206</key>
			<value>Callpay</value>
		</paymentProvider>
		<amount currencyCode="ZAR">20.0200</amount>
		<creationType>
			<key>1</key>
			<value>User</value>
		</creationType>
		<userIP>127.0.0.1</userIP>
		<state>
			<id>5132c6c9-02fe-445c-b39f-67cea2e27844</id>
			<definition>
				<key>524</key>
				<value>Aborted</value>
			</definition>
			<createdOn>2023-03-27T15:49:30.797</createdOn>
			<paymentStateDetails>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderResponseMessage</key>
					<value>Payment Aborted</value>
				</detail>
				<detail xsi:type="keyStringValuePair">
					<key>ProviderStatusCode</key>
					<value>aborted</value>
				</detail>
				<detail xsi:type="keyIntValuePair">
					<key>PaymentStateReasonID</key>
					<value>1</value>
				</detail>
			</paymentStateDetails>
		</state>
		<isExecuted>false</isExecuted>
		<baseAmount currencyCode="EUR">1.5100</baseAmount>
		<paymentDetails>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderExternalID</key>
				<value>2568</value>
			</detail>
			<detail xsi:type="keyStringValuePair">
				<key>ProviderTransactionID</key>
				<value>424834018</value>
			</detail>
		</paymentDetails>
	</payment>
</handlePaymentStateChangedNotificationRequest>

Testing

The states InitiateRefusedByProvider, InitiateRequestProviderCommunicationErrorOccurred and InitiateErrorReportedByProvider may be tested with the merchant mock - see the instructions in the XML below.

All other states should be tested with provider.

<initiatePaymentRequest
    xmlns="http://www.cqrpayments.com/PaymentProcessing"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <merchantID>B2BTestMerchant</merchantID>
    <shopID>CallpayMockShop</shopID>
    <merchantTransactionID>OB-2023829-04</merchantTransactionID>
    <paymentMethodID>264</paymentMethodID>
    <amount currencyCode="ZAR">33.12</amount>
    <!--33.13 InitiateRefusedByProvider
        33.14 InitiateRequestProviderCommunicationErrorOccurred
        33.15 InitiateErrorReportedByProvider
        any other amount RedirectURLCreated -->
    <userID>OB-20230829-01</userID>
    <userData>
        <username>testuser</username>
        <firstname>Test</firstname>
        <lastname>User</lastname>
        <currencyCode>ZAR</currencyCode>
        <email>[email protected]</email>
        <address>
            <street>123 home street</street>
            <postalCode>123456</postalCode>
            <city>Test city</city>
            <state>Test state</state>
            <countryCode2>ZA</countryCode2>
            <telephoneNumber>0016479325666</telephoneNumber>
        </address>
        <gender>Male</gender>
    </userData>
    <userIP>80.121.151.158</userIP>
    <userSessionID>t02d03hwaxkrl5gmabcypwmm</userSessionID>
    <creationTypeID>1</creationTypeID>
    <specificPaymentData>
       <data xsi:type="keyStringValuePair">
            <key>SuccessPageUrl</key>
            <value>https://success.com</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>CancelPageUrl</key>
            <value>https://cancel.com</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>ErrorPageUrl</key>
            <value>https://error.com</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>PaymentDescription</key>
            <value>test</value>
        </data>
        <data xsi:type="keyStringValuePair">
            <key>BankName</key>
            <value>investec</value>
        </data>
    </specificPaymentData>
</initiatePaymentRequest>