Leepa Africa API

Sections

Theme switcher

Leepa Africa API

Advanced API Structure for Seamless Integration

To enable third-party platforms to integrate Leepa Africa's capabilities, we've meticulously designed a comprehensive and flexible API structure. Our API facilitates easy integration, providing developers with the tools to incorporate blockchain payment solutions into their applications.

Core API Components

  • Secure Authentication: Utilizing API keys we ensure secure and authorized access to our services.
  • Blockchain Interaction: Developers can easily select networks, manage tokens, and authorize transactions, offering unparalleled flexibility across blockchains.
  • Dynamic Payment Processing: Our API supports the creation and management of various payment types, including one-time invoices, recurring subscriptions, and usage-based billing, with built-in support for handling overdue payments.
Was this section helpful?

What made this section unhelpful for you?

On this page
  • Leepa Africa API

Introduction

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Introduction

Authentication

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Authentication

Generating API Keys

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Generating API Keys

Accounts, API Keys & Webhooks

Accounts are the basic organizations that use Coinsub services. They can be individuals, businesses, or non-profit organizations. They can have one or more users associated with them, and they can be connected to other accounts.

Creating an account through the API will connect that account with your account, enabling you to call the API as that account in the future. This allows a platform account the ability to onboard users, and configure products, and payment agreements for their users.

On this page
  • Accounts, API Keys & Webhooks

Merchant Wallet Transfers

Coinsub Merchant Wallets are secure, non-custodial wallets powered by DFNS’s battle-tested wallet infrastructure. Designed with robust key management and WebAuthn-based authentication, these wallets ensure enterprise-grade security without exposing private keys or relying on vulnerable seed phrases. With Merchant Wallets, Coinsub merchants don’t need to connect external wallets or manage third-party integrations. Everything is built-in—making on-chain payments, managing funds, and receiving crypto subscriptions frictionless and secure, straight from your Coinsub dashboard.

To get started with a merchant platform wallet of your own, sign up at test.coinsub.io (development environment) or app.coinsub.io (production).

On this page
  • Merchant Wallet Transfers

Subscription Products

At Coinsub, a product is a digital offer created by a merchant that users can purchase in exchange for access to a service, benefit, or digital experience. While many products are traditional subscriptions, they can also represent one-time access or single-purchase offerings.


Core Aspects of a Coinsub Product:

  • Merchant-Defined: Each product is owned and managed by a specific merchant, who determines its pricing, duration, and usage.
  • Descriptive Name: Every product has a clear and user-friendly title that communicates what the offering is.
  • Flexible Pricing Model: Products are priced in U.S. dollars, but payment may be made using crypto. The pricing supports both recurring subscriptions and one-time purchases.
  • Blockchain Integration: Payments are directed to a dedicated blockchain address, enabling secure, on-chain transactions.
  • Lifecycle Status: Products can be marked as active (available for purchase), inactive (temporarily paused), or discontinued (retired), giving merchants control over their offerings.
On this page
  • Subscription Products

Agreements

On this page
  • Agreements

Payments

On this page
  • Payments

Purchase Sessions

On this page
  • Purchase Sessions

Purchase Messages

On this page
  • Purchase Messages

Permit Messages

On this page
  • Permit Messages

Integration Options

This comprehensive guide provides detailed information about integrating Coinsub payment processing into your application. Coinsub offers four distinct integration methods designed to accommodate different technical requirements and use cases, from simple no-code solutions to advanced API integrations with full customization capabilities.

Option
Integration Level
Customization
Hosted Checkout UI

1. Standard Checkout Link

🔹 No Code

✅ (full control)

2. Button Embed

🔸 Low Code

✅ (button color)

3. iFrame Embed

🔸 Medium Code

✅ (full control)

4. Headless API

🔸 Developer

✅ (fully programmable)


Which Integration Option Should You Use?

Choosing the right integration depends on your technical resources, business model, and how much control you want over the checkout experience.

🔹 Standard Checkout Link – Best for Non-Technical Merchants

