Refund Payment Transaction
The merchant can initiate refund for an already processed transaction using this function.
Resource Informations
Name | Value |
---|---|
Requires authentication? | Yes |
Rate limited? | No |
Request
Request headers
Name | Value |
---|---|
Authorization | Bearer token |
Content-Type | application/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 Name | Type | Description |
---|---|---|
version | Integer | Inner parameter for communication with SCP. |
userId | String | Unique ID of the user that is involved in the payment process. |
merchantServiceUUID | String | Unique UUID of the Service which is also the clientid from mID. Provided by mID. |
merchantCallback | String | Callback URL to notify the Merchant about the status of the transaction. This URL also contains the OrderID generated by the Merchant for correspondence. |
transactionTimeout | Integer | Lifecycle of the transaction in seconds. |
merchantId | String | ID of the Merchant/Distributor. |
merchantUserId | String | The UUID of the user. |
paymentTransactionId | String | The unique ID of the payment transaction to be cancelled. |
cancellationMessage | String | Reason for cancellation. |
amount | Integer | The amount to be refunded. |
currency | String | The 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 Name | Type | Description |
---|---|---|
refundTransactionId | String | Unique ID corresponding to the payment refund transaction. |
paymentTransactionId | String | The unique ID of the payment transaction to be cancelled. |
transactionStatus | String | Status of the transaction. |
transactionMessage | String | Briefing on the transaction status. |
Sample Response
{
"refundTransactionId": "05c10740-909a-43d6-957e-e3cdf705af7b",
"paymentTransactionId": "37d1adfa-f5fc-48f5-87b8-68c12c86e0fc",
"transactionStatus": "new",
"transactionMessage": "Refund created"
}