-
Notifications
You must be signed in to change notification settings - Fork 13
Submission: Interledger Wallet Payout – ssaincity #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Hussman256
wants to merge
1
commit into
WriteTech-Hub:main
Choose a base branch
from
Hussman256:payout-ssaincity
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
Once you make these changes, your tutorial will be much easier to follow and ready to merge.