Bank Transfer Withdrawal (via Trustly)

Provider Trustly offers bank transfer withdrawal for various countries in Europe.

The following method IDs are covered in this section:

IDNameCredit/Debit StateReversal State
24BankTransferWithdrawalWithdrawnByProvider

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

Redirect Integration

Currently not supported.

Backend2BackendIntegration

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

key (value type, account type, required)value
CurrencyCode
(string)
EUR
BankCountryCode2 (string)SE
AccountNumber (string)Bank account number
BankCode (string)BankCode
IBAN (string)IBAN

Necessary data:
For the following countries please provide an IBAN (with BIC being optional):

📘

specificPaymentAccountData

  • Country with only IBAN listed below:
    Send BankCountryCode2 and IBAN fields

  • Country for which BankCode and Account number is listed:
    Send BankCountryCode2, BankCode and AccountNumber fields

CountryBank CodeIBAN / Account number
Austria^AT[0-9]{18}$
Belgium ^BE[0-9]{14}$
Bulgaria ^BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}$
Croatia ^HR[0-9]{2}[0-9]{7}[0-9]{10}$
Cyprus ^CY[0-9]{10}[0-9A-Z]{16}$
Czech Republic ^[0-9]{4}$^[0-9]{16}$
Denmark ^[0-9]{4}$^[0-9]{4,10}$
Estonia ^[0-9]{2}$^[0-9]{4,14}$
Finland ^FI[0-9]{16}$
France ^FR[0-9]{12}[0-9A-Z]{11}[0-9]{2}$
Germany ^DE[0-9]{20}$
Greece ^GR[0-9]{25}$
Hungary ^[0-9]{8}$^[0-9]{24}$
Ireland ^IE[0-9]{2}[A-Z]{4}[0-9]{14}$
Italy ^IT[0-9]{2}[A-Z][0-9]{10}[0-9A-Z]{12}$
Latvia ^LV[0-9]{2}[A-Z]{4}[0-9A-Z]{13}$
Lithuania ^LT[0-9]{18}$
Luxembourg ^LU[0-9]{18}$
Malta ^MT[0-9]{2}[A-Z]{4}[0-9]{5}[0-9A-Z]{18}$
Netherlands ^NL[0-9]{2}[A-Z]{4}[0-9]{10}$
Norway ^[0-9]{4}$^[0-9]{7}$
Poland ^PL[0-9]{26}$
Portugal ^[0-9]{8}$^[0-9]{13}$
Romania ^RO[0-9]{2}[A-Z]{4}[0-9A-Z]{16}$
Slovakia ^SK[0-9]{22}$
Slovenia ^SI56[0-9]{15}$
Spain ^ES[0-9]{22}$
Sweden ^[0-9]{4,5}$^[0-9]{1,15}$
United Kingdom ^[0-9]{6}$^[0-9]{8}$

The following parameters can be provided in initiatePaymentRequest.specificPaymentData:

