Skip to main content

flutterwave@1.0.0

createCustomer(customerData)
createPaymentMethod(paymentMethodData)
initiatePayment(paymentData)

Functions

createCustomer

createCustomer(customerData) ⇒ function

Create a new customer in Flutterwave.

ParamType
customerDataObject

createPaymentMethod

createPaymentMethod(paymentMethodData) ⇒ function

Create a new payment method in Flutterwave.

Returns: function - - A function that takes the state and performs the operation.

ParamTypeDescription
paymentMethodDataObjectThe payment method details to send to Flutterwave.

initiatePayment

initiatePayment(paymentData) ⇒ function

Initiate a payment request to the Flutterwave API.

Returns: function - - A function that takes the state and performs the operation.

ParamTypeDescription
paymentDataObjectThe payment details to send to Flutterwave.

Interfaces

HttpState

State object

Properties

NameDescription
datathe parsed response body
responsethe response from the HTTP server, including headers, statusCode, body, etc
referencesan array of all previous data objects used in the Job

RequestOptions

Options provided to the HTTP request

Properties

NameTypeDescription
bodyobject | stringbody data to append to the request. JSON will be converted to a string (but a content-type header will not be attached to the request).
errorsobjectMap of errorCodes -> error messages, ie, { 404: 'Resource not found;' }. Pass false to suppress errors for this code.
formobjectPass a JSON object to be serialised into a multipart HTML form (as FormData) in the body.
queryobjectAn object of query parameters to be encoded into the URL.
headersobjectAn object of headers to append to the request.
parseAsstringParse the response body as json, text or stream. By default will use the response headers.
timeoutnumberRequest timeout in ms. Default: 300 seconds.
tlsobjectTLS/SSL authentication options. See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions