Client
This content is for v1. Switch to the latest version for up-to-date documentation.
new Sahel(key, options?)
Section titled “new Sahel(key, options?)”Creates a client. key is your secret API key; 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.