Embedded Withdrawals Using Iframes
What are Embedded Withdrawals?
In order for WePay to settle collected funds to a merchant, we’ll need the merchant to verify their identity and add their bank account info. Once they have done this, we can automatically deposit any money they collect into their bank account.
To make this easier, we provide a simple flow that can be embedded in an iframe on your website. The merchant can set up all of their settlement details without ever leaving your site!
Note that merchants typically only need to complete this step once. After they have completed this step, all funds will be automatically settled to their bank account on a regular basis. The merchant can choose how often these withdrawals happen (daily, weekly, or monthly).
A crowdfunding site helps fundraisers collect donations. They want to make it easy for the fundraiser to receive any donations into their bank account. On the donations settings page, they embed the iframe withdrawal flow so the fundraiser can easily set up automatic deposits into their bank account.
At WePay, the fundraiser is the merchant and we’ll use that term below.
How does it work?
There are two steps for embedding the withdrawal flow in an iframe:
- Make the /account/get_update_uri call.
- Embed the update uri in an iframe on your site.
The first step is to get the URI you need to embed in the iframe. You can do this with the /account/get_update_uri call.
Now that you have the uri, you can embed it in an iframe on your site. Here is some sample code that shows you how to do that:
The merchant will be shown a flow where they will verify their identity, add their bank account information, and choose how often they want withdrawals made (daily, weekly, monthly, quarterly): Once they have done this, and WePay has verified their information, payments will automatically be deposited into the merchant’s bank account when they clear. To learn more about how often this will happen, read the settlement guide.