Custom Account Creation
Custom Account Creation Introduction
Custom Account Creation uses our /user/register call and allows you 100% control of the payment experience and gets merchants processing payments immediately. With the /user/register API calls, you create an account for the merchant literally behind the scenes. Then WePay completes account creation later through an email authorization from the merchant but the merchant can get going with accepting payments immediately. This also gives you the ability to do things on behalf of a merchant, including viewing their account balance and refunding payments. The goal of /user/register is getting an
access_token, which is a secret parameter that lets you act on a specific merchant’s behalf.
An invoicing application wants to be able to let their users create invoices and start collecting money immediately upon registration. When a new user registers, they make the /user/register call and get back an
access_token which they can use to create a payment account for the user and start accepting payments for that user.
At WePay, users are merchants and their customers are payers and we’ll use those terms below.
There are 4 steps to /user/register:
- You make the /user/register call for a merchant and get back an
- Make the /account/create call with the
access_tokenfrom step 1 to get an
- Use the /user/send_confirmation call to send the user an email asking them to confirm.
- The merchant clicks on a link in the email, confirms their new account, and sets a password.
Make the /user/register call and pass the merchant’s details. The merchant will be registered on WePay and you will receive an
access_token for that merchant.
Note that the
access_token you receive is temporary unless confirmed. See -below- for more details.
As a Best Practice, we recommend asking for all necessary Scope up-front. See our best practices for more information.
Each merchant requires a payment account in order to start processing payments. A payment account has its own transaction history and account balance. Once you have an
access_token for each merchant, you’ll want to create a payment account for each merchant.
All you need to do is make the /account/create call with the merchant’s
access_token. The account name that you specify will be used on receipts and on the credit card statement for payments made to this account.
You will receive back an
account_id which you should store in your database. You will use the merchant’s
access_token when processing payments with the /checkout/create call (for example). You can also use the
account_id to look up the account balance and status.
As a Best Practice, we recommend using a recognizable account name during account creation, as this is what appears in a payer’s credit card statement. As such, a unrecognizable account name could lead toreturned funds. Read more here
Now that the user is registered and an account has been setup, you can send the user a co-branded email letting them know that your app is going to start processing payments for them on WePay.
To do so, make the /user/send_confirmation call.
The merchant will click on the call to action in the email and will be taken to a page where they can confirm this process. They will choose a password that will let them log into WePay at a later date. They will then be returned to the
redirect_uri you set in step 1.
What happens if the merchant doesn’t confirm?
The temporary access token will expire 90 days after its creation if not approved. You can send the user an email to confirm their WePay account using the /user/send_confirmation call.
Accounts created with a temporary access token have a few restrictions.
- They will deleted when the temporary access token expires.
- They will also be deleted 14 days after they accept their first payment.
- They can only accept $100,000.
Once an account created with a temporary access token is deleted, all accepted payments will be refunded.
Now that you have an
account_id and an
access_token, you can help the merchant accept payments. Read the process payments overview for information on how to do that.