Eko Platform Services Logo

    POSTInitiate Refund

    Refund a failed transaction to the customer after OTP consent.

    POST/customer/payment/refund/{tid}

    Refunds the e-value for a failed transaction back to your account, acting as consent that you have returned the cash to the customer. Requires the OTP (and otp_ref_id) from Get Refund OTP. Returns the financial response envelope with the refund transaction id and reversed amounts.

    Path parameters

    tidstringRequired

    Transaction ID from the Initiate Transaction call.

    example: 13192443

    Body parameters

    initiator_idstringRequired

    Registered mobile number of the API user (see Platform Credentials).

    example: 9962981729

    user_codestringRequired

    User code of the retailer/agent the service is run for.

    example: 20810200

    otpintegerRequired

    OTP sent to the customer's mobile number.

    example: 123456

    otp_ref_idstringoptional

    otp_ref_id received from Get Refund OTP.

    example: zCISyglexo0Pjqp4YrS2ssweuD9v1c3aLKGxjTW8wU7An8Wem1UyNws5830yh7q/sf5J4R3BY=

    service_codeintegeroptional

    Fixed service code. For PayPoint send 80.

    example: 80

    stateintegeroptional

    Fixed value. Send 1.

    example: 1

    Headers

    developer_keystringRequired

    Static API key issued to your account after KYC.

    secret-keystringRequired

    Dynamic per-request signature: base64(HMAC-SHA256(timestamp, base64(access_key))).

    secret-key-timestampstringRequired

    Current time in milliseconds since UNIX epoch, used to compute secret-key. Must match server time.

    content-typestringRequired

    application/json

    example: application/json

    Responses

    • statusnumber

      Primary success indicator (0 = success).

    • messagestring

      Human-readable response / error message.

    • response_status_idnumber

      Granular status id; see the shared error-codes table.

    • response_type_idnumber

      A unique id for every possible response shape (success or error) — useful for client logic branching and analytics.

    • tx_statusstring

      Transaction state: 0=Success, 1=Fail, 2=Awaited, 3=Refund Pending, 4=Refunded, 5=On Hold.

    • txstatus_descstring

      Human-readable transaction status.

    • dataobject

      API-specific response payload.

      • refund_tidstring

        Transaction ID of the refund.

      • refunded_amountstring

        Total amount refunded (INR).

      • amountstring

        Original transaction amount (INR).

      • feestring

        Fee reversed (INR).

      • balancestring

        Account balance after the refund (INR).

      • tidstring

        Original transaction ID.