Skip to main content

Complete a Payment [v3]

This API helps you complete a payment that you have already initiated. You need to call this API typically to submit an otp or a token to complete the payment. Currently this API is used only for certain Pay Later providers where you want to provide a native otp experience.

Request Body required
    transaction_id string required

    The transaction_id for which the payment needs to be completed, this should be the same as returned in the response of initiate payment

    payment_flow string required

    Possible values: [otp, auto_debit]

    There are two ways to complete the payment flow, either by the customer submitting an otp or without any consumer action when an auto_debit token exists for the user. The flow to be sent here will come in the response of v3/initiate-payment API. If the flow is otp, you will need to provide an OTP entry screen for your customer.

    otp string nullable

    This is the OTP that is sent to the customer to authenticate the transaction. You need to pass it when the payment_flow is otp

    encrypted_otp string nullable

    You can always encrypt the OTP on your client and send us the encrypted OTP 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 : {"otp":"123233"}
    3. Encrypt the above card details using the RSA encryption.
Responses

When the payment completion request is successful, the response will be as below


Schema
    transaction_id string required

    This is the transaction id passed in the request

    payment_status string required

    Possible values: [succeeded, pending, failed]

    This is the current status of the payment transaction

    message string required

    This a message explaining the status of the payment

    base64_message string required

    This is base64 encoded version of the Nimbbl response. You will need to decode this and take out the nimbbl_signature

    error object nullable

    If the payment has failed, you can get the reason for failure from the error object

    nimbbl_error_code string required

    This is the error_code generated by Nimbbl

    nimbbl_consumer_message string required

    This is a customer friendly message that can be displayed to your consumer or shared by your customer service agent to the customer

    nimbbl_merchant_message string required

    This explains to your team how to recover from the error

    retry_allowed boolean required

    This field suggests whether a retry should be allowed for the customer using the same payment mode.

    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 [
  • action string required

    Possible values: [payment_enquiry]

    If you don't get the final status of the payment transaction, you can always query the latest transaction status by doing an enquiry.

    url string required

    Possible values: [/api/v3/transaction-enquiry]

    This is the end point of the API that needs to be called for the above action, you will need to append the baseurl as provided in this doc

  • ]
Loading...