Create Payment Transaction
The merchant initiates a transaction which is a payment request sent to the user via mPay Server. The function returns the status of the transaction.
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
HTTP request URL for SHIFT
POST https://{hostname}/auth/realms/{tenantId}/mpower/v1/payment/transaction
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. |
idempotencyId | String | A random ID to verify and avoid duplicate transactions from the Merchant. |
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 | The ID of the Merchant/Distributor. |
amount | Integer | The total amount for payment. Total amount = shipping + tax + sum of all items in the order. |
currency | String | The currency code used for the transaction. E.g. USD, EUR, TRY |
paymentContent | String | Block of information which contains details about the order. |
referenceNumber | String | Merchant can add his own reference ID here. The default value is 'PayInvoice'. This is an optional parameter. |
Sample Request
{
"version": 1,
"idempotencyId": "<idempotencyId, optional, default- random UUID >",
"userId": "<userId>",
"merchantId": "<merchantId>",
"referenceNumber":"<referenceNumber,optional ,default -PayInvoice >",
"merchantServiceUUID": "<merchantServiceUUID>",
"merchantName": "<merchantName>",
"merchantCallback": "<Callback-URL>",
"transactionTimeout": 1,
"amount": 1300,
"currency": "TRY",
"paymentContent": [
[
{
"key": "Fatura Ödemesi",
"value": "12.03 TRY"
}
]
]
}
Response
Field Name | Type | Description |
---|---|---|
transactionId | String | Unique ID corresponding to the transaction. |
transactionStatus | String | Status of the transaction. |
transactionMessage | String | Briefing on the transaction status. |
Sample Response
{
"transactionId": "string",
"transactionStatus": "string",
"transactionMessage": "string"
}