Data Population
Before building transaction flows, you need to populate your application with reference data from the Inyo API. This data includes available payout countries, required schemas for recipients and accounts, and bank lists.
Overview
| Endpoint | Purpose | Cache Duration |
|---|---|---|
| Payout Countries | Available destination countries for a source corridor | 24 hours |
| Recipient Schema | Required fields to create a recipient in a given country | 24 hours |
| Recipient Account Schema | Required fields to link a bank account in a given country | 24 hours |
| Transaction Schema | Country-specific additionalData fields for transactions | 24 hours |
| Banks in a Country | List of banks available for a destination country | 24 hours |
Rate Limits
All data population endpoints are subject to strict rate limits. These endpoints serve reference data that changes infrequently โ you are expected to cache responses locally and refresh periodically (recommended: every 24 hours).
Do not call these endpoints on every transaction. Excessive calls will result in 429 Too Many Requests responses.
Recommended Caching Strategy
// Example: Cache with 24-hour TTL
const NodeCache = require('node-cache');
const cache = new NodeCache({ stdTTL: 86400 }); // 24 hours
async function getDestinations(sourceCountry) {
const cacheKey = `destinations:${sourceCountry}`;
let data = cache.get(cacheKey);
if (!data) {
data = await inyoApi.get(`/payout/${sourceCountry}/destinations`);
cache.set(cacheKey, data);
}
return data;
}
Schema-Driven Integration
A key design principle of the Inyo API is that data requirements vary by country. Instead of hardcoding field requirements, your integration should:
- Fetch the schema for the destination country
- Dynamically render forms based on required/optional fields
- Validate user input against the schema before submitting
This approach ensures your application automatically adapts when Inyo adds new countries or changes requirements โ without code changes on your side.
Once the customer picks a destination country, each schema call feeds one part of your form:
| Fetch | Then build |
|---|---|
| Recipient Schema | Person form |
| Recipient Account Schema | Bank account form |
| Banks in a Country (if needed) | Bank dropdown |
| Transaction Schema | additionalData fields |
