Start by heading over to partner.wepay.com if you haven't already.
We recommend using an aliased email address to sign up (e.g., payments@your-company.com) as this allows for multiple people to access your company's account, instead of tying it to a single person's login. Another benefit is that the person responsible for filling in Know Your Customer (KYC) details can do so at a later time while you onboard to the API and begin making calls.
If you're simply testing the API, it's fine to use your own email address, and create a separate account using an alias at a later time.
Contact our Sales team to confirm the ability of your platform to obtain Production access.
Confirm Email Address
Make sure to confirm your email address once you've finished signing up for an account. If you haven't, be sure to visit here, and click the banner to resend the confirmation email.
Generate App Tokens
Before you can make an API call, you'll need to grab your App ID, API version, and App Token. You'll need to generate an App Token through the Partner Center. Simply click “Create Token”, enter a unique name, and hit save.
Note that the Legal Entity and Account IDs displayed with your API credentials are specific to your platform; each merchant will require their own Legal Entity and Account.
You can generate up to 3 tokens. As an example for using multiple tokens, you can think of each as a way to logically separate different components of your system which may interface with different parts of the Clear API. For example, you could have one service that exclusively deals with payment processing, which would have its own token that is revocable at any time. It's not mandatory to generate more than 1 token.
Recommendation
As a security precaution, rotate your App Tokens every 3 months by visiting the Partner Center. Delete your current tokens, create new tokens, and replace your old tokens with your new ones.
Stage vs. Production
Base URL | Environment |
---|---|
https://stage-api.wepay.com |
Stage |
https://api.wepay.com |
Production |
When you finish signing up for an account, you'll begin in the stage environment. Your API credentials will let you make API requests to the https://stage-api.wepay.com
base URL, appended with an endpoint. The stage environment is intended for use in the development and prototyping of your application.
In order to process payments in Production, you must first be assigned an integration manager.
If you are not managed and would like to move to Production, contact our Sales team to move further. We suggest completing this step first to align on integration requirements.
When you are managed and ready to launch, you can begin the process of certification to migrate to the Production environment in the dashboard.
As using production credentials executes actual money movement, we do not allow any account to migrate to the production environment until they have passed certification. We define certification throughout the basic integration process. In addition, WePay requires you to submit personal and business details before you can access the production environment.
Submit Personal and Business Details
To submit personal and business details, first navigate to the Live tab and click the blue button to update your personal information:
Next, identify the country your business is located in:
Then, identify the entity type of your application:
If your application is a business, specify whether your business is a corporation, LLC, or partnership. If your application is a nonprofit, specify whether your nonprofit is a nonprofit corporation or an unincorporated association.
Identify your application's industry category and type to help WePay identify an appropriate merchant category code for your account.
Next, fill in your application's business details:
Next, supply personal details for a controller of your application's business:
A controller is a single individual with significant responsibility to control, manage, or direct a legal entity customer, including an executive officer or senior manager (e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating Officer, Managing Member, General Partner, President, Vice President, or Treasurer); or any other individual who regularly performs similar functions (i.e., the control prong). This list of positions is illustrative, not exclusive, as there is significant diversity in how legal entities are structured.
Last, supply the personal details for everyone who owns 25% or more of your application's business:
WePay will verify your information once submitted, typically within 2 business days.
Add Bank Account
Once you've confirmed your account, generated an app token, and submitted all business and personal details, you can add a bank account to receive payouts. As a reminder, you need to fill out KYC information to receive payouts.
Usually, a Controller, VP level, or C-level person is responsible for filling this information by navigating to the Payouts section of the WePay application dashboard and clicking "Add":
If your business is based in Canada, please reach out to your account manager or integration team in order to access the Canadian bank form.
Have your bank account direct deposit routing and account numbers handy:
Tell us how often you would like to receive payouts by using the "period" drop down.
While this step isn't necessary to do before making API calls, it's a one-time set up, and lets you receive payouts daily (midnight settlement), weekly (every Monday), or monthly (first of the month). If these days are a bank holiday, it'll be the next day.
Visit our Partner Center guide to learn about business management features and functionalities the Partner Center has to offer.
Subscribe To API Notifications
Notifications are webhooks sent by the API to deliver information about your merchants, payment processing, and payment operations.
The lifecycle follows this general pattern:
- Receive a notification from WePay about a payment, merchant, payout, or other operation.
- Inspect content of the Notification Signature to ensure that the notification is intact and sent from WePay.
-
Inspect
payload.create_time
to determine chronology, not theevent_time
of the notification itself
If a Notification fails to reach your servers, we will attempt to retry following this pattern:
- 1st retry will happen 15 minutes after the initial attempt.
- 2nd retry will happen 30 minutes after the 1st retry.
- 3rd retry will happen 1 hour after the 2nd retry.
- 4th retry will happen 6 hours after the 3rd retry.
- 5th retry will happen 12 hours after the 4th retry.
- 6th retry will happen 24 hours after the 5th retry.
WePay defines "failing to reach your servers" as receiving any HTTP code other than 200 or 201. This also includes network retries. Due to potential retries, it is important to use the event_time
value rather than receipt time to identify the order in which events occur.
When you transition to production on your dashboard, the WePay team will validate your Notifications implementation. Notifications are not stored permanently. If you haven't subscribed to notifications, you won't be able to retrieve older notifications once subscribed. However, once subscribed, Notifications are stored for 30 days.
Subscribe to API Notifications by making a POST /notification_preferences
API request.
Recommended API Notification Subscriptions:
-
accounts.created
-
accounts.capabilities.updated
-
payouts.failed
-
disputes.created
-
disputes.resolved
-
legal_entities.verifications.updated
-
payments.completed
-
payments.canceled
-
payments.failed
Warning
The custom_data
parameter may not appear in the notification payload for any given notification topic. To lookup the custom_data
parameter for a specific notification, send an API request with the resource ID to the endpoint you would like to access.
Add Rbits
We'll first walk through the inline flow. Let's say you're processing payments. All these calls accept an array of rBits, that you define inline.
For example, let's say you want to attach the Transaction Details object to your Payments. You've noticed a significant increase in payments, of which a bunch were spam. As such, you now add in Transaction Details as an rBit to get ahead of the problem.
{
"rbits": [{
"receive_time": 1367958263,
"type": "transaction_details",
"source": "user",
"transaction_details": {
"itemized_receipt": [
{
"amount": 105,
"currency": "USD",
"description": "Premium lawn service package",
"item_price": "100",
"project_name": "Lawn service at 123 Fake St.",
"quantity": 1,
"service_billing_method": "hourly_billing_at_project_rate"
}],
"note": "returning customer, new payment method"
}
}]
}
You'll notice that at creation time of a new Payment, an rBit array was included. If you choose to do so, you can pack more rBits into the array.
It's also not necessary to do the inline flow, as you can first create a Payment, and update it with rBits after creation.
Next, we'll walk through the 2-step flow. Let's say you're onboarding merchants and you define rBits after onboarding.
For example, you want to attach the External Account object to merchant Accounts. Once you receive an Account ID from WePay, create an rBit by sending a POST /rbits
request like this:
{
"address": {
"account_type": "facebook",
"connections": "2000",
"create_time": 1235635140,
"feedback_score_percent_positive": 0.87,
"feedback_scores_provided": "476",
"is_partner_account": false,
"uri": "facebook.com.merchantblob"
},
"associated_resource": {
"id": "{merchant-account-id}", // insert the merchant's account ID here
"resource": "accounts"
},
"receive_time": 1367958263,
"source": "guidestar",
"type": "address"
}'
View the Full API reference to see where you can add rBits. In general, the more you add to your Accounts and Payments, the better overall experience and minimization of loss for your end merchants and payers.