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={ \
              "priceAmount": "8999000.00", \
              "priceCurrency": "NGN", \
              "description": "This is the ideal purchase", \
              "merchantReferenceId": "104565007",  // this number should be unique \
              "purchaseSuccessUrl": "https:\/\/www.supermagicshop.co.id\/checkout\/finish\/jumiapaysuccess", \
              "purchaseFailureUrl": "https:\/\/www.supermagicshop.co.id\/checkout\/finish\/jumiapaycancel", \
              "basket": { \
                         "basketItems": [ \
                                        { \
                                        "name": "Canyonero", \
                                        "quantity": 1, \
                                        "amount": "8999000.00", \
                                        "imageUrl": "http:\/\/imgur.com\/gallery\/aVJtllp", \
                                        "currency": "NGN" \
                                        } \
                                        ], \
                         "shipping": "0.00", \
                         "totalAmount": "8999000.00", \
                         "currency": "NGN" \
               }, \
               "shippingAddress": { \
               "name": "Homer Simpson", \
               "addressLine1": "Jalan Jend. Sudirman No.Kav 10-11", \
               "city": "Nigeria", \
               "country": "SG", \
               "mobilePhoneNumber": "+655557334" \
               }, \
               "billingAddress": { \
                                "name": "Homer Simpson", \
                                "addressLine1": "123 Central", \
                                "city": "Nigeria", \
                                "country": "SG", \
                                "mobilePhoneNumber": "+655557334" \
               }, \
               "consumerData": { \
                               "mobilePhoneNumber": "+655557334", \
                               "emailAddress": "[email protected]", \
                               "country": "SG \
                               "language": "en", \
                               "ipAddress": "127.0.0.1", \
                               "name": "Homer Simpson" \
               }, \
               "additionalData": {}, \
               "shopConfig": "AAEAAADoKU7YJh44utJbVDLTqqEEeiaO28_f9LjaYMu1GdoBNT9_IG--\/AAEAAAgfi0NkDIDyXMhIaaM-wfYLziibzdgBQIQVoD4hzxDnQt5szEIq\/0ce5b60001d7e89c7b50fbe59cfb1bf5" \
               }"  \
     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,
  "message": "There were errors in JSON data sent!"
}

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
* priceAmount Total order amount
* priceCurrency ISO 4217 currency code
* description A description of your transaction, such as "Purchase on MyShop.com"
merchantReferenceId Your unique order Id. You will be able to search for your orders using your Id in your merchant account area.
purchaseSuccessUrl This is where the customer will be redirected after successfully completing the checkout, i.e. your success page.
purchaseFailureUrl This is where the customer will be redirected in case an error occurs during the checkout. We'd recommend that this URL should take the customer back to the screen where he can select an alternative payment method.
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.
basket An object containing information about what the customer has ordered.
> basketItems An object containing information about each item in your order.
>> name Item name
>> quantity Item quantity
>> amount Item price
>> taxAmount Tax for the item
>> imageUrl URL pointing to the product image
>> currency ISO 4217 currency code
> shipping Shipping cost
> totalTaxAmount Tax for the whole order
> totalAmount Total value of all items in cart
> currency ISO 4217 currency code
shippingAddress An object containing the shipping address of the customer.
> 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.
> addressLine1 Contains things like street name and house number.
> province Province, e.g. "DKI Jakarta"
> city city, e.g. "Kota Jakarta Utara"
> country County
> mobilePhoneNumber Customer's mobile phone number
> houseNumber House number
> addressLine2 Address line 2
> district District, e.g. "Penjaringan"
> zip Zip code
* 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.
* > 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.
* > addressLine1 Contains things like street name and house number.
* > province Province, e.g. "DKI Jakarta"
* > city city, e.g. "Kota Jakarta Utara"
* > country Country
* > mobilePhoneNumber Customer's mobile phone number
> houseNumber House number
> addressLine2 Address line 2
* > district District, e.g. "Penjaringan"
> zip Zip code
* consumerData An object containing data about the customer.
* > mobilePhoneNumber Customer's contact mobile phone number.
* > emailAddress Customer's contact email address.
> country Customer's ISO norm country code
> language Customer's contact email address.
> dateOfBirth Customer's date of birth in format DD/MM/YYYY
> gender Customer's gender
> ipAddress Customer's IP address. Used to increase security.
> name Concatenated customer full name: Firstname Lastname
> firstName Customer's first name
> lastName Customer's last name
additionalData An object that contains additional data.
> deliveryNote Here you can add as many keys and values as you want to help you track
> deliveryTime Expected delivery time
> deliveryTimeString deliveryTime formatted as string.
> deviceType You can use this to track the device of the user.
* shopConfig Your unique shopConfig, which is being used to authenticate you.
JumiaPay
We are processing your request
Please bear with us while we process your request. This may take up to 2 minutes so please do not refresh the page.