1. Go to this page and download the library: Download hotpayments/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hotpayments / php-sdk example snippets
otPayments\Hotpayments;
// Set your API key
Hotpayments::auth('your-api-key-here');
// Create a customer
$customer = Hotpayments::customers()->create([
'name' => 'John Doe',
'email' => '[email protected]',
'phone_number' => '1111111111',
'document' => '11111111111'
]);
// List customers with pagination
$customers = Hotpayments::customers()->list(['per_page' => 10]);
// Create a PIX QR Code transaction
$transaction = Hotpayments::transactions()->createPixQrCode([
'amount' => 100.50,
'customer_id' => 'customer-uuid-here',
'description' => 'Payment for services'
]);
// Check transaction status
$status = Hotpayments::transactions()->check('transaction-uuid-here');
Hotpayments::auth('your-api-key-here');
// Create a new customer
$customer = Hotpayments::customers()->create([
'name' => 'John Doe',
'email' => '[email protected]',
'phone_number' => '1111111111',
'document' => '11111111111'
]);
// List all customers with pagination
$customers = Hotpayments::customers()->list([
'per_page' => 15,
'page' => 1
]);