Authentication
Test Mode vs Live Mode
RexPay account supports two modes of operation.
- 1Live Mode: The transactions are real, and the effects are real. This should only be used once you have thoroughly tested your integration with this method and are confident that it is working properly.
- 2Test Mode: The transactions are not real, but the effects are the same. The only cards that can be used are our test cards and bank accounts.
To switch between Live and Test modes, click Developer Tools at the bottom of the menu sidebar as seen below.

Retrieving your API Keys
Your API keys are very vital to making requests successfully to our servers. When you create an account on RexPay, a secret ket is generated for you. To get your keys on test mode:
- 1Log into your RexPay account
- 2Navigate to Developer Tools
- 3View and copy your secret keys.

Authorizing API calls
All API calls on RexPay are authenticated. API requests made without authorization will fail with the status code 401: Unauthorized.
RexPay Uses Basic Auth. To authorize API calls from your server, pass your email as username and your secret key as password. This means passing an Authorization header with a value of ""Basic", base64_string_of_username_and_password({Username:Password})"
.
For example, an API call could look like this in Node.js:
const response = await got.post("https://pgs-sandbox.globalaccelerex.com/api/pgs/payment/v2/createPayment", { headers: { Authorization: Basic Base64Encode(CLIENT_ID:SECRET_KEY} }, json: { // Your payload } });
If you are using one of our backend SDKs, you do not need to pass the header manually; instead you will provide your keys when initialising the library.
// Install with: npm i RexPay-node-v3 const RexPay = require('RexPay-node-v3'); const rxp = new RexPay (process.env.RXP_PUBLIC_KEY, process.env.RXP_SECRET_KEY); // Subsequqent calls will automatically have the header added rxp.Misc.bvn({bvn: "123456789010"}) .then(response => console.log(response)
Did you find this page helpful?