Skip to main content
Glama

Flutterwave MCP Server

checkout.ts1.81 kB
import { checkoutClient as client } from "../http/index.js"; type CheckoutPayload = { tx_ref: string, amount: string, currency: string, redirect_url: string, customer: { email: string, name: string, phonenumber: string, }, customizations: { title: string, }, configurations: { session_duration: number, max_retry_attempt: number }, } /** * This checkout create payment. * https://developer.flutterwave.com/docs/flutterwave-standard-1 * */ async function create(payment_data: CheckoutPayload) : Promise<{ data: { data: any; link: string }, status: number } | undefined> { const { data, error } = await client.POST("/payments", { body: { ...payment_data } }); if (error) { console.error(error); return; } return data; } // { // "status": "success", // "message": "LINK DISABLED", // "data": true // } /** * Disable a checkout link. * https://developer.flutterwave.com/v3.0.0/docs/flutterwave-standard-1#how-to-disable-a-payment-link-via-api * @param payment_link * @returns */ async function disable(payment_link: string): Promise<{ status: string; message: string; data: null; } | undefined> { const { data, error } = await client.POST("/payments/link/disable", { body:{ link: payment_link } }); if (error) { console.error(error); throw new Error('Failed to disable checkout link', { cause: error }); } // Ensure returned object always has data: null return { status: data?.status || 'error', message: data?.message || 'An error occurred', data: null }; } export default { create, disable_link: disable }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bajoski34/mcp-flutterwave'

If you have feedback or need assistance with the MCP directory API, please join our Discord server