For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integration Guide

Cashramp's API is built on GraphQL, providing a flexible and powerful way to integrate African currency payments with stablecoin settlements. This guide walks you through the key concepts and common integration patterns.

Authentication

All API requests require authentication using Bearer tokens:

import Cashramp from "cashramp";

const cashramp = new Cashramp({
  env: "production", // or "test" for staging
  secretKey: process.env.CSHRMP_SECRET_KEY,
});
require "cashramp"

client = Cashramp::Client.initialize(
  env: :production, # or :test for staging
  secret_key: ENV["CSHRMP_SECRET_KEY"]
)
import (
  "os"
  cashrampsdk "github.com/rockets-hq/cashramp-sdk-go"
)

client, err := cashrampsdk.InitialiseClient(
  "live", // or "test" for staging
  os.Getenv("CSHRMP_SECRET_KEY"),
)
if err != nil {
  panic(err)
}

For detailed authentication setup, see Authentication.

Core Concepts

1. Integration Options

Cashramp offers three integration patterns:

Type
Use Case
Implementation

Drop-in checkout UI

Redirect to hosted page

Server-side collections

Pure API integration

Wallet/DApp integration

URL with parameters

2. Payment Lifecycle

All payment flows follow this general lifecycle:

Status
Description
Webhook Event

created

Initial request

-

picked_up

Agent assigned

Yes

completed

Funds settled

Yes

canceled

Request canceled

Yes

3. Webhooks

Cashramp sends webhooks for important state changes:

For more details, see Webhooks.

Last updated