Disaggregated Payment (CLA to CLI) Overview:
When requesting a disaggregated payment, please note the following guidelines and exceptions:
- The funding account must be a CLA (Customer Linked Account).
- The customer must provide a unique reference that will be stored and can be accessed at both the client account level and source account level.
- Once the customer instruction is successfully processed, client receipts and the lump sum amount from CLA should be settled near real-time on the applicable accounts.
Exceptions and Error Handling
Client Account Issues If the customer instruction contains details of a client account that:
- Does not exist
- Has an active restraint
Then:
- The associated client transaction amount will not be distributed.
- The lump sum amount for disaggregation must be revised/updated (excluding the client transaction amount) before it is paid from the CLA.
- The status of the disaggregated transaction will indicate the existence of exception(s). For example: “Disaggregated transaction is processed with exceptions” (Note: The actual message may vary).
- The exception account and details (client account, transaction amount, exception reason, disaggregation reference) will be recorded and can be queried by the customer.
CLA Payment Failure In case of failure of payment from CLA (e.g., insufficient funds):
- The exception will be reflected in the status of the disaggregated payment.
- All associated client receipts will not be processed.
General Validation Exceptions The request will not proceed and the exception will be made available to the customer in the following cases:
- Mandatory fields missing from request
- Invalid data (e.g., CLA detail, account format, etc.)
- Duplicate disaggregated transaction reference (i.e., not unique)
- Incorrect total number of instructions
- Incorrect total value of instructions
Create Disaggregated Payment
Mutation: doEncrypted (action: aggregate-payment, creditDebit: CREDIT)
This mutation creates a new disaggregated payment in the system, taking into account the guidelines and exceptions mentioned above.
mutation ($input: EncryptedInput!) {
doEncrypted(i: $input) {
commandId
}
}
Variables:
{
"input": {
"encryptedPayload": {
"action": "aggregate-payment",
"reference": "DeAgg CLAtest 44",
"customer-transaction-reference": "Deagg CLA 16062022",
"externalAccount": {
"customer-linked-account": {
"id": "Q3VzdG9tZXJMaW5rZWRBY2NvdW50OmEwODQxNzcyN2E4ZjNkODEyYTViMDY4ZDRjZjU4YTRiMmY5NWE5ZTg1OGU4YThlOTNmMWQ3MDkyNThmZjMzZmI="
}
},
"count": 2,
"total-amount": {
"value": "44.00",
"currency": "AUD",
"creditDebit": "CREDIT"
},
"instructions": [
{
"account": {
"id": "QWNjb3VudDo1OTNmYThlMGFiNzQ4NDRmNzU0Y2M0ZGQ4MTA2ZTc5ZTEzYjhjNjgzMzc1NDBmNGMyNzc2OTRmZjhkNWRmYjVh"
},
"amount": {
"value": "27.00",
"currency": "AUD",
"creditDebit": "CREDIT"
},
"tracing-id": "Trace ID ref 25",
"narrative": "ref 25"
},
{
"account": {
"id": "QWNjb3VudDpiMTFiYWQ3YzkzODFiZjA3MjMzOTE0YmM0OTljM2QwMTM2OGU3NTFhNTRkNjMxNzdhNDIxOTA5MjljMTQ0MDIz"
},
"amount": {
"value": "17.00",
"currency": "AUD",
"creditDebit": "CREDIT"
},
"tracing-id": "Trace ID ref 15",
"narrative": "ref 15"
}
]
}
}
}
Input Fields
The EncryptedInput
contains an encryptedPayload
with the following fields:
Field | Type | Description |
---|---|---|
action | SCALAR! | Action type, set to “aggregate-payment” for disaggregated payments |
reference | SCALAR | Unique reference for the disaggregated payment |
customer-transaction-reference | SCALAR | Customer’s reference for the transaction |
externalAccount | UNION | Contains the customer-linked-account / destination account details |
count | SCALAR | Number of instructions |
total-amount | OBJECT | Total amount and currency of the disaggregated payment |
instructions | OBJECT! | List of payment instructions |
Instruction Object
Field | Type | Description |
---|---|---|
tracing-id | SCALAR | tracing identifier for the instruction |
narrative | SCALAR | Description of the instruction |
account | OBJECT | Contains the account ID to debit |
amount | OBJECT | Amount and currency for this instruction |
Query Disaggregated Payment Creation Command Status
Query: node
This query retrieves the status of a command, such as the disaggregated payment creation command.
query QueryCommand {
node(id: "Q29tbWFuZDo5NDNmMjAzMi0zY2QwLTQ4NGMtYWI0Zi0xY2FjOGQxYjY1ZjM=") {
... on EncryptedCommand {
action
id
state
user
unencryptedCommand {
... on AggregatePaymentExecuteCommand {
action
id
state
invalid {
code
field
reason
}
aggregatePayment {
count
successfulCount
failedCount
totalAmount {
value
}
totalAmountSuccessful {
value
}
totalAmountFailed {
value
}
customerTransactionReference
paymentRequestState
instructions {
edges {
node {
narrative
account {
accountNumber
balances {
available {
value
}
}
}
amount {
creditDebit
currency
value
}
state
failure
tracingId
}
}
}
}
}
}
}
}
}
Input Fields
Field | Type | Description |
---|---|---|
id | SCALAR! | The ID of the command to query |
CommandState
The command state
field in the response can have the following values. note that command state is different from the paymentRequestState state.
SUBMITTED
SUCCESSFUL
PARTIALLY_SUCCESSFUL
FAILED
PaymentState
The paymentRequestState state
field in the response can have the following values.
SUBMITTED
RECEIVED
PENDING
PROCESSING
COMPLETED
COMPLETED_WITH_ERRORS
REJECTED
Response
{
"data": {
"node": {
"action": "DO-ENCRYPTED-COMMAND",
"id": "Q29tbWFuZDo5NDNmMjAzMi0zY2QwLTQ4NGMtYWI0Zi0xY2FjOGQxYjY1ZjM=",
"state": "SUCCESSFUL",
"user": "SJTRADING",
"unencryptedCommand": {
"action": "AGGREGATE-PAYMENT-EXECUTE",
"id": "Q29tbWFuZDpmMzg2ZjFjMzU3N2IyZGY0OGYzNzc5ZGJhM2I5ZjBlZTVkOGQ2ZjgyYWJmNGU0ZDg3MjMzYjRjYTk2YWI3OWU3",
"state": "SUCCESSFUL",
"invalid": [],
"aggregatePayment": {
"count": 2,
"successfulCount": 1,
"failedCount": 1,
"totalAmount": {
"value": "49.00"
},
"totalAmountSuccessful": {
"value": "20.00"
},
"totalAmountFailed": {
"value": "29.00"
},
"customerTransactionReference": "ct ref closed 49",
"paymentRequestState": "COMPLETED",
"instructions": {
"edges": [
{
"node": {
"narrative": "ref ac 29",
"account": {
"accountNumber": "173361044",
"balances": [
{
"available": {
"value": "0.00"
}
}
]
},
"amount": {
"creditDebit": "CREDIT",
"currency": "AUD",
"value": "29.00"
},
"state": "FAILED",
"failure": [
"Account is closed"
],
"tracingId": "trace ac 29"
}
},
{
"node": {
"narrative": "ref 20",
"account": {
"accountNumber": "173358181",
"balances": [
{
"available": {
"value": "47.01"
}
}
]
},
"amount": {
"creditDebit": "CREDIT",
"currency": "AUD",
"value": "20.00"
},
"state": "SUCCEEDED",
"failure": null,
"tracingId": "trace 20"
}
}
]
}
}
}
}
}
}
Response Fields
The following table explains the structure and meaning of each field in the response:
Field | Type | Description |
---|---|---|
data.node | INTERFACE | The entity containing information about the command |
data.node.action | SCALAR! | The operation type of the command, “DO-ENCRYPTED-COMMAND” |
data.node.id | SCALAR! | The unique identifier of the command |
data.node.state | ENUM! | The current state of the encryption command, “SUCCESSFUL” |
data.node.user | SCALAR! | The user who initiated the command, “SJTRADING” |
data.node.unencryptedCommand | INTERFACE | Contains nested command in the encrypted payload |
unencryptedCommand.action | SCALAR! | The specific action of the unencrypted command, “AGGREGATE-PAYMENT-EXECUTE” |
unencryptedCommand.id | SCALAR! | The unique identifier of the unencrypted command |
unencryptedCommand.state | ENUM! | The current state of the encryption command, “SUCCESSFUL” |
unencryptedCommand.invalid | OBJECT! | List of any invalid fields or errors (empty in this case) |
unencryptedCommand.aggregatePayment | OBJECT | Contains the business process node of the aggregated payment |
aggregatePayment.count | SCALAR | The total number of instructions in the payment, 2 |
aggregatePayment.successfulCount | SCALAR | The number of successful instructions, 1 |
aggregatePayment.failedCount | SCALAR | The number of failed instructions, 1 |
aggregatePayment.totalAmount.value | SCALAR! | The total amount of the aggregate payment, here “49.00” |
aggregatePayment.totalAmountSuccessful.value | SCALAR! | The total amount of successful transactions, here “20.00” |
aggregatePayment.totalAmountFailed.value | SCALAR! | The total amount of failed transactions, here “29.00” |
aggregatePayment.customerTransactionReference | SCALAR | Customer’s reference for the transaction, here “ct ref closed 49” |
aggregatePayment.paymentRequestState | ENUM | The state of the payment request, here “COMPLETED” |
aggregatePayment.instructions | OBJECT | Contains the list of individual payment instructions |
instructions.edges[].node | INTERFACE | Individual instruction details |
instructions.edges[].node.narrative | SCALAR | Description or reference for the instruction |
instructions.edges[].node.account | OBJECT | Account details for the instruction |
instructions.edges[].node.account.accountNumber | SCALAR | The account number for the instruction |
instructions.edges[].node.account.balances | Array | List of balance information for the account |
instructions.edges[].node.account.balances[].available.value | String | Available balance in the account |
instructions.edges[].node.amount | OBJECT | Details of the instruction amount |
instructions.edges[].node.amount.creditDebit | ENUM! | Indicates if it’s a credit or debit, “CREDIT” |
instructions.edges[].node.amount.currency | SCALAR! | The currency of the transaction, “AUD” |
instructions.edges[].node.amount.value | SCALAR! | The amount of the individual instruction |
instructions.edges[].node.state | ENUM | Current state of the instruction, “SUCCEEDED” |
instructions.edges[].node.failure | SCALAR | Reason for failure if the instruction failed, null if succeeded |
instructions.edges[].node.tracingId | SCALAR | Unique identifier for the instruction |