shift4-ts
v0.1.4
Published
Typed TypeScript SDK for the Shift4 payments API.
Maintainers
Readme
shift4-ts
A typed TypeScript SDK for the Shift4 payments API.
Documentation
For detailed API documentation, types, and available calls, please refer to:
Installation
npm install shift4-tsUsage
import { Shift4Api } from 'shift4-ts';
const client = new Shift4Api('your-api-secret-key');
// Create a charge
const charge = await client.createCharge({
amount: 1000,
currency: 'USD',
card: 'tok_...',
});
// List customers
const customers = await client.listCustomers();
// Create a customer
const customer = await client.createCustomer({
email: '[email protected]',
});