key (value type, account type, required)value
UserFirstname
(string)
Beneficiary`s first name
UserLastname (string)Beneficiary´s last name
UserCountryCode2 (string)Country code

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>B2BTestMerchant</merchantID>
       <shopID>TrustlyBankTransferWithdrawalShop</shopID>
       <merchantTransactionID>e6673f4c-f550-425e-8399-edc46ec1ba77</merchantTransactionID>
       <paymentMethodID>24</paymentMethodID>
       <amount currencyCode="EUR">10</amount>
       <userID>552b14e0-cd15-4a38-be91-d7e74b</userID>
       <userData>
              <username>6d4abd2a-f8a0-4459-ab2f-d111cb72ea5b</username>
              <firstname>Patrick</firstname>
              <lastname>Fitzgerald</lastname>
              <address>
                     <street>Street</street>
                     <houseNumber>1</houseNumber>
                     <postalCode>12345</postalCode>
                     <city>Barcelona</city>
                     <countryCode2>SE</countryCode2>
                     </address>
              <dateOfBirth>1990-01-20T00:00:00</dateOfBirth>
              </userData>
       <userIP>127.0.0.1</userIP>
       <userSessionID>ad48e073-b14c-47c2-a43d-d3b53b8a21a8</userSessionID>
       <creationTypeID>1</creationTypeID>
       <specificPaymentData>
              <data xsi:type="keyStringValuePair">
                     <key>UserFirstname</key>
                     <value>Patrick</value>
              </data>
              <data xsi:type="keyStringValuePair">
                     <key>UserLastname</key>
                     <value>Fitzgerald</value>
              </data>
              <data xsi:type="keyStringValuePair">
                     <key>UserCountryCode2</key>
                     <value>SE</value>
              </data>
       </specificPaymentData>
       <paymentAccount>
              <specificPaymentAccountData>
                     <data xsi:type="keyStringValuePair">
                           <key>CurrencyCode</key>
                           <value>EUR</value>
                     </data>
                     <data xsi:type="keyStringValuePair">
                           <key>BankCountryCode2</key>
                           <value>SE</value>
                     </data>
                     <data xsi:type="keyStringValuePair">
                           <key>BankCode</key>
                           <value>83279</value>
                     </data>
                     <data xsi:type="keyStringValuePair">
                           <key>AccountNumber</key>
                           <value>9048832662</value>
                     </data>
             </specificPaymentAccountData>
       </paymentAccount>
</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>B2BTestMerchant</merchantID>
              <shopID>TrustlyBankTransferWithdrawalShop</shopID>
              <paymentMethod>
                     <key>24</key>
                     <value>BankTransferWithdrawal</value>
              </paymentMethod>
              <merchantTransactionID>e6673f4c-f550-425e-8399-edc46ec1ba77</merchantTransactionID>
              <paymentID>baf68a49-5f20-464d-9f91-8750b0b48e72</paymentID>
              <userID>552b14e0-cd15-4a38-be91-d7e74b</userID>
              <paymentProvider>
                     <key>114</key>
                     <value>Trustly</value>
              </paymentProvider>
              <amount currencyCode="EUR">10</amount>
              <creationType>
                     <key>1</key>
                     <value>User</value>
              </creationType>
              <userIP>127.0.0.1</userIP>
              <state>
                     <id>b5902473-1d55-42d7-bb3e-3e409651d19d</id>
                     <definition>
                           <key>20</key>
                           <value>WithdrawnByProvider</value>
                     </definition>
                     <createdOn>2017-07-14T13:16:03.5391617Z</createdOn>
                     <description>result=1</description>
                     <paymentStateDetails>
                           <detail xsi:type="keyStringValuePair">
                                  <key>ProviderReturnCode</key>
                                  <value>1</value>
                           </detail>
                     </paymentStateDetails>
              </state>
              <isExecuted>true</isExecuted>
              <baseAmount currencyCode="EUR">10</baseAmount>
              <paymentDetails>
                     <detail xsi:type="keyStringValuePair">
                           <key>UserFirstname</key>
                           <value>Patrick</value>
                     </detail>
                     <detail xsi:type="keyStringValuePair">
                           <key>UserLastname</key>
                           <value>Fitzgerald</value>
                     </detail>
                     <detail xsi:type="keyStringValuePair">
                           <key>ProviderExternalID</key>
                           <value>70571</value>
                     </detail>
                     <detail xsi:type="keyStringValuePair">
                           <key>ProviderTransactionID</key>
                           <value>2422610363BDD</value>
                     </detail>
              </paymentDetails>
              <paymentAccount>
                     <paymentAccountID>7d431c69-101b-41e4-a53c-df67e296aaf7</paymentAccountID>
                     <details>
                           <detail xsi:type="keyStringValuePair">
                                  <key>TrustlyPaymentAccountToken</key>
                                  <value>3bfb7131-2431-438c-8bca-39a73753cd7d</value>
                           </detail>
                     </details>
              </paymentAccount>
       </payment>
</initiatePaymentResponse>

The payment can reach one of the following states in the initiatePaymentResponse:

Payment StatesDescription
WithdrawnByProviderSuccess state
InitiatePaymentAccountTokenErrorReportedByProviderError state due to failed payment account registration at provider; errors are logged in the PaymentStateAdditionalDetails fields ProviderErrorCode and ProviderErrorMessage
RefusedByProviderError state; errors are logged in the PaymentStateAdditionalDetails field ProviderReturnCode

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:

<?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" xmlns="http://www.cqrpayments.com/PaymentProcessing">
       <payment xsi:type="paymentWithPaymentAccount">
              <merchantID>B2BTestMerchant</merchantID>
              <shopID>TrustlyBankTransferWithdrawalShop</shopID>
              <paymentMethod>
                     <key>24</key>
                     <value>BankTransferWithdrawal</value>
              </paymentMethod>
              <merchantTransactionID>e6673f4c-f550-425e-8399-edc46ec1ba77</merchantTransactionID>
              <paymentID>baf68a49-5f20-464d-9f91-8750b0b48e72</paymentID>
              <userID>552b14e0-cd15-4a38-be91-d7e74b</userID>
              <paymentProvider>
                     <key>114</key>
                     <value>Trustly</value>
              </paymentProvider>
              <amount currencyCode="EUR">10.0000</amount>
              <creationType>
                     <key>1</key>
                     <value>User</value>
              </creationType>
              <userIP>127.0.0.1</userIP>
              <state>
                     <id>b5902473-1d55-42d7-bb3e-3e409651d19d</id>
                     <definition>
                           <key>20</key>
                           <value>WithdrawnByProvider</value>
                     </definition>
                     <createdOn>2017-07-14T13:16:03.54</createdOn>
                     <paymentStateDetails>
                           <detail xsi:type="keyStringValuePair">
                                  <key>ProviderReturnCode</key>
                                  <value>1</value>
                           </detail>
                     </paymentStateDetails>
              </state>
              <isExecuted>true</isExecuted>
              <baseAmount currencyCode="EUR">10.0000</baseAmount>
              <paymentDetails>
                     <detail xsi:type="keyStringValuePair">
                           <key>ProviderExternalID</key>
                           <value>70571</value>
                     </detail>
                     <detail xsi:type="keyStringValuePair">
                           <key>UserFirstname</key>
                           <value>Patrick</value>
                     </detail>
                     <detail xsi:type="keyStringValuePair">
                           <key>UserLastname</key>
                           <value>Fitzgerald</value>
                     </detail>
                     <detail xsi:type="keyStringValuePair">
                           <key>ProviderTransactionID</key>
                           <value>2422610363BDD</value>
                     </detail>
              </paymentDetails>
              <paymentAccount>
                     <paymentAccountID>7d431c69-101b-41e4-a53c-df67e296aaf7</paymentAccountID>
                     <details>
                           <detail xsi:type="keyStringValuePair">
                                  <key>TrustlyPaymentAccountToken</key>
                                  <value>3bfb7131-2431-438c-8bca-39a73753cd7d</value>
                           </detail>
                     </details>
              </paymentAccount>
       </payment>
</handlePaymentStateChangedNotificationRequest>