Billing Overview

Authentication

The FRAGMENT Payments API uses OAuth2 client credentials for authentication. You will need a Client ID and Client Secret from the FRAGMENT Dashboard.

The token endpoint is:

https://auth.us-west-2.fragment.dev/oauth2/token

Installation

Install
npm install @fragment-dev/ts-node

Client Setup

Initialize
import Fragment from '@fragment-dev/ts-node';

const client = new Fragment({
  clientId: process.env['FRAGMENT_CLIENT_ID'],
  clientSecret: process.env['FRAGMENT_CLIENT_SECRET'],
});

Resources

The Payments API provides the following resources:

  • External Accounts — Bank accounts and payment sources
  • Invoices — Invoice management with line items
  • Products — Product definitions with pricing and roles
  • Roles — Role definitions for invoice participants
  • Transactions — Transaction sync and allocation
  • Users — User management and role assignment