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 axios from "axios";
const cashramp = axios.create({
baseURL: "https://api.useaccrue.com/cashramp/api/graphql",
headers: { Authorization: `Bearer ${process.env.CSHRMP_SECRET_KEY}` },
});
For detailed authentication setup, see Authentication.
Core Concepts
1. Integration Options
Cashramp offers three integration patterns:
Type
Use Case
Implementation
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:
// Example webhook payload
{
"event_type": "payment_request.updated",
"data": {
"id": "...",
"status": "completed",
"amount": "100.00",
"currency": "usd"
}
}
For more details, see Webhooks.
Last updated