Skip to main content

Table of Contents#

Sandbox Environment#

You can use the Tuna APIs in sandbox mode, which does not affect your live data or interact with the banking networks.

The API server and keys you use for the request determines whether the request is production mode or sandbox mode. Sandbox Servers:

https://sandbox.tuna-demo.uy/
https://token.tuna-demo.uy/

You can find the public keys for the sandbox environment here:

"x-tuna-account": "demo"
"x-tuna-apptoken": "a3823a59-66bb-49e2-95eb-b47c447ec7a7"
Production Keys

Your first secrets are provided when you sign up for an account: account name and app token. You can generate additional API keys and delete API keys (as you may need to rotate your keys in the future).

You authenticate to Tuna APIs by providing your account name and app token key in the request HTTP headers. Here is a sample base request:

curl -X 'POST' \
'https://sandbox.tuna-demo.uy/api/' \
-H 'accept: application/json' \
-H 'x-tuna-account: demo' \
-H 'x-tuna-apptoken: a3823a59-66bb-49e2-95eb-b47c447ec7a7' \
-H 'Content-Type: application/json'

Test Data#

Sandbox Examples

Check out exemplary sandbox requests and responses for the endpoint /api/payment#operation/Init. You can find them on the right side of the page. They are described with the title: Dummy {CardHolderName} (Credit Card), where {CardHolderName} verifies for all possible alternatives.

See below the test data that you can use and the expected result for each of them:

Card NumberResult
4111111111111111It varies according to the card holder name
5555555555554444It varies according to the card holder name
Card Holder NameResult
AuthorizedTransaction Authorized
CapturedTransaction Captured
Not AuthorizedTransaction Not Authorized
ErrorTransaction Error
InvalidConfiguration Error
PendingTransaction Capture Pending
ExpiredTransaction Expired

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.