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
- Encrypt the create order request. This request should contain customer's information (
first_name
,last_name
,mobile
,country
andemail
) and transaction details (amount
,reference
,currency
anddescription
). - Send the encrypted request to the create order endpoint.
Here are some samples to help you create orders:
{
"customer": {
"first_name": "Jane",
"last_name": "Doe",
"mobile": "08024578023",
"country": "NG",
"email": "[email protected]"
},
"order": {
"amount": 250,
"reference": "ORD001",
"description": "First Order",
"currency": "NGN"
}
}
{
"data": "b6t36QfBWy0r7SQipdgkzp1+5O43QyYYjrj8FNIAKfx7gR9AtITHEDDA02m3oLqFNwsButeKkyZVL8+21kz9sY1yfJuI/QqtefxGPUagYCnuMNIBFeo97rWCemI8oBQ5G33NgnPoX54MWw7aZ8/W8wLWtrAeFA1WjwsIh3Ewb7z07Q/IgqCXn6793xizC9qIp/X5HCzdnBgUcUk92Xo7qKPbsR/8Cvmg6zapU9Z8zsdYwxUx/lkQLAihvarQ7LmGL4tyijKu2FcNQL7xdJKArl1hfv4d80FkD/0tnbxl6w/taL2rCgvALiNvgerxJQi8PgMACG4lMzib+LVhNzcu94fmUNiG7kwUfbB7QmlUmqgGoyMwOqSGGbKDkNcyQQuVPbaW6znfIGIqp3sVFBLnMD9vCWdlIqmNTskp2ROBL4DVAzNmJwAj9ofhXcSN5RF1Bx0ubAzQ4N90z6xduwZHH/iV/rqTfsIdXkRDVZWP25cJB8huoTTJcBBnoX9bFnj1709fAGQuMyNlj+uBqXKwFA6Q9MrafefNnRzU6OpeNzibNpL3hOHfoZkuA8Zqjc14Rq1BuIMYuLrsfpdZTW2vSnNWUju5B+DU9sat5Sbxks6QqIyrH3HhzJQeCaD59ruFDTyAG/kSz37y18BTt3iybg0z+nW1zXWfJec46hSCDpQ="
}
{
"data": {
"order": {
"reference": "ORD001",
"processor_reference": "PARORD-F7A89595-6267-4104-BEC8-A4DE2258F6B7",
"order_payment_reference": "",
"amount": 250.00,
"fee": 0.00,
"fee_rate": 0.0000,
"status_id": 1,
"status": "Initiated",
"currency": "NGN",
"narration": "First Order"
},
"subsidiary": {
"id": 0,
"name": "AlliancePayDemo",
"country": "NG",
"support_email": "[email protected]",
"customization": [
{
"key": "logo",
"value": "https://subsidiary-api-service-dev.eks-alliancepay.com/subsidiary/dashboard/file/AlliancePay-compliance-images/download?fileId=Subsidiary_18_logo_19933627.jpeg"
}
]
},
"customer": {
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Doe",
"mobile": "+2348024578023",
"country": "NG"
},
"payment": null,
"other_payment_options": [
{
"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"
}
],
"saved_cards": [],
"subsidiary_order_summary": {
"order_name": "AlliancePayDemo Order ORD001",
"total_amount": 250.0,
"reference": "ORD001",
"currency": "NGN",
"order_items": [
{
"name": "Summary",
"amount": 250.0
}
]
}
},
"status": "success",
"message": "Created order successfully"
}
After creating an order, you can now initiate a payment on the order. Learn how to initiate payments here.
Updated about 1 year ago
Whatβs Next