1.1.0 • Published 1 year ago

@repaya/client v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

API Client Library

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>
1.1.0

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago