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_input_type string

    Possible values: [card_pan, merchant_network_token, nimbbl_token_id]

    This field specifies whether the transaction will be performed via plain card, network token or using nimbbl token


    card object

    This object will have the details of the plain card

    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

    expiry string

    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_holder_name string

    This is the name of the card holder, you should only pass this from your server if you are PCI-DSS certified

    cvv string

    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

    save_card boolean

    This is an optional field and will be used to create a card token for the card details passed in the payload. The saved card will be returned in the Payment modes API.

    card_label string

    This is an optional field used to provide the name for the saved card token

    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.

    device object

    These device details need to be shared mandatorily for card payments if your payment processor supports only 3ds2.0. If not passed, the payment may fail. These details need to be of the device on which the customer is making the payment. We recommend passing this for all payment methods.

    accept_header string

    This is the accept header indicating the content types that the client can process.

    user_agent string

    This is the user agent string of the browser making the request.

    browser_language string

    This is the language setting of the browser.

    browser_javascript_enabled boolean

    This is a flag indicating whether JavaScript is enabled in the browser.

    browser_java_enabled boolean

    This is a flag indicating whether Java is enabled in the browser.

    browser string

    This is the name of the browser.

    browser_tz string

    This is the timezone offset of the browser.

    browser_color_depth string

    This is the color depth of the browser screen.

    browser_screen_height string

    This is the screen height of the browser in pixels.

    browser_screen_width string

    This is the screen width of the browser in pixels.

    fingerprint string

    This is the fingerprint of the device used for identifying the device.

    ip_address string

    This is the IP address of the server from which the order is created.

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, succeeded, failed]

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

    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...