Introduction
What is XGate?
XGate is a modern and powerful solution for payments and financial conversions, designed to facilitate and automate transactions via PIX and cryptocurrencies. With a robust API, it's perfect for developers who want to quickly integrate financial functionality into their applications.
Features
- Instant PIX processing;
- Automatic FIAT to Crypto currency conversion
- Deposits and withdrawals supporting BRL, USDT and USDC
- Real-time monitoring with advanced dashboard
Official Packages
To simplify and accelerate your integration with the XGATE API, we offer official Development Packages (SDKs).
Instead of having to manually build each HTTP request, manage authentication tokens, and format the body of each call, our packages do all the heavy lifting for you.
Just install the package corresponding to your language and call the pre-built functions.
- NPM (for JavaScript/Node.js)
- Composer (for PHP)
What is the NPM package?
NPM (Node Package Manager) is the standard package manager for the JavaScript ecosystem.
Our NPM package (xgate-client) is a library that "wraps" all our API routes in easy-to-use JavaScript functions. It's ideal for:
- Backend: Applications built with Node.js (such as Express, NestJS, etc.).
- Frontend: Modern applications like React, Angular, or Vue.
Key Advantages:
- Automatic Authentication: It handles the
logincall and stores the token for subsequent requests. - Clear Functions: Instead of
POST /deposit, you simply callxgate.createDeposit({ ... }). - Typing (TypeScript): If you use TypeScript, the package already provides correct types for each function.
Installation is done via command line and adds the package to your package.json file.
What is the Composer package?
Composer is the standard dependency manager for the PHP ecosystem.
Our Composer package (xgate/php-client) is a library that follows PHP standards (PSR) and allows you to instantiate a "Client" of our API within your project. It's ideal for:
- Modern Frameworks: Projects using Laravel, Symfony, etc.
- Pure PHP: Any PHP application that uses Composer's
autoload.
Key Advantages:
- Simplified Authentication: Instantiate the client with your credentials and it manages the token for you.
- Organized Methods: Instead of manually configuring cURL, you simply call
$xgate->createDeposit([ ... ]). - Error Handling: The package captures API errors and transforms them into PHP
Exceptions, which you can easily handle withtry...catch.
Installation is done via command line and adds the package to your composer.json file.
Installation
- NPM
- Composer
NPM Installation
This package is compatible with JavaScript and TypeScript, offering complete typing for a better development experience in modern applications.
npm install xgate
See the manual for complete installation and usage instructions:
Check NPM ManualComposer Installation
This package is compatible with PHP, offering complete typing and object-oriented design for a better development experience in modern applications.
composer require xgate/xgate-integration dev-production
See the manual for complete installation and usage instructions:
Check Composer Manual