Skip to main content

Initiate a Payment [v3]

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
    order_id string required

    The order_id for which the payment is being made

    payment_mode_code string required

    This is the payment mode code chosen by the customer to pay for your order


    card_no string

    This is the card number typically between 15-19 digits, you should only pass this from your server if you are PCI-DSS certified

    cvv integer

    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

    card_holder_name string

    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

    expiry mm/yy

    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

    card_details string

    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

    1. Get the Nimbbl Public key for encryption. To get the Nimbbl public key reach out to us at help@nimbbl.biz.
    2. Format the Card details in the format : {"card_no":"4111111111111111","cvv":"123","card_holder_name":"test","expiry":"11/22"}
    3. Encrypt the above card details using the RSA encryption.
    callback_url string required

    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.

Responses

When the payment initiation is successful, the response will be as below


Schema
    order_id string required

    This is the order passed in the request

    transaction_id string required

    This is the unique transaction id generated by Nimbbl for this payment

    payment_status string required

    Possible values: [pending, new]

    This is the status of the payment transaction that was just generated, it will be new or pending

    message string required

    This a message explaining the status of the payment

    next object[] required

    The next array provides a recommendation for the next API call to be made, where multiple options are available, all of these are provided

  • Array [
  • anyOf

    action string required

    Possible values: [redirect]

    To complete the payment, you will need to redirect your customer to the URL provided here. For most payment modes such as Cards, Net Banking, Wallets this is the only way to complete the payment as the user needs to be redirected to the payment page of the bank or wallet provider. To ease your integration, Nimbbl lets you use the redirect action for all other payment modes as well. However, wherever there are other native methods for completing the payment, those options will also come as part of the next array.

    url string required

    This is the end point of the API that needs to be called for the above action.

  • ]
Loading...