Creating an Order

🚧

Authentication

Before you continue, we recommend reading the authentication section first to understand how to authorize your requests.

This guide covers how to create orders for your customers. Orders are a seamless way to initiate different payments and they are helpful in collecting the customer's information.

Follow these steps to create an order for your customer's payments

  1. Encrypt the create order request. This request should contain customer's information (first_name, last_name, mobile, country and email) and transaction details (amount, reference, currency and description).
  2. Send the encrypted request to the create order endpoint.

Here are some samples to help you create orders:

{
   "customer":{
      "firstname":"ideos",
      "lastname":"pay",
      "mobile":"+23481582333444",
      "country":"NG",
      "email":"email@ideos.dev"
   },
   "order":{
      "amount":100,
      "reference":"ORD001",
      "description":"Pay",
      "currency":"NGN"
   },
   "payment":{
      "RedirectUrl":"https://www.hi.com"
   }
}
{
    "data": "b6t36QfBWy0r7SQipdgkzp1+5O43QyYYjrj8FNIAKfx7gR9AtITHEDDA02m3oLqFNwsButeKkyZVL8+21kz9sY1yfJuI/QqtefxGPUagYCnuMNIBFeo97rWCemI8oBQ5G33NgnPoX54MWw7aZ8/W8wLWtrAeFA1WjwsIh3Ewb7z07Q/IgqCXn6793xizC9qIp/X5HCzdnBgUcUk92Xo7qKPbsR/8Cvmg6zapU9Z8zsdYwxUx/lkQLAihvarQ7LmGL4tyijKu2FcNQL7xdJKArl1hfv4d80FkD/0tnbxl6w/taL2rCgvALiNvgerxJQi8PgMACG4lMzib+LVhNzcu94fmUNiG7kwUfbB7QmlUmqgGoyMwOqSGGbKDkNcyQQuVPbaW6znfIGIqp3sVFBLnMD9vCWdlIqmNTskp2ROBL4DVAzNmJwAj9ofhXcSN5RF1Bx0ubAzQ4N90z6xduwZHH/iV/rqTfsIdXkRDVZWP25cJB8huoTTJcBBnoX9bFnj1709fAGQuMyNlj+uBqXKwFA6Q9MrafefNnRzU6OpeNzibNpL3hOHfoZkuA8Zqjc14Rq1BuIMYuLrsfpdZTW2vSnNWUju5B+DU9sat5Sbxks6QqIyrH3HhzJQeCaD59ruFDTyAG/kSz37y18BTt3iybg0z+nW1zXWfJec46hSCDpQ="
}
{
  "data": {
    "order": {
      "reference": "754874724",
      "processorReference": "IDSPAY-76279490-6B08-45CF-9919-582E9C77F52B",
      "orderPaymentReference": null,
      "amount": 100,
      "fee": 0,
      "feeRate": 0,
      "statusId": 1,
      "status": "Initiated",
      "currency": "NGN",
      "narration": "Pay"
    },
    "subsidiary": {
      "id": 1,
      "name": "Test Merchant",
      "country": "NG",
      "supportEmail": "test@ideospay.dev",
      "customization": []
    },
    "customer": {
      "email": "email@ideos.dev",
      "firstName": "ideos",
      "lastName": "pay",
      "mobile": "+23481582333444",
      "country": "NG"
    },
    "payment": {
      "code": null,
      "source": "Selected by Customer",
      "selectedOption": null,
      "accountNumber": null,
      "bankProviderName": null
    },
    "otherPaymentOptions": [
      {
        "code": "BT",
        "name": "Bank Transfer",
        "currency": "NGN"
      },
      {
        "code": "C",
        "name": "Card Payment",
        "currency": "NGN"
      },
      {
        "code": "BA",
        "name": "Bank Account",
        "currency": "NGN"
      },
      {
        "code": "USSD",
        "name": "USSD",
        "currency": "NGN"
      },
      {
        "code": "BANK-TRANSFER",
        "name": "Pay With Bank Transfer",
        "currency": "NGN"
      },
      {
        "code": "NQR",
        "name": "QR Code Payment",
        "currency": "NGN"
      }
    ],
    "savedCards": [],
    "subsidiaryOrderSummary": {
      "orderName": "Test Merchant Order 754874724",
      "totalAmount": 100,
      "reference": "754874724",
      "currency": "NGN",
      "orderItems": [
        {
          "name": "Summary",
          "amount": 100
        }
      ]
    }
  },
  "status": "success",
  "statusCode": "01",
  "message": "Created order successfully"
}

