Developers
REST API
GuidesErrorsLogin
Get API Keys
API Navigation
  • Overview
  • Quick start
  • Authentication
  • Collect a payment
  • Payment status
  • Refunds
  • Testing
  • Production
  • Security
API reference
  • Create API keys POST
  • List API keys GET
  • Get API key GET
  • Delete API key DEL
  • Collect with MTN POST
  • MTN payment status GET
  • Collect with Airtel POST
    Create and pay
  • Create order POST
  • Order fee POST
  • Pay order with card POST
  • Pay order with bank POST
  • Status and verify
  • Order status POST
  • Verify order POST
  • Cards and tokens
  • Save card POST
  • Tokenize charge GET
  • Refunds
  • Refund order POST
  • Lists and stats
  • List orders GET
  • Get order GET
  • List banks GET
  • Order stats GET
  • List transactions GET
  • Get transaction GET
  • Transaction statuses GET
Errors and limits
  1. Docs
  2. Guides
  3. Refunds

Refunds

A complete guide to processing full and partial refunds for TransactPay orders, understanding eligibility criteria, and handling mobile money disputes.

Refund Capabilities by Payment Channel

Ziba Pay allows merchants to reverse settled card and bank transfer orders directly through the REST API. Automated refunds are powered through TransactPay via POST/payment/zibapay/order/refund/:reference.

Mobile Money (MTN & Airtel) Reversals: Telecom mobile money networks do not currently offer an automated merchant-initiated refund API endpoint. To reverse or dispute a Mobile Money transaction, contact Ziba Pay Merchant Support with the transactionReferenceId for a manual carrier review.

ChannelRefund MethodPartial RefundsSettlement Window
Card Payments (TransactPay)POST/payment/zibapay/order/refund/:referenceSupported (Amount <= unrefunded balance)3 to 7 business days to customer card account
Bank Transfers (TransactPay)POST/payment/zibapay/order/refund/:referenceSupported (Amount <= original total)1 to 3 business days to customer bank account
MTN Mobile MoneyManual carrier dispute via Ziba Pay SupportHandled on case-by-case basisSubject to telecom carrier dispute investigation
Airtel MoneyManual carrier dispute via Ziba Pay SupportHandled on case-by-case basisSubject to telecom carrier dispute investigation

Request Parameters & Schema

Refund requests require an authenticated merchant session bearer token. Note that the request body parameters use PascalCase (Reason and Amount) to match the backend controller specifications:

ParameterLocationTypeRequiredDescription
referenceURL PathstringYesThe unique order reference assigned during order creation.
ReasonJSON BodystringYesHuman-readable justification for the refund (e.g. 'Customer cancellation', 'Defective merchandise').
AmountJSON BodynumberYesThe monetary amount to refund. Must not exceed the remaining settled order amount.
cURL — Process Order Refund
curl -X POST "https://payment-service-mh2d.onrender.com/api/payment/zibapay/order/refund/clxorderreference123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <merchant_token>" \
  -d '{
    "Reason": "Customer requested full order cancellation",
    "Amount": 1000
  }'

Preconditions & Eligibility Rules

Before issuing a refund, verify that your request satisfies the following platform rules:

  • Order Status: The order must currently be in COMPLETED status. In-flight (PENDING) or previously FAILED orders cannot be refunded.
  • Available Merchant Balance: The merchant account must have sufficient available balance to cover the refunded amount and any applicable provider fees.
  • Maximum Amount: The Amount specified cannot exceed the original captured order amount minus any prior partial refunds.
  • Session Authorization: Requests must carry an active merchant Authorization: Bearer <token>.

Error Handling & Response Codes

When executing refunds, anticipate and handle the following HTTP status outcomes:

HTTP CodeMeaningCommon CauseRemediation
200 OKRefund AcceptedRefund successfully recorded with upstream provider.Update local database to REVERSED.
400 Bad RequestValidation ErrorMissing Reason, invalid Amount, or order is not COMPLETED.Check payload fields and order state.
401 UnauthorizedAuthentication FailureBearer token missing or expired.Refresh merchant session token.
404 Not FoundOrder Not FoundOrder reference does not exist or belongs to another merchant.Verify reference spelling.
500 Internal ErrorUpstream FailureTransactPay bank network gateway error.Retry after 30 seconds with exponential backoff.

Related

Refund orderOrder statusCreate order
Was this page helpful?

Let us know how we can make our API documentation better.

PreviousPayment status
NextTesting