Skip to content

etherfuse/ramp-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Etherfuse Ramp API Example

A comprehensive demo application showcasing how to use the Etherfuse Ramp API for onramp and offramp. This application demonstrates the complete workflow from customer onboarding to order creation and management.

🚀 Features

🔑 API Key Setup

  • Add your API key, to get started. It is stored in temp session storage.

🚀 Customer Onboarding

  • Generate Onboarding URLs: Create secure onboarding URLs for customers
  • KYC Integration: Redirect customers to complete Know Your Customer (KYC) verification
  • Wallet Connection: Allow customers to connect their cryptocurrency wallets
  • Bank Account Linking: Enable customers to link their bank accounts
  • Multi-Blockchain Support: Support for Stellar, Solana, Base, and Polygon networks

💳 Order Management

  • Create Orders: Generate both onramp (fiat to crypto) and offramp (crypto to fiat) orders
  • Order Lookup: Retrieve detailed information about specific orders by ID
  • Order Status Tracking: Monitor order progression and status updates
  • Optional Parameters: Include memos and payer account IDs

🔔 Webhook Management

  • Create Webhooks: Set up webhook endpoints to receive real-time notifications
  • Event Types: Support for bank_account_updated, customer_updated, and order_updated events
  • Webhook Testing: Integration with services like webhook.site for testing
  • Webhook Management: View, manage, and delete existing webhooks
  • Real-time Updates: Receive asynchronous notifications about order status changes

🚀 Getting Started

Prerequisites

  • A valid Etherfuse API key
  • Modern web browser with ES6 support

Installation

  1. Clone the repository

    git clone <repository-url>
    cd ramp-api-example
  2. Install dependencies

    npm install
  3. Start the development server

    npm start
  4. Open your browser Navigate to http://localhost:3000 (or the port shown in your terminal)

First Steps

  1. Enter your API Key: Input your Etherfuse API key to begin
  2. Navigate to Onboarding: Use the sidebar to access the onboarding section
  3. Generate Onboarding URL: Create a URL for customer onboarding
  4. Set up Webhooks: Configure webhooks to receive order updates
  5. Create Orders: Generate onramp or offramp orders
  6. Monitor Progress: Use the lookup functionality to track order status

📋 API Endpoints Demonstrated

Onboarding

  • POST /onboarding-url - Generate customer onboarding URLs

Orders

  • POST /order - Create new orders
  • GET /order/{orderId} - Retrieve order details
  • POST /orders - List existing orders

Webhooks

  • POST /webhook - Create webhook endpoints
  • POST /webhooks - List existing webhooks
  • DELETE /webhooks/{webhookId} - Remove webhooks

Wallets & Customers

  • POST /wallets - List customer wallets
  • POST /customers - List customer information

🔧 Configuration

Supported Blockchains

  • Stellar - Fast, low-cost transactions
  • Solana - High-performance blockchain
  • Base - Ethereum L2 solution
  • Polygon - Ethereum scaling solution

Order Types

  • Onramp: Fiat currency to cryptocurrency
  • Offramp: Cryptocurrency to fiat currency

Webhook Events

  • bank_account_updated: Bank account status changes
  • customer_updated: Customer information updates
  • order_updated: Order status and progress updates

🎯 Use Cases

For Developers

  • API Integration: Learn how to integrate Etherfuse APIs into your applications
  • Webhook Implementation: Understand webhook setup and handling
  • Error Handling: See best practices for API error management
  • State Management: Learn client-side state persistence techniques

Getting Help

  • Documentation: Visit docs.etherfuse.com for detailed API documentation
  • Support: Contact Etherfuse support for technical assistance
  • Community: Join the Etherfuse community for discussions and support

⚠️ Important Notes

Demo Application

This is a demonstration application and should not be used for production customer workflows. It's designed to showcase API functionality and integration patterns.

Security Considerations

  • Never expose API keys in client-side code in production
  • Use server-side proxy for production implementations
  • Implement proper authentication and authorization
  • Validate all inputs on the server side

Rate Limits

  • Be aware of API rate limits when testing
  • Implement proper retry logic for production use
  • Monitor API usage and implement appropriate caching

📄 License

This project is licensed under the Apache-2.0 License. See the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

📞 Support

For technical support or questions about the Etherfuse API:


Disclaimer: This is a demo application provided "as is" for demonstration purposes. It should not be used for production customer workflows. Always implement proper security measures and validation in production environments.

About

Example of how to use the etherfuse Ramp API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published