Skip to main content

API Guide#

Table of Contents#

Webhooks Notifications#

Payment Notifications#

To receive a payment status notification (i.e., payment settlement or cancellation confirmation), you need to first configure the webhook url in your Console.

See below the flow of a notification:

And here is an example of a notification payload:

{
"id": 21636,
"paymentKey": "134641C000053BB",
"partnerUniqueId": "22193",
"statusId": "P",
"amount": 65.97,
"operationId": "O0002134641C000063D3",
"methods": [
{
"methodType": "D",
"status": "C",
"methodId": 0,
"operationAmount": 65.97
}
],
"items": [
{
"paymentItemId": 0,
"productID": 11,
"productDescription": "Pizza",
"amount": 21.990000,
"quantity": 3,
"categoryID": 0,
"data": {
"ProductID": 11,
"CategoryID": 0
}
}
]
}

Parameters description:

PropertyDescription
idThe ID of the notification
paymentKeyThe unique transaction ID generated by Tuna
partnerUniqueIdThe ID used by the partner to identify the transaction
statusIdThe new status of the transaction
amountThe full amount of the transaction
operationIdThe ID of the operation (informed, e.g., in a cancellation request)
methodsThe list of payment methods used for this transaction
itemsThe list of payment items

See more details about the properties in the response object of the endpoint api/Payment/Init/.

Resources#

  • API Guide: are you looking for a guide for our APIs? Check out the introduction to the API Guide.

  • Payment Integration: do you need to be able to perform secure credit card payments and/or also use other payment methods such as Debit Card, Boleto, PIX, Bitcoin? Checkout how to perform a Payment Integration with our Payment API and Token API.

  • Split Integration: are you looking to set up a marketplace, so your merchants will use split payment solutions in your marketplace? Check out how to perform a Split Integration with our Merchant API.

  • Tuna Codes: do you need to learn about your codes and status? Please, check out the Tuna Codes.

  • Webhooks Notifications: learn more about our notifications in the guide Webhooks Notifications.

  • Sandbox Environment: check out for information about test data and a full description of the Sandbox Environment.

  • Idempotent Requests: do you require idempotent requests? Take a look how to make Idempotent Requests.