Pay Via Wallet Connection

This page describes handling payment via wallet connection (only on Solana network at the moment)

Follow the steps below to pay via wallet connection.

1. Initiate a transaction

Initiate a transaction using our Transaction Initiation endpoint.

2. Connect wallet

You must prompt your users to connect to a wallet. After a successful wallet connection, collect the address of the wallet. We will need this for the next step.

Please note that only Phantom is supported at the moment.

3. Initiate Payment via wallet connection

Next, you must send a POST request with the connected wallet's address as the only data in the request body to the endpoint below:


Path Parameters

Request Body

    "success": true,
    "message": "Transaction was initiated successfully",
    "data": {
        "address": "hUTwSK7pcYgmrQEdtv79xPja7gt7tnSyRx8XE6WDrvo",
        "reference": "SsGplwLunsm1BBkD4jUCXU9BasSgFdP5",
        "expectedAmountInUSD": 12.04,
        "expectedAmountInCrypto": 12.0388,
        "crypto": "USDC",
        "baseFiat": "NGN",
        "baseFiatToUSDRate": 0.002408,
        "usdToCryptoRate": 0.9999

4. Confirm execution

At this point, the connected wallet should automatically prompt your user to confirm the execution of the transaction. If the user proceeds with the execution, an amount equal to the value of theexpectedAmountWithFeeInCrypto field of the initiated transaction will be deducted from the connected wallet.

You can find a sample implementation of this feature on GitHub.

Last updated