PinBank Bank Transfer Withdrawal

Provider PinBank offers bank transfer withdrawal for customers in Brazil.

The following method IDs are covered in this section:

IDNameCredit/Debit State
24BankTransferWithdrawalWithdrawnByProvider

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

Flow Diagram

744744

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
BankCountryCode2 (string, required)Country code, only one supported is BR
BankCode (string, required)Bank code. See below for list of possible values.
BranchCode (string, required)Bank branch code
AccountNumber (string, required)Bank account number
AccountNumberCheckValue (string, required)Bank account number check value
AccountType (string)Account type value (see below)
AccountOwner (string)Account owner name

📘

Account Types for Brazil

The AccountType value is mandatory. The following values apply:

"Corrente" - Current/Checking Account
"Poupanca" - Savings Account

Bank Codes:

Bank    Code
BANCO ABN AMRO S.A. 075
Cooperativa Central de Crédito Urbano-CECRED    085
BANCO DA AMAZONIA S.A.  003
BANCO DO NORDESTE DO BRASIL S.A.    004
BANCO BONSUCESSO S.A.   218
BANCO BRADESCO S.A. 237
BANCO DO BRASIL S.A.    001
BANCO DE BRASILIA S.A. - BRB    070
CAIXA ECONOMICA FEDERAL - CEF   104
CITIBANK N.A.   477
BANCO COOPERATIVO DO BRASIL S/A - BANCOOB   756
BANCO DAYCOVAL S.A. 707
BANESTES S.A. BANCO DO ESTADO DO ESPIRITO SANTO 021
BANCO DO ESTADO DO PARA S.A. - BANPARA  037
BANCO DO ESTADO DO RIO GRANDE DO SUL S.A. - BANRISUL    041
BANCO DO ESTADO DE SERGIPE S.A. - BANESE    047
HSBC BANK BRASIL S.A. - BANCO MULTIPLO  399
ITAU UNIBANCO S.A.  341
BANCO MERCANTIL DO BRASIL S.A.  389
BANCO MODAL S.A.    746
BANCO SAFRA S.A.    422
BANCO SANTANDER BRASIL S.A. 033
BANCO COOPERATIVO SICREDI S.A.  748
BANCO INTER 077
BANCO SOFISA    637
BANCO NEON  735
NU PAGAMENTOS   260
Cooperativa Central de Crédito Urbano-CECRED    085
BANCO AGIPLAN S.A.  121
Confederação Nacional das Cooperativas Centrais Unicred 136
BANCO ORIGINAL  212
Banco Votorantim S.A.   655
BANCO CITIBANK  745
PagSeguro Internet S.A. 290
BANCO BMG S.A   318
BANCO C6 S.A.   336

The following parameters can be provided in initiatePaymentRequest.specificPaymentData:

key (value type, account type, required)value
PaymentProviderID
(Int)
Provider ID - should be 186

The following parameters have to passed in initiatePaymentRequest.UserData:

key (value type, account type, required)value
identificationNumber (string, required)Identification Number (CPF) of the recipient

