SaFi Bank Space : Postings library - Core transaction types

List of transactions in this document:

Common runtime variables:

  • amount

    • amount of the transaction

  • clientTransactionId

    • UUID string which identifies client transaction

  • denomination

    • String representing the denomination: PHP

Common static variables:

  • bankTransactionCode

    • must be specified for each generated transaction

Transfer

Instruction type: Transfer

“This instruction transfers an amount from one Vault account to another, in the committed phase. Effectively this instruction debits a Vault customer and credits another for the same amount, yielding two postings.” (from TM documentation)

Debtor account type: debitAccountType

Debtor address: Default address of the account based on debitAccountType

Creditor account type: creditAccountType

Creditor address: Default address of the account based on creditAccountType

Phase: Committed

Field

Type

Description

debitAccountId

runtime

Debited customer account ID. Must be customer's account.

creditAccountId

runtime

Credited customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

debitAccountType

static

Account type enum value which will be debited. Current values are MainAccount, PocketAccount, LoanAccount, InternalAccount

creditAccountType

static

Account type enum value which will be debited. Current values are MainAccount, PocketAccount, LoanAccount, InternalAccount

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

CustomCustomerToCustomer

Instruction type: CustomInstruction

“This specialist instruction provides the ability to directly write postings to the Postings ledger. It is a powerful instruction that can be used to model financial movements that do not map to any of the other instruction types. In fact, it is possible to recreate all the other instruction types’ side effects using this instruction.” (from TM documentation)

This special instruction allows send funds between two customer’s accounts. Custom addresses can be defined in static parameters.

Debtor account type and address: determined based on debitAccountAddress parameter

Creditor account type and address: determined based on creditAccountAddress parameter

Phase: Committed

Field

Type

Description

debitAccountId

runtime

Debit customer account ID. Must be customer's account.

creditAccountId

runtime

Credit customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

debitAccountAddress

static

Source address of debit account

creditAccountAddress

static

Destination address of credit account

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

CustomCustomerToInternal

Instruction type: CustomInstruction

“This specialist instruction provides the ability to directly write postings to the Postings ledger. It is a powerful instruction that can be used to model financial movements that do not map to any of the other instruction types. In fact, it is possible to recreate all the other instruction types’ side effects using this instruction.” (from TM documentation)

This special instruction allows send funds from customer account to internal account. Custom addresses can be defined in static parameters only for debit account - customer’s account. Internal account’s address is always DEFAULT.

Debtor account type and address: determined based on debitAccountAddress parameter

Creditor account type and address: InternalAccount.Default

Phase: Committed

Field

Type

Description

debitAccountId

runtime

Debit customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

debitAccountAddress

static

Source address of debit account

creditInternalAccountId

static

Internal account name from InternalAccounts enum

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

CustomCustomerToSelf

Instruction type: CustomInstruction

“This specialist instruction provides the ability to directly write postings to the Postings ledger. It is a powerful instruction that can be used to model financial movements that do not map to any of the other instruction types. In fact, it is possible to recreate all the other instruction types’ side effects using this instruction.” (from TM documentation)

This special instruction allows send funds between addresses on same account.

Debtor account type and address: determined based on debitAccountAddress parameter

Creditor account type and address: determined based on creditAccountAddress parameter

Phase: Committed

Field

Type

Description

accountId

runtime

Debit customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between addresses

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

debitAccountAddress

static

Source address of debit account

creditAccountAddress

static

Target address of credit account

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

CustomInternalToCustomer

Instruction type: CustomInstruction

“This specialist instruction provides the ability to directly write postings to the Postings ledger. It is a powerful instruction that can be used to model financial movements that do not map to any of the other instruction types. In fact, it is possible to recreate all the other instruction types’ side effects using this instruction.” (from TM documentation)

This special instruction allows send funds from internal account to customer account. Custom addresses can be defined in static parameters only for credit side - customer’s account. Internal account’s address is always DEFAULT.

Debtor account type and address: InternalAccountDefault

Creditor account type and address: determined based on creditAccountAddress parameter

Phase: Committed

Field

Type

Description

creditAccountId

runtime

Debit customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

debitInternalAccountId

static

Internal account name from InternalAccounts enum

creditAccountAddress

static

Target address of credit account

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

CustomInternalToInternal

Instruction type: CustomInstruction

“This specialist instruction provides the ability to directly write postings to the Postings ledger. It is a powerful instruction that can be used to model financial movements that do not map to any of the other instruction types. In fact, it is possible to recreate all the other instruction types’ side effects using this instruction.” (from TM documentation)

This special instruction allows send funds from internal account to another internal account. Internal accounts addresses are always DEFAULT. Debit and credit accounts are defined statically in yaml definition of a transaction.

Debtor account type and address: InternalAccountDefault

Creditor account type and address: InternalAccountDefault

Phase: Committed

Field

Type

Description

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

debitInternalAccountId

static

Internal account name from InternalAccounts enum

creditInternalAccountId

static

Internal account name from InternalAccounts enum

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

InboundHardSettlement

Instruction type: InboundHardSettlement

"This instruction credits a customer’s account in the committed phase, with no intent to further modify the state of the client transaction. It also debits an internal account to follow the double-entry accounting model.

An example use case is exposed by the FPS payment scheme’s inbound payment returns. The scheme dictates that inbound returns must be accepted by the receiving bank. The phase is committed for both postings because, as far as the scheme is concerned, the financial transaction has taken place on their books. Consequently, there is no use for an authorisation phase - Vault must accept these funds." (from TM documentation)

Debtor account type and address: InternalAccountDefault

Creditor account type: determined based on accountType

Creditor address: Default address of the account based on accountType

Phase: Committed

Field

