Integrate NowRamp in minutes.
This guide walks you through the basic steps required to integrate NowRamp into your application and begin using on-ramp and off-ramp functionality.
Prerequisites
- A partner account with API credentials
- Your project ID and API key
Step 1: Get Your API Key
Contact the NowRamp team to get your partner account set up. You’ll receive:
- Partner ID: Your unique partner identifier
- Project ID: Your project identifier
- API Key: Your secret API key for authentication
Keep your API key secure. Never expose it in client-side code.
The fastest way to integrate is using the embeddable widget.
Using an iframe
<iframe
src="https://widget.nowramp.com?apiKey=YOUR_API_KEY&projectId=YOUR_PROJECT_ID&externalUserId=user_123"
width="400"
height="600"
frameborder="0"
allow="clipboard-write"
></iframe>
Using the JavaScript SDK
npm install @ramp-orchestrator/sdk
import { RampWidget } from '@ramp-orchestrator/sdk';
const widget = new RampWidget({
apiKey: 'YOUR_API_KEY',
projectId: 'YOUR_PROJECT_ID',
externalUserId: 'user_123',
containerId: 'ramp-widget',
});
widget.on('orderComplete', (order) => {
console.log('Order completed:', order);
});
widget.mount();
Callback URLs are the preferred integration method for most partners. Your server receives HTTP POST notifications in real-time when events occur.
Set your callback URL on your project to receive real-time updates:
curl -X PATCH https://api.nowramp.com/v1/projects/YOUR_PROJECT_ID \
-H "Authorization: Bearer admin_token" \
-H "Content-Type: application/json" \
-d '{"webhookUrl": "https://partner-app.com/webhooks/ramp"}'
Then implement your endpoint:
const crypto = require('crypto');
// Verify webhook signature
function verifySignature(payload, signature, timestamp, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(`${timestamp}.${payload}`)
.digest('hex');
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}
// Express.js webhook handler
app.post('/webhooks/ramp', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.headers['x-webhook-signature'];
const timestamp = req.headers['x-webhook-timestamp'];
if (!verifySignature(req.body.toString(), signature, timestamp, process.env.WEBHOOK_SECRET)) {
return res.status(401).send('Invalid signature');
}
const event = JSON.parse(req.body);
switch (event.type) {
case 'order.completed':
handleOrderComplete(event.data.order);
break;
case 'kyc.approved':
handleKycApproved(event.data);
break;
}
res.status(200).json({ received: true });
});
Step 4: Test Your Integration
Use the sandbox environment to test your integration:
| Environment | Base URL |
|---|
| Sandbox | https://api.sandbox.nowramp.com |
| Production | https://api.nowramp.com |
Test Flow
- Create a test customer with
externalUserId
- Complete the KYC flow (use test documents in sandbox)
- Add a wallet address
- Create a quote and execute an order
Next Steps