Quick Start
Get up and running with Caibo in just a few minutes.
1. Get Your API Keys
First, sign up for a Caibo account and get your API keys from the dashboard. You'll receive both a test key and a live key.
Tip: Use your test API key during development. Test keys start with sk_test_
2. Install the SDK
Install the Caibo SDK for your preferred language:
npm
npm install @caibopay/sdkyarn
yarn add @caibopay/sdkpip
pip install caibopay3. Initialize the Client
Create a new Caibo client with your API key:
index.js
import CaiboPay from '@caibopay/sdk';
const caibo = new CaiboPay({
apiKey: process.env.CAIBOPAY_API_KEY
});4. Make Your First API Call
Let's fetch the current exchange rates:
get-rates.js
// Get exchange rates
const rates = await caibo.rates.list({
baseCurrency: 'CAD',
targetCurrencies: ['COP', 'ARS', 'BRL']
});
console.log(rates);
// Output:
// {
// base: 'CAD',
// rates: {
// COP: 3150.25,
// ARS: 650.40,
// BRL: 3.72
// }
// }5. Create a Transfer
Now let's create your first transfer:
create-transfer.js
const transfer = await caibo.transfers.create({
amount: 1000.00,
sourceCurrency: 'CAD',
destinationCurrency: 'COP',
destination: {
type: 'bank_account',
country: 'CO',
accountHolder: 'Maria Garcia',
accountNumber: '12345678901234',
bankCode: 'BANCOLOMBIA'
},
reference: 'Invoice #1234'
});
console.log('Transfer ID:', transfer.id);
console.log('Status:', transfer.status);
console.log('Estimated delivery:', transfer.estimatedDelivery);