Client
new Sahel(options)
Section titled “new Sahel(options)”Creates a client. See configuration for options.
sahel.createInvoice(input)
Section titled “sahel.createInvoice(input)”| Field | Type | |
|---|---|---|
customer |
string |
The customer’s id. |
amount |
number |
In the currency’s smallest unit (kobo for NGN). |
currency |
string |
An ISO 4217 code. |
Returns the invoice.
sahel.getInvoice(id)
Section titled “sahel.getInvoice(id)”Returns the invoice, or throws NotFoundError.
sahel.listInvoices(filters?)
Section titled “sahel.listInvoices(filters?)”Returns an async iterator over every matching invoice; see pagination.