Example initiatePaymentRequest:

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cqrpayments.com/PaymentProcessing">
  <merchantID>YourMerchantID</merchantID>
  <shopID>YourShopID</shopID>
  <merchantTransactionID>w3ga2sg2-44-4-2f2-rg1</merchantTransactionID>
  <paymentMethodID>24</paymentMethodID>
  <amount currencyCode="BRL">15.00</amount>
  <userID>c3ba0665-68ef-4daf-a3e6-8e70a1</userID>
  <userData>
    <identificationNumber>12345678909</identificationNumber>
  </userData>
  <userIP>127.0.0.1</userIP>
  <userSessionID>8da7fe3c-da36-45c0-b107-ff9f91d71db6</userSessionID>
  <creationTypeID>1</creationTypeID>
  <specificPaymentData>
   <data xsi:type="keyIntValuePair">
      <key>PaymentProviderID</key>
      <value>186</value>
    </data>
  </specificPaymentData>
  <paymentAccount> 
        <specificPaymentAccountData> 
            <data xsi:type="keyStringValuePair"> 
                <key>BankCountryCode2</key> 
                <value>BR</value> 
            </data> 
            <data xsi:type="keyStringValuePair"> 
                <key>BankCode</key> 
                <value>001</value> 
            </data> 
             <data xsi:type="keyStringValuePair"> 
                <key>BranchCode</key> 
                <value>12345</value> 
            </data> 
            <data xsi:type="keyStringValuePair"> 
                <key>AccountNumber</key> 
                <value>59899473334</value> 
            </data> 
            <data xsi:type="keyStringValuePair"> 
                <key>AccountNumberCheckValue</key> 
                <value>1</value> 
            </data>
            <data xsi:type="keyStringValuePair"> 
                <key>AccountType</key> 
                <value>Corrente</value> 
            </data>
             <data xsi:type="keyStringValuePair"> 
                <key>AccountOwner</key> 
                <value>Otto Flick</value> 
            </data>  
        </specificPaymentAccountData> 
    </paymentAccount> 
</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>YourMerchantID</merchantID>
        <shopID>YourShopID</shopID>
        <paymentMethod>
            <key>24</key>
            <value>BankTransferWithdrawal</value>
        </paymentMethod>
        <merchantTransactionID>w3ga2sg2-44-4-2f2-rg1</merchantTransactionID>
        <paymentID>917fecb8-5674-4f74-ad2d-0c81ab37e179</paymentID>
        <userID>c3ba0665-68ef-4daf-a3e6-8e70a1</userID>
        <paymentProvider>
            <key>186</key>
            <value>PINbank</value>
        </paymentProvider>
        <amount currencyCode="BRL">15.00</amount>
        <creationType>
            <key>1</key>
            <value>User</value>
        </creationType>
        <userIP>127.0.0.1</userIP>
        <state>
            <id>02bfc8c5-b9a4-4469-a334-71a498134873</id>
            <definition>
                <key>3</key>
                <value>InitiatedByProvider</value>
            </definition>
            <createdOn>2020-07-22T08:08:40.9604091Z</createdOn>
            <description>Sucesso.</description>
            <paymentStateDetails>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseCode</key>
                    <value>0</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>ProviderResponseMessage</key>
                    <value>Sucesso.</value>
                </detail>
                <detail xsi:type="keyStringValuePair">
                    <key>PaymentStateReasonID</key>
                    <value>1</value>
                </detail>
            </paymentStateDetails>
        </state>
        <isExecuted>false</isExecuted>
        <baseAmount currencyCode="EUR">3.98</baseAmount>
        <paymentDetails>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderTransactionID</key>
                <value>TD000198469</value>
            </detail>
            <detail xsi:type="keyStringValuePair">
                <key>ProviderExternalID</key>
                <value>1764613</value>
            </detail>
        </paymentDetails>
        <paymentAccount>
            <paymentAccountID>aed6fa0e-1310-4dc3-8a95-ba24121833f9</paymentAccountID>
        </paymentAccount>
    </payment>
</initiatePaymentResponse>

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

Payment StatesDescription
InitiatedByProviderIntermediate state denoting a successful payment submission at provider
WithdrawErrorReportedByProviderError state due to failed payment submission at provider; errors are logged in the PaymentStateAdditionalDetails fields ProviderResponseCode and ProviderResponseMessage
WithdrawCommunicationErrorOccurredError state for a failed communication with the provider or unexpected result received

Submitted payments are sent by PinBank to the Brazilian Central Bank.PXP Financial regularly queries the PinBank system for the status of the payment and update the payment state on PXP Financial side.

A PinBank BankTransferWithdrawal has been successfully initiated and has reached the InitiatedByProvider status it can go to any of the following states:

