API Reference Overview
This is WePay’s API reference site, which contains a full index of WePay’s API and how to integrate with it. Every call must include an
access_token, which is unique to each user-application pair. Some calls require
client_id and your
client_secret. All responses are shown in JSON.
Access to the WePay API is granted when you register your application. WePay recommends that you integrate in our stage environment before registering for production access.
We strongly recommend using one of our SDKs to make API calls. If you’re using a language that’s not supported by one of our SDKs, you’ll have to learn how to construct an API call yourself.
Construct an API call
First, decide which API Endpoint (base URL) you want.
Then pass the appropriate
access_token as an HTTP header with the following form, where
abc123 is the access token:
Authorization: BEARER abc123
Call arguments should be passed as JSON in the body of the request with content-type HTTP header set to application/json. Make sure to set a valid User-Agent header (our SDKs do this for you). The User-Agent can be anything, but keep it informative. For example: “WePay v2 PHP SDK v0.0.9”.
If you’re using PHP, you can use PHP’s libcurl functionality to make calls. For example, below is a call to /v2/user (no required parameters).