Browpay API Documentation
  • Home
  • Escrow QuickStart Guide
  • Authentication
  • Webhooks
    • Signature Validation
    • Encryption and Decryption
  • Payments
    • Collect Payments
      • Initialize Transaction
      • Verify Payments
      • List Payments
    • Transaction Codes
      • Verify Token
      • List Codes
  • Payouts
    • Account Resolution
    • Transfers
      • Create Transfer
      • Fetch Transfer
      • List Transfers
  • Customers
    • Fetch Customers
    • Load Customer
  • Products
    • Fetch Products
  • Miscellaneous
    • Balances
    • Banks
    • Countries
  • Plugins
    • Plugins and Libraries
Powered by GitBook
On this page

Was this helpful?

Authentication

PreviousEscrow QuickStart GuideNextWebhooks

Last updated 10 months ago

Was this helpful?

Browpay API works in two modes. Live Mode and Sandbox Mode

  • The Live mode keys are retrieved from the main dashboard at and the Live mode API endpoint is at

    • In the Live mode there are real payments, real effects and data. Only switch to live api endpoint after you have reviewed your test integrations thoroughly.

  • The Sandbox Mode keys are retrieved from the sandbox dashboard environment at and the Sandbox mode API endpoint is at

    • In the Sandbox mode you have mock transactions, test payments and test transactions. Here is where you get the liberty to test and run your demo integrations just as it would respond in real transactions, but in sandbox no real money is processed.

      Also Note: that we are bound to erase sandbox data after a year; which means you only get a year data interval for every tests you make.

Sign up at https://sandbox.browpay.com to switch to sandbox mode and retrieve your test keys.

API KEYS

  • Secret Key: Your secret key authorizes your API requests. It is required to authenticate your API calls. You are expected to protect your secret keys from the public and do not expose it in your frontend.

  • Public Key: Your public key is primarily used to decrypt the webhook payloads we send to you. Further updates on public key utilization will be published in due time.

  • Encryption Key: The encryption also works as a pair to the public key in decrypting the webhook payloads we send to you. We are working hard to ensure the security of your data while you consume our endpoints.

To retrieve your keys, navigate to API Keys in your dashboard menu and copy your keys.

IMPORTANT

If you suspect that your keys have been exposed or compromised, navigate to API KEYS in your dashboard menu and generate new keys to deactivate the previously exposed ones for your safety.

A sample secret key authorization would look like this:

const axios = require('axios');

const apiUrl = 'browpay-api-endpoint';
const token = 'Your-secret-key';

axios.get(apiUrl, {
  headers: {
    'Authorization': `Bearer ${token}`
  }
})
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });
import requests

api_url = 'browpay-api-endpoint'
token = 'your-secret-key'

headers = {
    'Authorization': f'Bearer {token}'
}

response = requests.get(api_url, headers=headers)

print(response.json())
$options = [
    'http' => [
        'header' => "Authorization: Bearer 'your-secret-key'",
    ],
];

$context = stream_context_create($options);
$response = file_get_contents('browpay-api-endpoint', false, $context);

echo $response;
https://dashboard.browpay.com
https://api.browpay.com/v1/
https://sandbox.browpay.com
https://s-api.browpay.com/v1/
Browpay API Keys page