Accept Payment

In a nutshell
To accept a payment, create a transaction using our API, our client Javascript library, Popup JS.

Collect customer information

To initialize the transaction, you'll need to pass information such as email, first name, last name amount, transaction reference, etc. Email and amount are required. You can also pass any other additional information in the metadata object field. Here is the full list of parameters you can pass:

Parameter Type Required Description
public_key String Yes This is required for authentication
callback_url Url No URL to redirect when a transaction is completed.
Successful transactions redirects to this url after payment.
external_reference String Yes Your transaction reference. This MUST be unique for every transaction.
customer.first_name String Yes This is the first_name of your customer.
customer.last_name String Yes This is the last_name of your customer.
customer.email String Yes This is the email address of your customer.
Transaction notification will be sent to this email address.
currency String Yes Currency to charge in.
amount Numeric Yes Amount to charge the customer.
metadata Array No You can pass extra information here.
plan_id String No If present, it will be treated as a subscription.

Popup

APEX Popup provides a simple and convenient payment flow for web. It can be integrated in few easy steps, making it the easiest way to start accepting payments.

Sample Implementation

    <script src="https://whitelabel.markets/demos/apex/popup.js"></script>
            <div id="wrapper"></div>
            <button type="button" onClick="makePayment()">Pay Now</button>
            <script>
                const TRANSACTING_PARAMETERS = {
                    public_key: "ESaKJlvX4uhaZurmd4AuZDhvK1ppi4",
                    external_reference: Math.floor(Math.random() * 1000000000 + 1),
                    amount: 10000,
                    currency: "USD",
                    callback_url: "https://google.com",
                    customer: {
                    email: "john@remote.com",
                    first_name: "John",
                    last_name: "Doe",
                    },
                };
                function makePayment() {
                    checkout.init(TRANSACTING_PARAMETERS);
                }
            </script>