Initiate a transaction

Initiate a transaction.

To initiate a transaction, a email address must be specified in the body of the request. This email address will be used to create an entry in the Business Customer list of your business if it does not already exist. So, typically, the email of the person making the payment is to be provided. Every newly initiated transaction is only valid for 5 mins unless payment is received and a verification request is made to the IvoryPay API

POST https://api.ivorypay.io/v1/transactions

Request Body

{
    "success": true,
    "message": "Transaction was initiated successfully",
    "data": {
        "id": "086e3492-679c-4867-aa0a-b755d07ac940",
        "email": "nwakasistephen@gmail.com",
        "address": "C26ThRAFrGzkzRTsDoYSNA6CVLPxA37xwsfFwbf3gMVS",
        "reference": "O9qfaNsnm094Gkfqv2wpbou4w8vy1u0r",
        "expectedAmountInUSD": 0.25,
        "expectedAmountInCrypto": 0.25,
        "feeInCrypto": 0.0025,
        "expectedAmountWithFeeInCrypto": 0.2525,
        "crypto": "USDC",
        "baseFiat": "NGN",
        "baseFiatToUSDRate": 0.002,
        "usdToCryptoRate": 0.9999
    }
}

In the above response, the client is expected to pay the cryptocurrency (USDC in our example response) of an amount equal to expectedAmountWithFeeInCrypto field. The expectedAmountWithFeeInCrypto is the sum of expectedAmountInCrypto and feeInCrypto. Initiating a transaction is only the first step. After payment is made, the client is expected to verify payment.

Ensure to verify the status of transaction using the Transaction Verification endpoint before you give value to your customers.

Last updated