Create Purchase

You can create your first JumiaPay transaction by following the process below.


1. Get shopConfig

Log in to your JumiaPay merchant account and navigate to the Account Settings page. There you will find your unique shopConfig.

For testing purposes you can use the shopConfig provided below.


2. Create Transaction

You can create a purchase by POSTing data to the /merchant/create endpoint. Your request should have all required data formatted as JSON in the body. The request must contain this header: Content-Type: application/json.


Example request
    curl -H "Content-Type: application/json" \
         -u rocket:rock4mebuddy \
         -d "data={ \
                   "shopConfig": "AAEAAADoKU7YJh44utJbVDLTqqEEeiaO28_f9LjaYMu1GdoBNT9_IG--\/AAEAAAgfi0NkDIDyXMhIaaM-wfYLziibzdgBQIQVoD4hzxDnQt5szEIq\/0ce5b60001d7e89c7b50fbe59cfb1bf5",
        "basket": {
            "shipping": "0",
            "currency": "NGN",
            "basketItems": [
              {
                "name": "Ibis Lagos Airport",
                "imageUrl": "https://example.com/image.jpg",
                "amount": "29880",
                "quantity": "1",
                "currency": "NGN"
              }
            ],
            "totalAmount": "29880"
        },
        "consumerData": {
            "emailAddress": "[email protected]",
            "mobilePhoneNumber": "+2348021234567",
            "country": "NG",
            "firstName": "Test",
            "lastName": "Booking",
            "ipAddress": "172.16.0.1",
            "language": "EN",
            "name": "Test Booking",
            "dateOfBirth": 20/10/1980
        },
        "priceCurrency": "NGN",
        "description": "JumiaPay",
        "purchaseReturnUrl": "https://www.supermagicshop.co.id/returnurl",
        "purchaseCallbackUrl": "https://www.supermagicshop.co.id/callbackurl",
        "shippingAddress": {
            "addressLine1": "11 Commercial Avenue Sabo",
            "addressLine2": "Yaba",
            "city": "Lagos",
            "district": "Lagos",
            "province": "Lagos",
            "zip": "",
            "country": "NG",
            "name": "Test Booking",
            "firstName": "Test",
            "lastName": "Booking",
            "mobilePhoneNumber": "+2348021234567"
        },
        "billingAddress": {
            "addressLine1": "11 Commercial Avenue Sabo",
            "addressLine2": "Yaba",
            "city": "Lagos",
            "district": "Lagos",
            "province": "Lagos",
            "zip": "",
            "country": "NG",
            "name": "Test Booking",
            "firstName": "Test",
            "lastName": "Booking",
            "mobilePhoneNumber": "+2348021234567"
        },
        "merchantReferenceId": "postman1513352142584",
        "priceAmount": "29880"
    }
         https://sandbox.jumipay.com/merchant/create

    

Successful response example
      "success":true,
      "type": "single",
      "payload": {
        "purchaseId": "AAEAAADoKU7Oblz49IZFtwViIu8HF1tIkXvlY7GQMXsxjb4ECRHPQbL3",
        "checkoutUrl": "https:\/\/sandbox.jumipay.com\/checkout\/?purchaseId=AAEAAADoKU7SPetIl5sQm3TX3UYQr2itSspQUO2yzCzCIYoUm9-MzfU0",
      }
    }
    

Error response example
    {
        "success": false,
        "type": "single",
        "payload": [{
                "name": "Unauthorized",
                "description": "Unauthorized",
                "code": 401
        }]
    }

Full Documentation

In order to enhance your customer's checkout experience and security as well as to provide access to all supported payment methods, we recommend that you send us all customer and purchase related information. You will find all the fields that we support and their purpose in the table below.

Required Param Description
* shopConfig Your unique shopConfig, which is being used to authenticate you.
* basket An object containing information about what the customer has ordered.
shipping Shipping cost
* currency ISO 4217 currency code
* basketItems An object containing information about each item in your order.
* name Item name
* imageUrl URL pointing to the product image
* amount Item price
* quantity Item quantity
* currency ISO 4217 currency code
* totalAmount Total value of all items in cart
* consumerData An object containing data about the customer.
* emailAddress Customer's contact email address.
* mobilePhoneNumber Customer's contact mobile phone number.
* country Customer's ISO norm country code
firstName Customer's first name
lastName Customer's last name
* ipAddress Customer's IP address. Used to increase security.
* language Customer's contact email address.
name Concatenated customer full name: Firstname Lastname
dateOfBirth Customer's date of birth in format DD/MM/YYYY
* priceCurrency ISO 4217 currency code
* description A description of your transaction, such as "Purchase on MyShop.com"
purchaseReturnUrl purchase return url
* purchaseCallbackUrl We can notify you about status changes concerning your purchases by calling your purchaseCallbackUrl. It should point to your service that can accept payloads from us in an urleconded JSON format. You can find more details below.
* shippingAddress An object containing the shipping address of the customer.
addressLine1 Contains things like street name and house number.
addressLine2 Address line 2
* city city, e.g. "Kota Jakarta Utara"
* district District, e.g. "Penjaringan"
* province Province, e.g. "DKI Jakarta"
zip Zip code
* country County
name Concatenated customer name: Firstname Lastname
firstName If you have the name separated please also send the first name directly.
lastName If you have the name separated please also send the last name directly.
mobilePhoneNumber Customer's mobile phone number
* billingAddress An object containing the shipping address of the customer. It is required to submit the customer's billing address in order to allow credit card transactions.
* addressLine1 Contains things like street name and house number.
addressLine2 Address line 2
* city city, e.g. "Kota Jakarta Utara"
* district District, e.g. "Penjaringan"
* province Province, e.g. "DKI Jakarta"
zip Zip code
* country Country
name Concatenated customer full name: Firstname Lastname
firstName If you have the name separated please also send the first name directly.
lastName If you have the name separated please also send the last name directly.
mobilePhoneNumber Customer's mobile phone number
* merchantReferenceId Your unique order Id. You will be able to search for your orders using your Id in your merchant account area.
* priceAmount Total order amount
JumiaPay