Skip to main content

Refund a Payment [v3]

This API lets you refund a successful payment transaction. This will result in the amount requested by you in the API call returned to the customer in the payment mode they had originally used. Refund transactions once requested cannot be rolled back so you should be very sure of the amount.

Request Body required
    transaction_id string nullable

    This is the Nimbbl provided transaction_id. You would have received this when you initiated a payment and subsequently in other API responses as well. You need to either provide the transaction_id or the invoice_id

    refund_amount number nullable

    This is the amount that you want to refund. If you want to refund the entire payment amount, you need not send the amount explicitly. However, for partial refunds, you have to send the amount

    invoice_id string nullable

    This is the unique reference with which you had created an order. You can also pass this to initiate a response if you don't have the Nimbbl transaction_id. You need to either provide the transaction_id or the invoice_id

    refund_request_id string nullable

    This is the unique identifier that can be sent to identify refund requests. It helps in avoiding incorrect multiple partial refunds. If passed then it will be used to validate if another refund request for the same id is not succeeded or pending

Responses

When the refund request is accepted for processing, the response will be as below


Schema
    orignal_payment_transaction_id string required

    This is the transaction_id of the payment transaction that is being refunded

    transaction_id string required

    This is the unique transaction_id generated for this refund transaction

    refund_request_id string nullable

    This is the refund_request_id provided in the request

    refund_status string required

    Possible values: [new, pending, succeeded, failed]

    This is the status of the refund transaction

    refund_arn string nullable

    This is the bank or acquirer reference number for the refund. Only available for succeeded refunds, though not available in real time. Your customer can provide this reference number to their bank to check if refund is yet to be credited in their account

    transaction_type string required

    Possible values: [partial_refund, full_refund]

    This is the type of refund that has been accepted for processing

    error object nullable

    If the refund 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.

    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: [refund_enquiry]

    If you don't get the final status of the refund 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...