Download WePay's API

Postman

Step 1: Sign Up in Partner Center

Start by heading over to partner.wepay.com.

We recommend using an aliased email address to sign up (something like 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. This also allows the person responsible for filling in Know Your Customer (KYC) details to 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.

Here, you will find your:

  • App ID
  • API version
  • Your platform's Legal Entity ID
  • Your platform's Account ID
  • App tokens

Step 2: 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.A banner reminding you to confirm your email
A banner reminding you to confirm your email

Step 3: Generate a Token

Once sign up has been completed, log in to your account with your confirmed email.

The first screen you will see is set to the Staging environment, and before you can start testing the API, you will need to generate your App Token.

Simply click “Create Token”, enter a unique name, and hit save. In this example, we named it "first_token".

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 three tokens, though it is not necessary to generate more than one token. 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.

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.

Generate an app token in Partner Center
Generate an app token in Partner Center

Step 4: Fork our 3.0 API Postman Collection

Ensure you have an account with Postman. If you don't, be sure to create an account.

Click on the button below to fork our 3.0 API collection. You can choose a fork label and which of your workspaces to add this collection to.

You should now see the forked collection in your collections on the left panel. Here, we named our fork label "test".

Forked collection in Postman
Forked collection in Postman

Step 5: Creating Environment Variables

Here we will be creating environment variables for you to use when testing our APIs. This way, you don't have to memorize these values and have ready access to them.

Select Environments on the left-hand side. Select New, then Environment.

Create an environment for environment variables
Create an environment for environment variables

This will create a new environment called “New Environment.” Feel free to rename this environment. Here, we name it “Stage Environment” since we are testing stage and not production. Now we will add the following variables that are commonly used in our API calls:

  • Base URL
  • App ID
  • API version
  • App token
  • Content type

Refer to your credentials from Partner Center and fill them in as the initial and current value.

Set environment variables for Postman calls
Set environment variables for Postman calls

Step 6: Make API Calls

Now you are ready to send requests! Refer back to your Collections and ensure you are in the Environment you just created. When you select an API call, you can go to the Headers tab and fill in the required headers for each call by filling them with your environment variables. In the example below, we typed a new key called “App-Token” with Value being {{App-Token}}. A dropdown menu should pop up after you type the first curly-brace when using environment variables.

Note

Be sure to keep in mind selected and unselected headers for each API call. You can exclude headers by unchecking the check box next to each key.

Customizing headers in API calls
Customizing headers in API calls

OpenAPI