arazzo: 1.0.1
info:
title: Intuit Customer Invoice Payment Cycle
summary: Onboard a customer, invoice them, and record their payment end to end.
description: >-
A complete order-to-cash cycle for QuickBooks Online expressed as one
Arazzo workflow. The flow creates a new Customer, raises an Invoice against
that customer, and then records a Payment linked back to the invoice so the
receivable is cleared. It chains the customer Id and invoice Id forward so
the three entities stay linked. 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-200.30
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-200.30
capability_name: Accounts Receivable Management
spec: intuit-payments-api-openapi.yml
confidence: 0.78
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: customersApi
url: ../openapi/intuit-customers-api-openapi.yml
type: openapi
- name: invoicesApi
url: ../openapi/intuit-invoices-api-openapi.yml
type: openapi
- name: paymentsApi
url: ../openapi/intuit-payments-api-openapi.yml
type: openapi
workflows:
- workflowId: customer-invoice-payment
summary: Create a customer, invoice them, and apply a payment in one flow.
description: >-
Creates a Customer, raises an Invoice for that customer, and records a
Payment that links to the invoice to clear the balance.
inputs:
type: object
required:
- accessToken
- displayName
- lineAmount
- paymentAmount
properties:
accessToken:
type: string
description: OAuth 2.0 bearer access token for the QuickBooks company.
displayName:
type: string
description: Unique display name for the new customer.
email:
type: string
description: Primary email address for the customer.
lineAmount:
type: number
description: Amount of the single invoice line item.
paymentAmount:
type: number
description: Total amount of the payment to record.
steps:
- stepId: createCustomer
description: Create the customer record.
operationId: $sourceDescriptions.customersApi.createCustomer
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
requestBody:
contentType: application/json
payload:
DisplayName: $inputs.displayName
PrimaryEmailAddr:
Address: $inputs.email
successCriteria:
- condition: $statusCode == 200
outputs:
customerId: $response.body#/Customer/Id
- stepId: createInvoice
description: Raise an invoice for the new customer.
operationId: $sourceDescriptions.invoicesApi.createInvoice
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
requestBody:
contentType: application/json
payload:
CustomerRef:
value: $steps.createCustomer.outputs.customerId
Line:
- Amount: $inputs.lineAmount
DetailType: SalesItemLineDetail
Description: Services rendered
successCriteria:
- condition: $statusCode == 200
outputs:
invoiceId: $response.body#/Invoice/Id
totalAmt: $response.body#/Invoice/TotalAmt
- stepId: createPayment
description: Record a payment linked to the invoice to clear the receivable.
operationId: $sourceDescriptions.paymentsApi.createPayment
parameters:
- name: Authorization
in: header
value: "Bearer $inputs.accessToken"
requestBody:
contentType: application/json
payload:
CustomerRef:
value: $steps.createCustomer.outputs.customerId
TotalAmt: $inputs.paymentAmount
Line:
- Amount: $inputs.paymentAmount
LinkedTxn:
- TxnId: $steps.createInvoice.outputs.invoiceId
TxnType: Invoice
successCriteria:
- condition: $statusCode == 200
outputs:
paymentId: $response.body#/Payment/Id
unappliedAmt: $response.body#/Payment/UnappliedAmt
outputs:
customerId: $steps.createCustomer.outputs.customerId
invoiceId: $steps.createInvoice.outputs.invoiceId
paymentId: $steps.createPayment.outputs.paymentId
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.