Via Composer
$ composer config repositories.repo git [email protected]:tucuota/tucuota-php.git
$ composer require tucuota/tucuota-php
- Get your API_TOKEN in the following address:
- Production: https://tucuota.com/dashboard/developers
- Sandbox: https://sandbox.tucuota.com/dashboard/developers
use TuCuota\TuCuota;
// Use in sandbox (test mode)
$client = new TuCuota("REPLACE_THIS_FOR_YOUR_SANDBOX_API_TOKEN", "sandbox");
// Use in production
$client = new TuCuota("REPLACE_THIS_FOR_YOUR_API_TOKEN");
$request = $client->post('customers', [
"email" => "[email protected]",
"name" => "Juan Tile",
"metadata" => [
'external_id' => 51,
],
]);
var_dump($request);
$request = $client->get('customers');
var_dump($request);
$request = $client->get('customers/CSvQwEV56Dp2');
var_dump($request);
$request = $client->post('payments', [
"description" => "Pago único",
"customer_id" => "CSvQwEV56Dp2",
"payment_method_number" => "4024007127322104",
"amount" => 12000,
]);
var_dump($request);
$request = $client->get('payments');
var_dump($request);
$request = $client->get('payments/PYvQwEV56Dp2');
var_dump($request);
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.