Who it's for:

  • Individual creators
  • Small merchants or service providers
  • Teams with no dev resources

Why use it:

  • Zero development required
  • Shareable across any platform (email, social, website)
  • Fastest way to start accepting stablecoin payments

🔸 Button Embed – Best for Low-Code Teams

Who it's for:

  • Marketing teams with light dev help
  • Shopify, WordPress, or Webflow users
  • Sites that need a call-to-action button with minimal backend setup

Why use it:

  • Simple HTML embed
  • Button styling via data-color
  • Redirects to secure hosted checkout

🔸 Modal iFrame – Best for Custom Frontends That Want In-Site UX

Who it's for:

  • Sites with web developers
  • Businesses that care about seamless branding and user experience
  • Publishers, SaaS sites, or gated content platforms

Why use it:

  • Fully embedded experience
  • Controlled modal styling
  • Checkout stays within your UI context

🔸 Headless API – Best for Crypto-Native Platforms & Advanced Teams

Who it's for:

  • Web3 apps, dApps, DeFi platforms
  • Teams already managing wallets or signing flows
  • Platforms needing custom onboarding, wallet UX, or nonstandard product logic

Why use it:

  • Full control over the payment process
  • You manage wallet interaction and signing
  • Suitable for integrations with other on-chain or backend systems
On this page
  • Integration Options

Webhooks

Webhooks allow real-time communication between systems.

Webhooks are used to synchronize disparate systems by publishing automated messages with predefined payloads that can be interpreted by integrated systems. They allow real-time communication between applications, enabling instant updates and data sharing without the need for continuous polling.

Our platform webhooks provide notifications when specific actions occur on your account, such as when a customer subscribes to a product, purchases a one-off product, makes a payment, or cancels a subscription. By setting up webhooks, you can automate processes and keep your systems in sync with our platform in real-time.

On this page
  • Webhooks

Test Customer Demand for Crypto Payments

The Crypto Interest & Engagement Button allows you to measure customer interest in paying with cryptocurrency before launch. By integrating this button, you can collect customer interactions, emails, and waitlist sign-ups—all without processing any payments immediately.


How It Works

  1. Customer clicks “Pay with Crypto” The button records the interaction in our database.
  2. Modal opens A pop-up asks the customer if they want to receive updates via email.
  3. Customer enters email They are added to your “waitlist” for crypto payments.
  4. You get data Track interest, cart sizes, and popular products.

Step 1 – Get Your Merchant ID

  1. Log in to your CoinSub Dashboard.
  2. Go to Settings → API Keys.
  3. Copy your Merchant ID.

Step 2 – Add the Script to Your Website

Place the following script anywhere in your HTML:

HTML

Step 3 – Customize Button (Optional)

The button can be fully customized using the data-* attributes. Here’s what each field does. You can customize the look of your buttons to match your website’s style. You can find real code examples here.

Attribute

Required

Description

Example

data-merchant-id

✅ Yes

Your unique Merchant ID from CoinSub.

"b8690aab-2202-4ed5-abf7-02f4661e0925"

data-button-text

⚙️ Optional

Text displayed on the button.

"Subscribe with Crypto ⚡"

data-background-color

⚙️ Optional

Background color of the button block. Accepts HEX or RGB.

"rgb(30,30,30)"

data-button-color

⚙️ Optional

Button color.

"rgb(0,200,200)"

data-button-text-color

⚙️ Optional

Color of the text on the button.

"rgb(255,255,255)"

data-logo-mode

⚙️ Optional

Logo style (dark or white).

"dark"

data-cart-size

⚙️ Optional

The total cart value associated with this product.

99.99

data-merchant-industry

⚙️ Optional

Your business category.

"Fashion"

data-product-metadata

⚙️ Optional

Product details in JSON format.

'{"product_name": "Skirt", "price": 99.99, "category": "clothing"}'


Step 4 – Collect Data & Analyze

For the APIs you can use to collect data about user engagement/interest use the following set of APIs. This feature is currently restricted to the test environment.

On this page
  • Test Customer Demand for Crypto Payments