Initial Node.js SDK v1.0.0

This commit is contained in:
garfieldheron
2026-02-19 12:07:39 -05:00
commit 6c252b7495
24 changed files with 1837 additions and 0 deletions

35
dist/api/payments.d.ts vendored Normal file
View File

@@ -0,0 +1,35 @@
import { AxiosInstance } from 'axios';
import { Payment, CreatePaymentRequest, ListResponse, PaginationParams, FilterParams } from '../types';
/**
* Payments API client
*/
export declare class PaymentsClient {
private http;
constructor(http: AxiosInstance);
/**
* Create a new payment
*/
create(params: CreatePaymentRequest, idempotencyKey?: string): Promise<Payment>;
/**
* Retrieve a payment by ID
*/
retrieve(paymentId: string): Promise<Payment>;
/**
* List all payments
*/
list(params?: PaginationParams & FilterParams & {
status?: string;
rail?: string;
}): Promise<ListResponse<Payment>>;
/**
* Cancel a pending payment
*/
cancel(paymentId: string, reason?: string, idempotencyKey?: string): Promise<Payment>;
/**
* Refund a settled payment
*/
refund(paymentId: string, params?: {
amount?: number;
reason?: string;
}, idempotencyKey?: string): Promise<Payment>;
}