Author:
Matt Salmon
Changed on:
8 July 2024
You must have knowledge of how the Workflow Framework works.
The following data model is the global entity data model which shows where the Payments solution sits in the Fluent platform.
The following data model outlines the entities available to manage payments.
These are the entities involved in the Payment orchestration domain.
Entity | Description |
| Represents the sales order for a customer |
| A pool of funds available in order to pay for an order |
| A plan to move items in order to deliver on a promise made to a customer |
| Represents the process of capturing or refunding part or all of a financial transaction |
| A log of activities that have occurred whilst processing a payment through its lifecycle |
| The source of record for a group of financial operations relating to a customer |
| The document representing the itemised charge to a customer for the supply of goods |
| A memorandum issued to indicate a change in an orders sale price |
The following use case explains the relationship between different entities in the Payments domain.
This example serves as a practical walkthrough of how the entities related to payments are intended to be used to capture funds throughout the lifecycle of an order.
`Order`
`createOrder`
`FinancialTransactions`
`CREATED`
`paymentMethod`
`Fulfilments`
`createFulfilment`
`Fulfilment 1`
`createPayment`
`FinancialTransaction`
`paymentMethod`
`PARTIALLY_CAPTURED`
`updateFinacialTransaction`
`Fulfilment 2`
`FinancialTransaction`
`paymentMethod`
`FinancialTransaction`
`paymentMethod`
`createPayment`
`CAPTURED`
`PaymentTransactions`
`payment`
`createPaymentTransaction`
`status`
`PENDING`
`CAPTURED`
`createInvoice`
`fulfilment`
Entity relationships related to payments are documented below.
Name | Relationship Type | Comment |
Customer_Order | Zero-Many | A customer can place many orders at different times, so one
|
Customer_BillingAccount | Zero-Many | A customer can create many accounts each having its own account details so, one
|
Order_Fulfilment | Zero-Many | An Order can be split into many fulfillments due to different fulfilments being fulfilled from different locations or at different times, so 1
|
Order_BillingAddress | Zero-One | A customer can optionally add a billing address while ordering items from a store, so an
|
Order_Invoice | Zero-Many | An Order can have many invoices through the relationship of a fulfillment. An order can have multiple fulfillments and each fulfillment will have an invoice, so one
|
BillingAccount_BillingAddress | Zero-One | A customer can have one address per account so, a
|
FinancialTransaction_Payment | Zero-Many | A financial transaction can have multiple payment methods such as a Credit Card and a Gift Card, so a
|
Fulfilment_Payment | Zero-Many | A customer can pay for fulfillment through multiple payment methods such as a gift card and a credit card, so a
|
Payment_PaymentTransaction | One-Many | A payment will go through different stages such as authorised, captured, failure etc. Each stage is recorded as a payment transaction so, 1
|
Order_ReturnOrder | Zero-Many | A customer may want to return different items of order at different times hence creating multiple return orders for each item, so 1
|
ReturnOrder_CreditMemo | One-One | When an order is returned, or exchange happens, a credit memo is generated for the return order, so 1
|
BillingAcount_CreditMemo | Zero-Many | There can be multiple transactions, adjustments or refunds involved with a customer’s billing account. Each transaction or adjustment generates a new credit memo so, 1
|
CreditMemo_Payment | Zero-Many | If the initial payment was made by a credit card and PayPal account by a customer, the respective amount will be paid back to each of the payment methods so, one
|
The following queries are required to build a Payment solution:
Query | Description |
| Creates a new
|
| Creates a new
|
| Creates a new
|
| Creates a new
(Financial Transactions can also be created here using
|
| Creates a
|
| Creates a
|
| Updates the status of the
|
| Creates a new
|
| Updates a
|
| Creates a
|
| Creates a new
|
| Creates a new
|
| Creates a new
|
You can find all the GraphQL queries related to Payments here(deprecated).
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.