In order to begin your integration, you will first need to create an order from your server as shown in the diagram below. This section will cover this step of the integration.
- These API calls need to be made only from your server to the Nimbbl server.
- While developing your changes, use your Test Keys
The following will explain in detail how to go about creating an order:
Obtaining a Token
All Nimbbl APIs are authorized using Bearer Token
. In order to generate the token
, you need to pass the keys available with you (access_key
,access_secret
). While you are testing, please use your Test Keys and in the Live environment, please use the Live Keys.
The token
has a validity of 20 minutes and you need not create another token till this token has expired.
Method | End Point |
---|---|
POST | /v3/generate-token |
To read in detail about the request, response, sample payloads and error scenarios for this API, please click here.
Creating an Order
Creating an order is very simple as you need to pass all the information required by the Nimbbl API. The order API needs information about the following:
- Total Amount - This is the total amount inclusive of taxes for your entire cart amount
- Order Line Items - This contains the cart items so that they can be displayed on the checkout or cart based offers can be calculated. Showing cart items on checkout helps build trust for the customer
- User Details - Nimbbl helps to personalise the checkout for each user so sharing this information will help populate the UPI and BNPL apps that are used by the customer
- Invoice ID - This is your internal unique reference identifier for this order
Nimbbl enables you to create orders so multiple payments can be attempted by your customers for a single order in the case, the earlier attempts fail or stay pending.
The following endpoint creates an order:
Method | End Point |
---|---|
POST | /v3/create-order |
After the order is created, an order_id
and a token
is generated, this order_id
and token
will need to be provided by your server to your client so that payments can be collected for the order on the Standard Checkout.
To read in detail about the request, response, sample payloads and error scenarios for this API, please click here.
This token
generated in the create-order
API is valid for 20 minutes from the time of order creation. In case you want to load checkout later and/or want to load checkout again for an older order, you will have to generate the token
again using the refresh token API, which will be again valid for 20 minutes.
The refresh_token
received in the create-order
API is valid for 24 hours. Thus, you can launch the checkout only within 24 hours of order creation, post which the only way to launch checkout is to create new order.