After creating an order, you can now initiate a payment on the order. Learn how to initiate payments here.


Supported Modes for creating an Order

You can create your order to support different payment flows and types. Orders now support single payments, recurring payments, and payments via links.


Payment links

To create an order with a payment link, you need to link the paymentLinkId to the order. First, create the payment link (see more details here) then include the link's ID in your order request.

📘

You can retrieve the payment link details by passing the paymentLinkReferencefrom the response into the fetch payment link endpoint.

{
    "customer": {
        "firstname": "King",
        "lastname": "James",
        "mobile": "+2348158200000",
        "country": "NG",
        "email": "james@gmail.com"
    },
    "order": {
        "amount": 200,
        "reference": "abc0923",
        "description": "Test Order",
        "currency": "USD"
    },
    "payment": {
        "redirectUrl": "https://www.hello.com",
        "paymentLinkId": 1
    },
    "paymentMeta": {
        "ipAddress": "127.0.0.0",
        "userAgent": "Chrome/129.0.0.0"
    }
}
{
    "data": "b6t36QfBWy0r7SQipdgkzp1+5O43QyYYjrj8FNIAKfx7gR9AtITHEDDA02m3oLqFNwsButeKkyZVL8+21kz9sY1yfJuI/QqtefxGPUagYCnuMNIBFeo97rWCemI8oBQ5G33NgnPoX54MWw7aZ8/W8wLWtrAeFA1WjwsIh3Ewb7z07Q/IgqCXn6793xizC9qIp/X5HCzdnBgUcUk92Xo7qKPbsR/8Cvmg6zapU9Z8zsdYwxUx/lkQLAihvarQ7LmGL4tyijKu2FcNQL7xdJKArl1hfv4d80FkD/0tnbxl6w/taL2rCgvALiNvgerxJQi8PgMACG4lMzib+LVhNzcu94fmUNiG7kwUfbB7QmlUmqgGoyMwOqSGGbKDkNcyQQuVPbaW6znfIGIqp3sVFBLnMD9vCWdlIqmNTskp2ROBL4DVAzNmJwAj9ofhXcSN5RF1Bx0ubAzQ4N90z6xduwZHH/iV/rqTfsIdXkRDVZWP25cJB8huoTTJcBBnoX9bFnj1709fAGQuMyNlj+uBqXKwFA6Q9MrafefNnRzU6OpeNzibNpL3hOHfoZkuA8Zqjc14Rq1BuIMYuLrsfpdZTW2vSnNWUju5B+DU9sat5Sbxks6QqIyrH3HhzJQeCaD59ruFDTyAG/kSz37y18BTt3iybg0z+nW1zXWfJec46hSCDpQ="
}
{
    "data": {
        "order": {
            "reference": "abc0923",
            "processorReference": "ALP-011947D8E93C11EF8D76024163CF7247",
            "orderPaymentReference": null,
            "amount": 200.0000,
            "fee": 0.0000,
            "feeRate": null,
            "statusId": 1,
            "status": "Initiated",
            "currency": "USD",
            "narration": "Pay",
            "paymentLinkId": 1,
            "recurringPaymentId": null,
            "paymentLinkReference": "APaspsWfVYh6r8AIOO85h4iqMki2JR5SDLhGK3PS94ESr7l1JsYxdiABM112",
            "recurringPaymentReference": null
        },
        "subsidiary": {
            "id": 1,
            "name": "AlliancePay",
            "country": "NG",
            "supportEmail": "merchant@alliancepay.com",
            "customization": []
        },
        "customer": {
            "email": "email@payinvert.com",
            "firstName": "firstname",
            "lastName": "lastname",
            "mobile": "+2348158200000",
            "country": "NG"
        },
        "payment": {
            "code": null,
            "source": null,
            "selectedOption": null,
            "accountNumber": null,
            "bankProviderName": null
        },
        "otherPaymentOptions": [
            {
                "code": "C",
                "name": "Card Payment",
                "currency": "USD"
            }
        ],
        "savedCards": [],
        "subsidiaryOrderSummary": {
            "orderName": "AlliancePay Order abc0923",
            "totalAmount": 200.0,
            "reference": "abc0923",
            "currency": "USD",
            "orderItems": [
                {
                    "name": "Summary",
                    "amount": 200.0
                }
            ]
        }
    },
    "status": "success",
    "statusCode": "01",
    "message": "Created order successfully"
}

Recurring payments

Orders for


What’s Next