PayTo Refunds via NPP

DEVELOPER GUIDE

PayTo Refunds via NPP

This article will guide you on how to process a PayTo refund via NPP.


  • Refunds can be made against settled PayTo payments.
  • Funds will be debited from the nominated Zepto float account and returned to the BBAN or PayID specified in the original PayTo agreement from which funds were collected.

Overview

When a dispute is raised by the bank, Zepto creates the investigation, notifies your platform, and requests merchant action.

Warning

Make sure you submit evidence before the due date. Missing the deadline may result in the case being closed or rejected.

Success

Once accepted, the action request is completed and the dispute workflow progresses accordingly.

Important

Rejecting an action request without the correct review may cause avoidable operational issues.

Tip

Retrieve the investigation first, then inspect the active action request so you can present the right next step to your merchant.


Creating a PayTo Refund

When initiating a PayTo refund, you'll need to specify the following request parameters:

ParameterDescription
uid* (required)Supplied 64-character unique identifier for the refund request. This identifier ensures payment uniqueness between integrator systems and Zepto.
original_payment_uid* (required)The unique PayTo Payment UID to validate and process the refund against.
refund_payment: type* (required)
  • float_bank_payment* is currently the only valid value. This tells our system to debit the float account.
refund_payment: float_bank_account_id* (required)The ID of the Zepto float account to be debited.
refund_payment: amount* (required)The amount (in cents) to be refunded.
refund_payment: description* (required)

MUST start with the word REFUND.

Free-form text for the matching/reconciliation of a transaction. This can be shown on both parties' bank statements.

ASCII-printable characters and unicode emojis are accepted.


Initiating a PayTo Refund

This example demonstrates a refund against a settled PayTo payment.

Endpoint

POST payto/refunds

{
  "uid": "refund-uid-3",
  "original_payment_uid": "biz_payment_000123",
  "refund_payment": {
    "type": "float_bank_payment",
    "float_bank_account_id": "fgbq8046-fud2-25af-82c0-yb967539f100",
    "amount": 42,
    "description": "REFUND : Partial refund for Zeptinghouse Smart Fridge 300L"
  }
}
{
    "data": {
        "uid": "refund-uid-3",
        "original_payment_uid": "biz_payment_000123",
        "refund_payment": {
            "type": "float_bank_payment",
            "float_bank_account_id": "fgbq8046-fud2-25af-82c0-yb967539f100",
            "amount": 42,
            "description": "Partial refund for Zeptinghouse Smart Fridge 300L"
        },
        "state": "created",
        "failure": null,
        "created_at": "2024-09-09T10:40:40+10:00",
        "links": {
            "self": "https://api.sandbox.zeptopayments.com/payto/refunds/refund-uid-3",
            "payment": "https://api.sandbox.zeptopayments.com/payto/payments/biz_payment_000123"
        }
    }
}
{
    "errors": [
        {
            "title": "Request body is not valid JSON",
            "detail": "Error occurred while parsing request parameters"
        }
    ]
}
{
    "errors": [
        {
            "code": "ZPREF06",
            "title": "Total refunds greater than original payment amount",
            "detail": "The sum of all refunds is greater than the original payment"
        }
    ]
}

Response

Upon submission, a synchronous response will show one of the following:

  • Successful: 200 response
  • Failed:
    • 400: Bad request
    • 422: Unprocessable entity

Webhook

Note: Webhooks are only available for PayTo refund requests that have received a 201 response from Zepto (i.e. successful request).

{
  "data": {
    "id": "0191d43f-c47b-d0b0-b9bf-375bd0c54535",
    "body": null,
    "type": "payto_refund.processed",
    "published_at": "2024-09-09T10:47:14.555+10:00",
    "resource_uid": "refund-uid-3",
    "resource_type": "payto_refund",
    "resource_metadata": {}
  },
  "links": {
    "resource": "https://api.sandbox.zeptopayments.com/payto/refunds/refund-uid-3"
  }
}
{
  "data": {
    "id": "0191d452-193e-0429-bbe9-52686827cf95",
    "body": {
      "failure": {
        "code": "AC07",
        "title": "Closed Creditor Account Number",
        "detail": "The Payee Customer account is closed"
      }
    },
    "type": "payto_refund.failed",
    "published_at": "2024-09-09T11:07:15.902+10:00",
    "resource_uid": "refund-uid-6",
    "resource_type": "payto_refund",
    "resource_metadata": {}
  },
  "links": {
    "resource": "https://api.sandbox.zeptopayments.com/payto/refunds/refund-uid-6"
  }
}

Notable Webhook Fields


type

payto_refund.processed

payto_refund.failed

resource_uidThe unique identifier of the refund
resource_typepayto_refund

Simulations

A special Sandbox testing object is available to simulate outcomes.

Available simulations:

  • creditor_alias_not_found
  • payment_rejected
  • success

Simulation Attribute Sample

"sandbox": {
  "simulate": "success"
}

Did this page help you?