Initiate a Payment [v2]
This API helps you initiate a payment for the order that you have created. You need to call this API after your customer has chosen their payment mode and has provided all the information required to initiate the payment with that mode.
Request Body required
- Get the Nimbbl Public key for encryption. To get the Nimbbl public key reach out to us at
help@nimbbl.biz
. - Format the Card details in the format :
{"card_no":"4111111111111111","cvv":"123","card_holder_name":"test","expiry":"11/22"}
- Encrypt the above card details using the RSA encryption.
Possible values: [Credit Card
, Debit Card
, Prepaid Card
]
This is the payment mode chosen by the customer to pay for your order
This is the card number typically between 15-19 digits, you should only pass this from your server if you are PCI-DSS certified
This is a 3 or 4 digit number provided at the back of the card, you should only pass this from your server if you are PCI-DSS certified
Possible values: non-empty
This is the name of the card holder, you should only pass this from your server if you are PCI-DSS certified
This expiry date of the card, it should be of the current month or future. You should only pass this from your server if you are PCI-DSS certified
If you don't have PCI-DSS, you can always encrypt the card details on your client and send us the encrypted string in this key.
Steps for encryption
Possible values: [Wallet
, Netbanking
]
This is the payment mode chosen by the customer to pay for your order
This is the bank or wallet name as returned in the list of banks or wallet API
Possible values: [Freecharge
, PayTM
]
This is the payment mode chosen by the customer to pay for your order
The order_id for which the payment is being made
This is the URL to which the status of the transaction and the control will be redirected. The URL should be https. The URL is mandatory for certain payment modes such as Cards, Net Banking, Wallets, Payment Apps.
- 200
- 4XX
- 5XX
When the payment initiation is successful, the response will be as below
Schema
This is the http status code
This is the order passed in the request
This is the unique transaction id generated by Nimbbl for this payment
Possible values: [success
]
This is the status of the request
This a message explaining the status of the payment
The time in seconds it took for the transaction to be completed
extra_info object required
This object provides information regarding how to redirect the customer
The payment attempts that have been used against this order (duplicate key returned for some PSPs)
data object required
The payment attempts that have been used against this order
This is the url to which the customer should be redirected to complete the payment (duplicate key returned for some PSPs)
This is the url to which the customer should be redirected to complete the payment
This is the payment partner through which the payment will be processed
This always comes as redirect_url
info object required
The info object provides information on the next api call
Possible values: [/api/v2/transaction-enquiry
]
Mainly provides the enquiry url
request_args object
This contains the request params for the next api call
This is the order passed in the request
This is the unique transaction id generated by Nimbbl for this payment
This is the payment mode chosen by the customer to pay for this order
{
"status_code": 200,
"order_id": "o_9yo5wxlLlbJGK6dp",
"transaction_id": "o_9yo5wxlLlbJGK6dp-231210182525",
"status": "success",
"message": "Payment Initiated",
"completion_time": 35,
"extra_info": {
"attempts": 2,
"data": {
"attempts": 2,
"redirectUrl": "https://api.nimbbl.tech/api/v2/authenticate/U2FsdGVkX19wu46dd8e+EqTsZrCxieXc0bDPf16xn0bJG87yUWqzzur8nKqBaFhsd",
"redirect_url": "https://api.nimbbl.tech/api/v2/authenticate/U2FsdGVkX19wu46dd8e+EqTsZrCxieXc0bDPf16xn0bJG87yUWqzzur8nKqBaFhsd",
"payment_partner": "payu",
"action": "redirect_url"
}
},
"info": {
"url": "/api/v2/transaction-enquiry",
"request_args": {
"order_id": "o_9yo5wxlLlbJGK6dp",
"transaction_id": "o_9yo5wxlLlbJGK6dp-231210182525",
"payment_mode": "Credit Card"
}
}
}
When the payment initiation is not successful, the response will be as below
Schema
The HTTP error status
The message from the server explaining the error
error object
The HTTP error status
The message from the server explaining the error
This is the http status code
The transaction status
error object
The transaction status
The message from the server explaining the error
{}
When there is a problem on the server, the response will be as below
Schema
The HTTP error status
The message from the server explaining the error
{
"status": 500,
"error": "HTTP 500: Internal Server Error"
}