Bank Authentication

Merchants can learn how to use Coinflow's UI for authentication and redirect withdrawers upon successful bank auth.

Implementation

  1. Generate a Session Key

    Generate a sessionKey for the user. Session keys are valid for 30 minutes and must be refreshed.
  2. Embed the Bank Authentication Flow in an Iframe

    Use the following URL format inside an iframe, replacing the YOUR_MERCHANT_ID,sessionKey and bankAccountLinkRedirect parameters with your own values:
    Example
    https://sandbox.coinflow.cash/solana/withdraw/YOUR_MERCHANT_ID?sessionKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY2hpcG53aW5fdXNlcl8xIiwibWVyY2hhbnRJZCI6InRlc3R0ZXN0IiwiaWF0IjoxNzMxOTY3MTA1LCJleHAiOjE3MzIwNTM1MDV9.q25hymKUAxalqI0mgIQg8AQ7Q_8X5gGzOX60BBNrtW4&bankAccountLinkRedirect=https%3A%2F%2Fwww.google.com
  3. Change the Base URL on Production

    On production, change the base URL to: https://coinflow.cash/

Note: the iframe emits a message with the method field of accountLinked in case you have the iframe embedded in a modal, you can use this message to close the modal. See this recipe to learn how to listen to the accountLinked message.



Demo


Show only some account types

To only show the option to connect a bank or connect a card, you can use the url parameter allowedWithdrawSpeeds. See the example below to allow card and bank connections:

https://sandbox.coinflow.cash/solana/withdraw/YOUR_MERCHANT_ID?sessionKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY2hpcG53aW5fdXNlcl8xIiwibWVyY2hhbnRJZCI6InRlc3R0ZXN0IiwiaWF0IjoxNzMxOTY3MTA1LCJleHAiOjE3MzIwNTM1MDV9.q25hymKUAxalqI0mgIQg8AQ7Q_8X5gGzOX60BBNrtW4&bankAccountLinkRedirect=https%3A%2F%2Fwww.google.com&allowedWithdrawSpeeds=standard%2Csame_day%2Ccard

To only allow card account connections &allowedWithdrawSpeeds=card:

https://sandbox.coinflow.cash/solana/withdraw/YOUR_MERCHANT_ID?sessionKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY2hpcG53aW5fdXNlcl8xIiwibWVyY2hhbnRJZCI6InRlc3R0ZXN0IiwiaWF0IjoxNzMxOTY3MTA1LCJleHAiOjE3MzIwNTM1MDV9.q25hymKUAxalqI0mgIQg8AQ7Q_8X5gGzOX60BBNrtW4&bankAccountLinkRedirect=https%3A%2F%2Fwww.google.com&allowedWithdrawSpeeds=card

To only allow bank connections &allowedWithdrawSpeeds=standard:

https://sandbox.coinflow.cash/solana/withdraw/YOUR_MERCHANT_ID?sessionKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY2hpcG53aW5fdXNlcl8xIiwibWVyY2hhbnRJZCI6InRlc3R0ZXN0IiwiaWF0IjoxNzMxOTY3MTA1LCJleHAiOjE3MzIwNTM1MDV9.q25hymKUAxalqI0mgIQg8AQ7Q_8X5gGzOX60BBNrtW4&bankAccountLinkRedirect=https%3A%2F%2Fwww.google.com&allowedWithdrawSpeeds=standard

FAQ / Troubleshooting

  1. Why is the debit card input field not loading?

If you embed the bank auth url in an iframe and the input card number token field fails to load, try passing the origins field. Origins should be a url encoded array containing your url and any ancestors. Example: https://sandbox.coinflow.cash/solana/withdraw/YOUR_MERCHANT_ID?sessionKey=YOUR_SESSION_KEY&origins=%5B%22https%3A%2F%2Fmywebsite.com%22%5D