Skip to main content

Refund Payment Transaction

The merchant can initiate refund for an already processed transaction using this function.

Resource Informations

NameValue
Requires authentication?Yes
Rate limited?No

Request

Request headers

NameValue
AuthorizationBearer token
Content-Typeapplication/json

HTTP request URL for SSMS

POST https://{tenantId}.{hostname}/digitanium/v3/mpower/payment/transaction/refund

HTTP request URL for SHIFT

POST https://{hostname}/auth/realms/{tenantId}/mpower/v1/payment/transaction/refund
note

API requests must be made over https. Calls made over plain http will fail.

Request body

Field NameTypeDescription
versionIntegerInner parameter for communication with SCP.
userIdStringUnique ID of the user that is involved in the payment process.
merchantServiceUUIDStringUnique UUID of the Service which is also the clientid from mID. Provided by mID.
merchantCallbackStringCallback URL to notify the Merchant about the status of the transaction. This URL also contains the OrderID generated by the Merchant for correspondence.
transactionTimeoutIntegerLifecycle of the transaction in seconds.
merchantIdStringID of the Merchant/Distributor.
merchantUserIdStringThe UUID of the user.
paymentTransactionIdStringThe unique ID of the payment transaction to be cancelled.
cancellationMessageStringReason for cancellation.
amountIntegerThe amount to be refunded.
currencyStringThe currency code of the payment region.

Sample Request

{
"version": 1,
"userId": "<User-ID>",
"merchantServiceUUID": "<merchantServiceUUID>",
"merchantCallback": "<Callback-URL>",
"transactionTimeout": 60,
"merchantId": "<merchantId>",
"merchantUserId": "<Merchent-UserID>",
"paymentTransactionId": "<Payment-TransactionID>",
"cancellationMessage": "<Cancellation-Message>",
"amount": 1300,
"currency": "TRY"
}

Response

Field NameTypeDescription
refundTransactionIdStringUnique ID corresponding to the payment refund transaction.
paymentTransactionIdStringThe unique ID of the payment transaction to be cancelled.
transactionStatusStringStatus of the transaction.
transactionMessageStringBriefing on the transaction status.

Sample Response

{
"refundTransactionId": "05c10740-909a-43d6-957e-e3cdf705af7b",
"paymentTransactionId": "37d1adfa-f5fc-48f5-87b8-68c12c86e0fc",
"transactionStatus": "new",
"transactionMessage": "Refund created"
}