Skip to main content

Dealer Payment Refund

  • Endpoint: /vpws/payment/refund
  • HTTP Method: POST
  • Request Content-Type: application/json
  • Response Content-Type: application/json
  • Authorization: Valid AccessToken required.
    (See: 2. Authentication – Obtaining AccessToken)

Description

This service provides full or partial refund of a payment transaction previously performed via VPWS.

Refund

  • Can only be performed for successful (transactionStatusId = 1) transactions.
  • Is performed via referenceCode.
  • May result in success or failure depending on bank provision rules.

Note: A dealer can only create refund requests for transactions they have performed.

Header Information

Header NameRequiredDescription
AuthorizationYesBearer {AccessToken}
Content-TypeYesapplication/json

Request Body

FieldTypeRequiredDescription
referenceCodestringYesReference code of the transaction to be refunded
amountdecimalNoAmount to be refunded. If not sent, full refund is performed
reasonstringNoRefund reason (e.g.: "Product return")

Scenarios

  • Full Refund: amount field is not sent. The entire transaction amount is refunded.
  • Partial Refund: amount field is sent. Refund is made for the specified amount.
{
"referenceCode": "NTH2P00000002974",
"amount": 15,
"reason": "test refund"
}

data Fields

FieldTypeDescription
lastAmountnumberRemaining amount after refund
transactionStatusIdintCurrent transaction status
errorCodestring/nullError code
errorMessagestring/nullError message
isSuccessbooleanWhether the operation was successful

Example cURL

curl --location 'https://pgw.netahsilatdemo.com/vpws/payment/refund' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {AccessToken}' \
--data '{
"referenceCode": "NTH2P00000002974",
"amount": 15,
"reason": "test refund"
}'

Notes & Best Practices

  • The amount value cannot exceed the transaction amount.

  • Multiple partial refunds can be made for the same transaction; the total refund amount cannot exceed the transaction amount.

  • Refund may not be possible for transactions that have exceeded the bank refund period (e.g., 30 days).

  • Refund requests cannot be created for incomplete or failed transactions.

  • Current status after refund should be verified via the 3.4 – Transaction Query service.

  • A dealer can only apply refunds to their own transactions.