flutterwave@1.0.1
- createCustomer(customerData, [options])
- createPaymentMethod(paymentMethodData, [options])
- initiatePayment(paymentData, [options])
Functions
createCustomer
createCustomer(customerData, [options]) ⇒ function
Create a new customer in Flutterwave.
| Param | Type | Description |
|---|---|---|
| customerData | Object | |
| [options] | RequestOptions | Optional request options |
createPaymentMethod
createPaymentMethod(paymentMethodData, [options]) ⇒ function
Create a new payment method in Flutterwave.
Returns: function - - A function that takes the state and performs the operation.
| Param | Type | Description |
|---|---|---|
| paymentMethodData | Object | The payment method details to send to Flutterwave. |
| [options] | RequestOptions | Optional request options |
initiatePayment
initiatePayment(paymentData, [options]) ⇒ function
Initiate a payment request to the Flutterwave API.
Returns: function - - A function that takes the state and performs the operation.
| Param | Type | Description |
|---|---|---|
| paymentData | Object | The payment details to send to Flutterwave. |
| [options] | RequestOptions | Optional request options |
Interfaces
FlutterwaveState
State object returned by flutterwave API
Properties
| Name | Description |
|---|---|
| data | the parsed response body from flutterwave |
| response | the full response from the flutterwave server, including headers, statusCode, body, etc |
| references | an array of all previous data objects used in the Job |
RequestOptions
Options provided to the Flutterwave requests
Properties
| Name | Type | Description |
|---|---|---|
| errors | object | Map of errorCodes -> error messages, ie, { 404: 'Resource not found;' }. Pass false to suppress errors for this code. |
| form | object | Pass a JSON object to be serialised into a multipart HTML form (as FormData) in the body. |
| query | object | An object of query parameters to be encoded into the URL. |
| headers | object | An object of headers to append to the request. |
| parseAs | string | Parse the response body as json, text or stream. By default will use the response headers. |
| timeout | number | Request timeout in ms. Default: 300 seconds. |