All or part of the payment made through TAMI can be refunded. In order to make a refund, the order number (orderId) of the payment must be sent. It is not mandatory to send the amount and reason. If the amount is not entered, the full amount of the original order will be refunded. If the refund is successful, the refunded amount is 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.
In test environment, the "https://sandbox-paymentapi.tami.com.tr/payment/reverse" URL will be used.
In production environment, the "https://paymentapi.tami.com.tr/payment/reverse" URL will be used.
| Field | Format | Max Size | (O)psiyonel / (M)andatory | Description |
|---|---|---|---|---|
| orderId | String | (2-36) | M | Is the order number of the sales transaction to be canceled. |
| amount | Decimal | O | It is used for partial refund requests. It should be sent when you want to return a certain part of the transaction, not the whole transaction. If empty, it takes the value of the order. The fraction separator must be made with a period (.). | |
| reason | String | 150 | O | Reason for Reverse/Refund |
| 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. |
| Field | Format | Description |
|---|---|---|
| success | String | Reports the result of the operation. If True, the operation succeeds, if False, the operation fails. |
| currency | String | The foreign currency code of the successful canceled/refunded transaction. |
| amount | Number | The foreign currency code of the successful canceled/refunded transaction. |
| systemTime | DateTime | Time of transaction execution |
| correlationId | String | The transaction number value sent by the merchant in the cancellation/refund request. |
| errorCode | String | This parameter is passed if the operation fails. Error code information. |
| orderId | String | Order number |
| errorMessage | String | This parameter is passed if the operation fails. Error message information. |
| securityHash | String | It is the value expected to be calculated and transmitted according to the fields specified in the document. If it is missing or incorrect, the transaction is not routed to the bank, an error is given. |
| bankAuthCode | String | Bank Confirmation Code |
| bankReferenceNumber | String | Retref number for the transaction |
| errorGroup | String | Shows the group of the relevant error. Businesses can manage their own rules using error codes and error groups. |
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.