Cashramp
  • Introduction
    • Getting Started
    • Payment Rails
    • API Endpoints
    • Authentication
    • Webhooks
    • Integration Guide
    • SDKs
  • Hosted Ramp
    • Overview
    • Deposits
    • Withdrawals
    • Cancel Payment
  • Direct Ramp
    • Overview
    • Ramp Quotes
    • Deposits
    • Withdrawals
  • Onchain Ramp
    • Overview
    • On-Off Ramp
  • Cashramp API
    • Queries
    • Customers
    • Payment Methods
    • Withdraw Onchain
    • Virtual Bank Accounts
Powered by GitBook
On this page
  • Authentication
  • Core Concepts
  • 1. Integration Options
  • 2. Payment Lifecycle
  • 3. Webhooks
  1. Introduction

Integration Guide

PreviousWebhooksNextSDKs

Last updated 18 days ago

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 .

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:

// Example webhook payload
{
  "event_type": "payment_request.updated",
  "data": {
    "id": "...",
    "status": "completed",
    "amount": "100.00",
    "currency": "usd"
  }
}

For more details, see .

Authentication
Webhooks
Hosted Ramp
Direct Ramp
Onchain Ramp