Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Setup Guide: Chimoney Interledger Wallet Payout Integration

## Step 1: Create Chimoney Account & Get API Key
- Sign up at [chimoney.io/developers](https://chimoney.io/developers)
- Go to Dashboard → API Keys
- Copy your sandbox or production `x-api-key`

## Step 2: Setup Development Environment
```bash
mkdir chimoney-interledger-payout
cd chimoney-interledger-payout
npm init -y
npm install axios dotenv
```

## Step 3: Store API Key Securely
Create a `.env` file:
```
CHIMONEY_API_KEY=your_api_key_here
```

Use it in your code:
```javascript
require('dotenv').config();
const apiKey = process.env.CHIMONEY_API_KEY;
```

## Step 4: Get Interledger Wallet
- Sign up at [rafiki.money](https://rafiki.money)
- Use an address like `username.rfi.ilp.network`

## Step 5: Make Your First Test Call
```javascript
const axios = require('axios');
require('dotenv').config();

const apiKey = process.env.CHIMONEY_API_KEY;

async function sendInterledgerPayout() {
const url = 'https://api.chimoney.io/v0.2/payouts/interledger';
const data = {
walletAddress: 'example.rfi.ilp.network',
amount: 10,
currency: 'USD',
reason: 'Test payout from setup guide'
};
const headers = {
'Content-Type': 'application/json',
'x-api-key': apiKey,
};

try {
const response = await axios.post(url, data, { headers });
if (response.status === 200 && response.data.success) {
console.log('✅ Setup Successful!');
console.log('Reference:', response.data.reference);
} else {
console.error('❌ Setup failed:', response.data.message);
}
} catch (error) {
console.error('🚨 Error:', error.response?.data || error.message);
}
}

sendInterledgerPayout();
```
61 changes: 61 additions & 0 deletions tutorial.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hussman256. Thanks for putting this together!

It’s a good start, but right now the tutorial doesn't read too much like a guide. To make it clearer and easier for your reader to follow, you should:

  • Add a short explanation before each step so readers understand what they’re doing and why. This can also include very brief explanations of what the code block for that section does.
  • Connect the steps with transition sentences so the tutorial flows naturally from start to finish.
  • Include a section on common errors and how to fix them.
  • Add a short conclusion to wrap up the tutorial.
  • Link to other helpful resources where it necessary.
  • Move your files into the correct folder format so we don’t run into problems when merging:
submissions/
└── [endpoint]-[slackhandle]/
    ├── use-case.md
    ├── tutorial.md
    └── setup.md

Once you make these changes, your tutorial will be much easier to follow and ready to merge.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Tutorial Guide: Integrate Payout to Interledger Wallet API

## Pre-requisites
- Node.js and npm installed
- Chimoney Developer Account
- Chimoney API Key
- Interledger-compatible wallet (e.g. Rafiki)
- Basic JavaScript knowledge

## Step 1: Install Axios
```bash
npm install axios
```

## Step 2: Create the Function
```javascript
const axios = require('axios');
const apiKey = 'YOUR_CHIMONEY_API_KEY';

async function sendInterledgerPayout(walletAddress, amount, currency, reason) {
const url = 'https://api.chimoney.io/v0.2/payouts/interledger';
const headers = {
'Content-Type': 'application/json',
'x-api-key': apiKey,
};
const data = { walletAddress, amount, currency, reason };

try {
const response = await axios.post(url, data, { headers });
if (response.status === 200 && response.data.success) {
console.log('✅ Payout Successful!');
console.log('Transaction Reference:', response.data.reference);
} else {
console.error('❌ Error:', response.data.message || response.data.error);
}
} catch (error) {
console.error('🚨 Network Error:', error.response?.data || error.message);
}
}
```

## Step 3: Example Usage
```javascript
sendInterledgerPayout(
'kenny.rfi.ilp.network',
25,
'USD',
'DAO Translation Bounty'
);
```

## Sample Response
```json
{
"success": true,
"message": "Payout sent successfully",
"reference": "CHM-kjs728s9hds",
"amount": 25,
"currency": "USD"
}
```
24 changes: 24 additions & 0 deletions use-case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Use Case: Seamless Global Payouts with Interledger

## Introduction
As the global economy becomes increasingly digital, the need for borderless financial transactions has never been greater. From Web3 DAOs to remote-first startups, organizations are tapping into international communities for talent, creativity, and innovation.

But here’s the catch: many contributors around the world don’t have access to traditional banking systems. High remittance fees, delayed payments, and limited access to global platforms remain key barriers.

**Chimoney’s `Payout to Interledger Wallet Address` endpoint solves this problem** by enabling businesses to send payments directly to Interledger-compatible wallets. This ensures fast, inclusive, and low-fee global payouts—all with a simple API call.

## Real-World Scenario: Paying Remote Hackathon Winners

Let’s say you’re hosting a global hackathon with winners in Kenya, Brazil, and the Philippines. Rather than worry about currency conversion or bank delays, you choose to pay all winners via Interledger wallets.

**Without Chimoney:**
- Manual processes
- Expensive third-party remittance tools
- Long wait times
- Limited visibility and compliance headaches

**With Chimoney:**
- Automated payouts via API
- Recipients use Interledger wallets (e.g. `user.rfi.ilp.network`)
- Instant, direct payments
- Built-in tracking, transparency, and tax handling