arazzo: 1.0.1
info:
title: Flutterwave Quote Fee Then Charge
summary: Retrieve the processing fee for an amount, create the customer, then charge and verify it.
description: >-
A transparency-first collection flow. The workflow retrieves Flutterwave's
fee calculation for an amount, currency, and payment method so the merchant
can show the true cost, creates the customer that will own the charge,
initiates the charge, and retrieves the charge to confirm its final status.
The verify step branches on whether the charge succeeded or failed. Every
step spells out its request inline so the flow can be read and executed
without opening the underlying OpenAPI description.
version: 1.0.0
x-realizes-capability-ids:
- BC-420.10
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-420.10
capability_name: Customer Data Management
spec: flutterwave-customers-api-openapi.yml
confidence: 0.75
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: chargesApi
url: ../openapi/flutterwave-charges-api-openapi.yml
type: openapi
- name: customersApi
url: ../openapi/flutterwave-customers-api-openapi.yml
type: openapi
- name: feesApi
url: ../openapi/flutterwave-fees-api-openapi.yml
type: openapi
workflows:
- workflowId: quote-fee-then-charge
summary: Quote the fee for an amount, create a customer, and charge them with verification.
description: >-
Retrieves the fee for the amount and method, creates the customer, initiates
the charge, then branches on the verified charge status.
inputs:
type: object
required:
- accessToken
- amount
- currency
- email
properties:
accessToken:
type: string
description: OAuth2 client-credentials bearer token for the Authorization header.
amount:
type: number
description: Amount to charge in the major currency unit.
currency:
type: string
description: ISO currency code for the charge and fee quote.
paymentMethod:
type: string
description: Optional payment method used to refine the fee quote.
email:
type: string
description: Email address of the customer being charged.
reference:
type: string
description: Optional merchant reference to correlate the charge.
steps:
- stepId: quoteFee
description: Retrieve the processing fee for the amount, currency, and method.
operationId: getFees
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
- name: amount
in: query
value: $inputs.amount
- name: currency
in: query
value: $inputs.currency
- name: payment_method
in: query
value: $inputs.paymentMethod
successCriteria:
- condition: $statusCode == 200
outputs:
fee: $response.body#/fee
merchantFee: $response.body#/merchant_fee
- stepId: createCustomer
description: Create the customer that will own the charge.
operationId: createCustomer
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
requestBody:
contentType: application/json
payload:
email: $inputs.email
successCriteria:
- condition: $statusCode == 201
outputs:
customerId: $response.body#/id
- stepId: createCharge
description: Initiate the charge against the created customer.
operationId: createCharge
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
requestBody:
contentType: application/json
payload:
amount: $inputs.amount
currency: $inputs.currency
reference: $inputs.reference
customer:
id: $steps.createCustomer.outputs.customerId
successCriteria:
- condition: $statusCode == 201
outputs:
chargeId: $response.body#/id
- stepId: verifyCharge
description: Retrieve the charge to confirm its final status.
operationId: getCharge
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
- name: id
in: path
value: $steps.createCharge.outputs.chargeId
successCriteria:
- condition: $statusCode == 200
outputs:
chargeStatus: $response.body#/status
onSuccess:
- name: chargeSucceeded
type: end
criteria:
- context: $response.body
condition: $.status == "succeeded"
type: jsonpath
- name: chargeFailed
type: end
criteria:
- context: $response.body
condition: $.status == "failed"
type: jsonpath
outputs:
fee: $steps.quoteFee.outputs.fee
chargeId: $steps.createCharge.outputs.chargeId
chargeStatus: $steps.verifyCharge.outputs.chargeStatus
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.