Type

Description

accountId

runtime

Credited customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

internalAccountId

static

Internal account name from InternalAccounts enum

accountType

static

Account type enum value which will be credited. Current values are MainAccount, PocketAccount, LoanAccount, InternalAccount

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

OutboundHardSettlement

Instruction type: OutboundHardSettlement

"This instruction debits a customer’s account in the committed phase, with no intent to further modify the state of the client transaction. It also credits an internal account to follow the double-entry accounting model.

For example, a payment integration might model a cash withdrawal as an outbound hard settlement." (from TM documentation)

Debtor account type: accountType

Debtor address: Default address of the account based on accountType

Creditor account type and address: InternalAccount.Default

Phase: Committed

Field

Type

Description

accountId

runtime

Debited customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

internalAccountId

static

Internal account name from InternalAccounts enum

accountType

static

Account type enum value which will be debited. Current values are MainAccount, PocketAccount, LoanAccount, InternalAccount

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

OutboundAuthorisation

Instruction type: OutboundAuthorisation

"This instruction debits a customer account, and credits a provided internal account, with a pending outgoing phase. Effectively this instruction ringfences customer funds. When an outbound authorisation is created, it implicitly opens a client transaction that is to be mutated by other instructions at a later date.

An example use case for this instruction is a card payment at a petrol station. The scheme may request an authorisation of £100. Later, a settlement can be submitted against this client transaction to release the ringfenced funds and debit the customer’s account with a committed phase." (from TM documentation)

Debtor account type: accountType

Debtor address: Default address of the account based on accountType

Creditor account type and address: InternalAccount.Default

Phase: Pending outgoing

Field

Type

Description

accountId

runtime

Debited customer account ID. Must be customer's account.

amount

runtime

Amount of the transaction moved between accounts

denomination

runtime

Denomination of transaction.

clientTransactionId

runtime

UUID string which identifies client transaction

internalAccountId

static

Internal account name from InternalAccounts enum

accountType

static

Account type enum value. Current values are MainAccount, PocketAccount, LoanAccount, InternalAccount

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

AuthorisationAdjustment

Instruction type: AuthorisationAdjustment   

"If accepted, this instruction changes an existing client transaction. More specifically, an authorisation adjustment adjusts the amount authorised by an earlier authorisation.

In order to process an authorisation adjustment, the Postings API looks up the client transaction specified in the instruction and is able to infer its direction (inbound or outbound). Currently this instruction can only be chained to outbound client transactions because no use case for inbound authorisation adjustments has been identified. This instruction attempts to further debit (or credit) a positive (or negative) amount to a customer account, and credit (or debit) a provided internal account, both with a pending outgoing phase. Effectively this means that Vault increases (or decreases) the amount ringfenced by a client transaction.

An example of this is a hotel reservation:

An outbound authorisation is submitted when the hotel is booked.

A week later, the customer decides to extend their stay at the hotel; the hotel requests an authorisation adjustment to a higher amount.

At the end of the stay, the client transaction is settled using a settlement." (from TM documentation)

Currently supports only adjustment of outbound authorization.

Debtor account type and address: MainAccount.Default

Creditor account type and address: InternalAccount.Default

Phase: Pending outgoing

Field

Type

Description

amount

runtime

Authorized amount

clientTransactionId

runtime

UUID string which identifies client transaction

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

AuthorisationAdjustmentByReplacement

Instruction type: AuthorisationAdjustment

AuthorisationAdjustmentByReplacement is same transaction type as AuthorisationAdjustment with the difference in only one parameter:

  • replacementAmount: Instead of delta amount you specify a new amount, to replace the existing authorized amount

Currently supports only adjustment of outbound authorization.

Debtor account type and address: MainAccount.Default

Creditor account type and address: InternalAccount.Default

Phase: Pending outgoing

Field

Type

Description

replacementAmount

runtime

Replaces authorized amount by new value based on clientTransactionId

clientTransactionId

runtime

Parameter of posting instruction send to TM.

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

Release

Instruction type: Release

"If accepted, this instruction closes an existing client transaction by releasing funds ringfenced by a client transaction. No instruction can be chained after a release.

In order to process a release, the Postings API looks up the client transaction specified in the instruction and is able to infer its direction (inbound or outbound). It calculates the amount of funds ringfenced and then makes the relevant postings (credit and debits) needed to offset these ringfenced funds. Effectively this means Vault reduces the amount ringfenced by this client transaction to zero." (from TM documentation)

Currently supported release is only for outbound authorization.

Phase: Pending outgoing

Field

Type

Description

clientTransactionId

runtime

UUID string which identifies client transaction

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.

Settlement

Instruction type: Settlement

“This is the most complex of the instruction types. It is used to convert ringfenced funds into actual posting (debits and credits) in the committed phase. In order to process a settlement, the Postings API looks up the client transaction specified in the instruction and is able to infer its direction (inbound or outbound).

For example, a settlement for an outbound client transaction has two fields which can be used in different ways: the amount field can be left empty and the final field can be set to true or false to indicate that the client transaction should be closed.

Let us look at how these fields let a caller model a complex financial process. Note that in the scenarios below, we do not discuss internal account movements, given that they mirror the movements on the customer accounts, and are documented in the Core API section.” (from TM documentation)

Currently supported settlement is only for outbound authorization.

There are 4 committed postings.

Two (2) postings for Pending outgoing which transfers funds from internal account to customer account:

Phase: Pending outgoing

Two (2) postings for settle authorized amount which transfers funds from customer account to internal account:

Phase: Committed

Field

Type

Description

clientTransactionId

runtime

UUID string which identifies client transaction

bankTransactionCode

static

Bank transaction code - each transaction has static in defined in yaml.