LogoLogo
Access Portal
  • SanctusPay Documentation
  • Getting Started
    • Quickstart
  • Basics
    • Merchant Account
      • Registration
      • Application
      • Activation
    • Payment Processing
      • Transaction Concept
      • Operation Concept
    • Hosted Checkout Page
      • SanctusPay HCP
      • Technical Information
    • Plugins
      • Woocommerce
  • Developer
    • About
    • API reference
      • Auth
        • Token
      • Intents
        • Card
        • Payment
      • Transaction
      • Transactions
      • Refunds
    • Specification
Powered by GitBook
LogoLogo

Institutional

  • SanctusPay
  • SanctusPay Portal

@ 2025 SanctusPay

On this page

Was this helpful?

Export as PDF
  1. Developer
  2. API reference

Refunds

PreviousTransactions

Was this helpful?

Refund a Transaction

post

Initiates a refund for an already captured or settled transaction. Each refund is treated as a new transaction of type REFUND. Use GET /transactions to retrieve its details.

Authorizations
Body
external_idstringRequired

A unique identifier (e.g., UUID) for this refund in your system. Used for idempotency checks and correlating the refund internally.

Example: 496de72d-d4a4-45eb-b426-3d04d2078a85
trx_idstringRequired

The unique ID of the original PAYMENT transaction that you want to refund.

Example: trx_01J5XCMDXCFXCAQ1BV8HVG6644
amountintegerRequired

The amount to refund, in the smallest currency unit (e.g., cents for USD).

Example: 5000
Responses
200
Details of the new refund transaction.
application/json
post
POST /refunds HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "trx_id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "amount": 5000
}
200

Details of the new refund transaction.

{
  "id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
  "type": "PAYMENT",
  "status": "AUTHORIZED",
  "order_amount": 10000,
  "order_currency": "USD",
  "amount_authorized": 10000,
  "amount_captured": 1,
  "amount_voided": 1,
  "amount_refunded": 1,
  "external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
  "updated_at": "2024-09-05T05:05:25Z"
}