Payment StatesDescription
PendingOnProviderA withdrawal payment has been sent to provider but not yet processed and it still can be rejected
WithdrawnByProviderSuccess state
CancelledUnsuccessful state due to failed processing of payment; errors are logged in the PaymentStateAdditionalDetails fields ProviderResponseCode and ProviderResponseMessage
QueryPaymentStateErrorReportedByProviderOn regular intervals the state of the payment is being queried against provider. When an error is reported by the provider, it is logged in the PaymentStateAdditionalDetails fields ProviderResponseCode and ProviderResponseMessage
QueryPaymentStateCommunicationErrorOccurredOn regular intervals the state of the payment is being queried against provider. When no response is received by the provider or the response is not expected,

List of response codes from the provider

ProviderResponseCodeMeaning
0Success.
1EmptyCodigoCliente
2EmptyCodigoCanal
3EmptyCpfCnpj
4InvalidCpfCnpj
5EmptyToken
6EmptyCodigoBanco
7EmptyAgencia
8DigitoAgenciaIsRequiredForSelectedBank
9InvalidDigitoAgencia
10EmptyContaCorrente
11EmptyDigitoContaCorrente
12InvalidDigitoContaCorrente
13EmptyTipoConta
14EmptyTipoPessoa
15EmptyNomeFavorecido
16EmptyCpfCnpjFavorecido
17InvalidCpfCnpjFavorecido
18InvalidCpfCnpjFavorecidoForTipoPessoa
19EmptyValor
20EmptyDataAgendamento
21InvalidDataAgendamento
22AccountNotFound
23AccountNotActive
24ChannelNotParametrizedForAccount
25AccountDocumentationNotApproved
26ErrorProcessingTransaction
27InvalidToken
28CustomerNotFound
29InsufficientFundsForTransaction
30TransactionNotApproved
31InvalidSearchParameters
32BlockedUser
33UserNotFound
34EmptyNossoNumero
35DocTedNotFound

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:

<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>YourMerchantID</merchantID>
    <shopID>YourShopID</shopID>
    <paymentMethod>
      <key>24</key>
      <value>BankTransferWithdrawal</value>
    </paymentMethod>
    <merchantTransactionID>17593196-f44f-4b1e-92e8-474d8e88710d</merchantTransactionID>
    <paymentID>c2c83321-1466-4af7-bde3-d84418f9b991</paymentID>
    <userID>12b140b5-35ee-4a83-9f87-9d4405</userID>
    <paymentProvider>
      <key>186/key>
      <value>PinBank</value>
    </paymentProvider>
    <amount currencyCode="BRL">10.0000</amount>
    <creationType>
      <key>1</key>
      <value>User</value>
    </creationType>
    <userIP>127.0.0.1</userIP>
    <state>
      <id>6ca51370-bac8-42da-8121-1627a34289cd</id>
      <definition>
        <key>20</key>
        <value>WithdrawnByProvider</value>
      </definition>
      <createdOn>2017-09-08T09:58:29.783</createdOn>
      <paymentStateDetails>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseCode</key>
          <value>0</value>
        </detail>
        <detail xsi:type="keyStringValuePair">
          <key>ProviderResponseMessage</key>
          <value>Successo.</value>
        </detail>
      </paymentStateDetails>
    </state>
    <isExecuted>true</isExecuted>
    <baseAmount currencyCode="EUR">2.6500</baseAmount>
    <paymentDetails>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderExternalID</key>
        <value>1764613</value>
      </detail>
      <detail xsi:type="keyStringValuePair">
        <key>ProviderTransactionID</key>
        <value>TD000198469</value>
      </detail>
    </paymentDetails>
    <paymentAccount>
      <paymentAccountID>d52b9f0e-55b3-4011-a5e7-3935c6388958</paymentAccountID>
    </paymentAccount>
  </payment>
</handlePaymentStateChangedNotificationRequest>