airtm-bulk-payments
v1.0.31
Published
Small, bulk payment utility
Downloads
3
Readme
Airtm Bulk Payments
this library
- Allows create
bulk_payments
andbulk_payment_items
, forbackoffice-mightyena
andpayments-kecleon
projects - Allows start serveral
@airlibs/message-store
process for eachbulk_payment_items
of anbulk_payments
id
Usage
Signature:
export interface PaymentType {
amount: number;
currency: string;
internal_note: string;
note: string;
receiver_email: string;
sender_email: string;
}
export interface RequestFileType {
name: string;
path: string;
size: number;
type: string;
}
...
createPaymentAndItems({ db, userId, payments, file }: { db: Database, userId: string, payments: PaymentType[], file?: RequestFileType }): Promise<object>
startBulkPaymentAndItems({ db, paymentId, token }: { db: Database, paymentId: string, token: string }): Promise<object>
Import the functions into your code
import { createPaymentAndItems, startBulkPaymentAndItems } from '@airtm/bulk-payments';