Get Started
Start accepting crypto payments in 5 minutes. Accept 60+ cryptocurrencies and receive USDT automatically.
Default Network: All payments are processed in USDT BEP20 (Binance Smart Chain) by default. You only need to send the amount field - no need to specify chain or token.
Step 1: Get Your API Key
Contact our team to get your API credentials. You'll receive:
gw_live_your_key_herewhsec_your_secret_hereStep 2: Create Your First Invoice
Make a POST request to create a payment invoice:
// Default: USDT BEP20 (Binance Smart Chain) - just send amount!
const response = await fetch('https://api.fromchain.plus/v1/invoices', {
method: 'POST',
headers: {
'Authorization': 'Bearer gw_live_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '100.00', // Only required field
externalId: 'order_12345',
description: 'Payment for Order #12345'
})
});
const invoice = await response.json();
console.log('Deposit Address:', invoice.depositAddress);
console.log('Invoice ID:', invoice.id);Response Example:
{
"id": "inv_abc123",
"depositAddress": "0x1234567890123456789012345678901234567890",
"amountExpected": "100.00",
"status": "PENDING",
"expiresAt": "2025-12-18T12:30:00.000Z",
"createdAt": "2025-12-18T12:00:00.000Z"
}Step 3: Show Payment Instructions
Display the deposit address and amount to your customer:
// Show this information to your customer
const paymentInfo = {
address: invoice.depositAddress,
amount: invoice.amountExpected,
network: 'Binance Smart Chain (BSC)',
token: 'USDT (BEP-20)'
};
// Display QR code, copy button, etc.
console.log('Send exactly', paymentInfo.amount, 'USDT to:');
console.log(paymentInfo.address);Optional: Accept Any Cryptocurrency
Want to accept BTC, ETH, or other cryptocurrencies? Add payinCurrency to your invoice. The conversion is handled automatically via FixedFloat exchange.
Direct vs Multi-Currency:
• Without payinCurrency: Direct USDT BEP20 payment (processed by our system)
• With payinCurrency: Customer pays in BTC/ETH/etc, auto-converted to USDT (via FixedFloat)
const response = await fetch('https://api.fromchain.plus/v1/invoices', {
method: 'POST',
headers: {
'Authorization': 'Bearer gw_live_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '100.00', // Amount in USDT you want to receive
payinCurrency: 'BTC', // Customer pays in Bitcoin (uses FixedFloat)
externalId: 'order_12345'
})
});
const invoice = await response.json();
// Customer sends 0.00234 BTC → You receive 100 USDT💡 Tip: Use GET /v1/invoices/payin/currencies to list available currencies and POST /v1/invoices/payin/quote to get quotes before creating invoices.
Step 4: Handle Webhook Notifications
Set up a webhook endpoint to receive payment status updates:
// Express.js example
app.post('/api/webhooks/fromchain', express.json(), (req, res) => {
const event = req.body;
// Verify webhook signature (see Security docs)
const signature = req.headers['x-webhook-signature'];
// ... verify signature ...
switch (event.type) {
case 'invoice.detected':
console.log('Payment detected:', event.data.invoiceId);
break;
case 'invoice.partial':
console.log('Partial payment:', event.data.amountReceived, '/', event.data.amountExpected);
// Customer needs to send the remaining amount
break;
case 'invoice.confirmed':
console.log('Payment confirmed:', event.data.invoiceId);
// Update your database, fulfill order
break;
case 'invoice.paid_out':
console.log('Funds credited to balance:', event.data.invoiceId);
break;
case 'invoice.expired':
console.log('Invoice expired:', event.data.invoiceId);
break;
case 'invoice.failed':
console.log('Payment failed:', event.data.invoiceId);
break;
}
res.json({ received: true });
});Step 5: Check Invoice Status
You can also poll the invoice status:
const response = await fetch(
`https://api.fromchain.plus/v1/invoices/${invoiceId}`,
{
headers: {
'Authorization': 'Bearer gw_live_your_api_key_here'
}
}
);
const invoice = await response.json();
if (invoice.status === 'PAID_OUT') {
console.log('Payment complete!');
console.log('Received:', invoice.amountReceived, 'USDT');
console.log('Credited to balance (after fee)');
}Invoice Lifecycle
Invoice created, waiting for payment
Payment detected on blockchain (0 confirmations)
Payment confirmed (5 blocks)
Settlement in progress
Complete! Funds credited to your balance
