ZEN API documentation
Go to zen.comGo to myZEN.com
Documentation
  • Plugin integration
  • Checkout integration
  • API reference
  • Merchant panel
  • Brandbook
Go to zen.comGo to myZEN.com
Documentation
  • Plugin integration
  • Checkout integration
  • API reference
  • Merchant panel
  • Brandbook
  1. Integration
  • About ZEN
    • First steps with ZEN
    • Who we are
    • What we provide
    • How we provide
  • Introduction
    • Definitions
    • About API integration
    • Revenue strams
    • Environments
    • Authorization & Authentication
    • Payment methods
    • Payment process
    • Currencies
    • Languages
  • Account registration & configuration
    • Before you begin
    • Registration
    • Configuration
    • Merchant's panel
    • Payments setup
    • Locating Transactions in my.zen.com
    • Finding settlements
  • Features
    • Available features
    • 3-Domain Secure (3DS)
    • Account Funding Transactions (AFT)
    • Address Verification Service
    • Authorization fee
    • Card widget
    • Cashback
    • Currency Conversion Service
    • Fraud collector (fingerPrintId)
    • Instant Payment Notification (IPN)
    • Payment Link
    • Shop logo on ZEN.COM checkout
    • Reports
  • Integration
    • Response codes
    • Error codes
    • Prepare the communication
    • Available Payment methods
    • Purchase Transaction
    • Refund Transaction
    • Payout Transaction
    • Transaction status check
    • Saving and tokenizing cards
    • One-click card Payments
    • One-click Google Pay Payments
    • One-click Apple Pay Payments
    • Customers and cards management
  1. Integration

Refund Transaction

integration code.jpg
The Merchant's Shop, when initiating a refund Transaction, sends in POST message the mandatory and optional parameters to the ZEN.COM Payment system in request to process the Transaction and then return the Payment status in response. It is possible to process full refund and partial refunds. One refund can be active at a time for specific Transaction.
INFO
1.
Refund process is available when the parent Transaction has accepted status.
2.
The Merchant must have sufficient funds in ZEN.COM account to process refund Transactions.
3.
The refund amount cannot exceed the value of the original purchase Transaction.
4.
Funds received from a purchase Transaction cannot be entirely refunded if total Transaction value have already been returned.
CAUTION
Not all Payment channel supports refunds or partial refunds. Please go to the Payment methods page to find more information where the refund process is available.
To Create the refund Transaction
1
Create a POST request
CAUTION
Request header with Authorization parameter is obliged for all requests sent to ZEN.COM API. Authorization value is the Terminal API key parameter you can find in your my.zen.com Merchant portal.
Create a POST request as shown in Prepare the communication chapter.
CAUTION
Make sure to use all required parameters and objects listed below.
Required parameters:
Header:
FieldTypeDescription
request-idstringA unique identifier generated by requesting Merchant.
Body:
FieldTypeDescription
amountStringAmount of the Transaction.
transactionIdStringTransaction Id generated during create purchase Transaction process.
currencyStringCurrency code in ISO 4217 alphabetic code. Currency code should be the same as in purchase Transaction.
merchantTransactionIdStringOrigin Id of the transaction provided by Merchant.
source.channelStringDefault to PTS_ZEN_API
💡
Example of JSON
{
"comment":"Product failure",
"amount":"123.45",
"transactionId":"43d435a2-1abc-4321-8fd1-432148712345",
"currency":"USD",
"merchantTransactionId":"99beb187-f8a3-99b8-9ef8-b31180358dd3",
"originMerchantTransactionId":"99beb187-f8a3-99b8-9ef8-b31180358dd3",
"source":{
"channel":"PTS_ZEN_API"
}
}
2
Send the request
Send the POST request to:
1.
test environment: https://api.zen-test.com/v1/transactions/refund
2.
production environment: https://api.zen.com/v1/transactions/refund
3
Receive the ZEN.COM response
Receive the ZEN.COM response.
💡
Example of JSON response
{
 "id":"497f6eca-6276-4993-bfeb-53cbbbba6f08",
 "parentTransactionId":"43d435a2-1abc-4321-8fd1-432148712345",
 "merchantTransactionId":"99beb187-f8a3-99b8-9ef8-b31180358dd3",
 "originMerchantTransactionId":"99beb187-f8a3-99b8-9ef8-b31180358dd3",
 "amount":"123.45",
 "currency":"USD",
 "authorization":{
    "amount":"123.45",
    "currency":"USD"
 },
 "createdAt":"2024-12-30T20:48:22.123Z",
 "modifiedAt":"2024-12-30T20:48:22.123Z",
 "type":"TRT_REFUND",
 "status":"ACCEPTED",
 "paymentChannel":"PCL_CARD"
}
Modified at 2025-01-21 14:14:41
Previous
Purchase Transaction
Next
Payout Transaction