The payment made through TAMI can be canceled on the same day (before the end of the day). In order to cancel, the order number (orderId) of the payment must be sent. Sending the amount and reason is not mandatory. If the cancellation is successful, the canceled amount will be returned from the service.
You can access the Sandbox Test Portal at https://sandbox-portal.tami.com.tr. When you log in to the test portal using a test user account, you can view the transactions performed by the merchant associated with that user. These transactions can also be cancelled or refunded. To obtain the test user credentials, please contact TeknikDestek@tami.com.tr.
The request sent for many transaction types should include the PG-Auth-Token in the header information. The PG-Auth-Token consists of the values "MerchantNumber:TerminalNumber:Hash".
When calculating the hash here, the merchantNumber, terminalNumber, and secretKey information belonging to the merchant are hashed with sha256 and converted to a string.
You can access the Tami test portal at https://sandbox-portal.tami.com.tr. From this address, you can view the portal screen with the users specified above.
For your production environment information you can become a member at https://portal.tami.com.tr or You can apply to the e-commerce support unit.
The URL "https://sandbox-paymentapi.tami.com.tr/api/v0/payment/refund" will be used for refund operations in the test environment.
The URL "https://paymentapi.tami.com.tr/api/v0/payment/refund" will be used for cancellation operations in the production environment.
| Field | Format | Maximum Size | (O)psiyonel / (M)andatory | Description |
|---|---|---|---|---|
| orderId | String | (2-36) | M | Is the order number of the sales transaction to be canceled. |
| reason | String | 150 | O | The reason for cancellation must be provided. |
| securityHash | String | M | It is the value expected to be calculated and transmitted according in the document. If it is missing or incorrect, the transaction is not routed to the bank, an error is given. |
| Parametre Adı | Format | Açıklama |
|---|---|---|
| success | String | Reports the result of the operation. True indicates the operation was successful; False indicates it failed. |
| currency | String | This is the currency code information for the successfully cancelled transaction. |
| orderId | String | Order number for the sales transaction |
| amount | Number | It is the amount information of the successfully cancelled transaction. |
| systemTime | DateTime | It is the time the transaction takes place. |
| transactionDate | DateTime | Satış işleminin gerçekleşme zamanının blgisidir. |
| correlationId | String | It is the transaction number value sent by the merchant in the cancellation request. |
| errorCode | String | Sent if the operation fails. Includes error code information. |
| errorGroup | String | It indicates the group of the relevant error. Businesses can manage their own internal rules by utilizing error codes and error groups. |
| errorMessage | String | Sent if the operation fails. Contains the error message. |
| securityHash | String | This is the value used to verify that the result of the operation originates from the correct source. The document specifies how it should be calculated. |
| bankAuthCode | String | Banka Onay Kodu |
| bankReferenceNumber | String | The reference number for the transaction returned by the bank. |
You can use the documentation here to calculate the securityHash field in service requests and incoming service responses.
You can access the list of error codees on this page.
You can access the list of test cards on this page.