Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects

client-js

by repaya · Updated 2 years ago

Typescript client library for repaya.io web3 payment APIs

Open source alternative to:

In the AI payments ecosystem

client-js is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on crypto-payment-gateway, payment-gateway, payments, stablecoin-payments. It currently has 2 GitHub stars and 0 forks, and sits alongside related tools like tdm-sdk, salesforce-programmable-wallets, awesome-fintech, tdm-integration-kit, TDM-Agent-Integration-Kit, x402-solana-rust.

README.md View on GitHub →

API Client Library

npm npm size license

Typescript client library for repaya.io web3 payment APIs.

yarn add @repaya/client

Documentation docs.repaya.io.

Usage

Import the client

import { Client } from '@repaya/client'

Create payment session

const formId = '<FORM_ID>'

// Create payment session
const session = await client.sessions.create(formid, { customer: { id: '42' } })

After the session was created, use the session.checkoutUrl to redirect the customer to the payment page.


After the payment is completed, request its status and customer balances by the session ID.

const payment = await client.payments.getBySession(session.id)
// payment.status === 'completed'    // check payment status

const balances = await client.balances.getAll(formId, { customerId: '42' })

Command Line Interface

The package can be used via the npx command to access a convinient CLI:

Usage: npx @repaya/client [command] [params...] <key=value>
All SDKs & Clients SDKs →