Explore Knowledge Base

Business Process

12. 11. 2024

BusinessProcess is any process that can cause balance change of Coin. Its main purpose is grouping transactions by business function they perform. For example, GateProcess can have up to 8 Transactions: several funds holds, accounting transfers, hold captures etc. So to show transaction history for a user we need to group them into a “container” which is our BusinessProcess. BusinessProcess class is defined as abstract to force developers to specify related business information in each implementation. JPA inheritance strategy is JOINED, so each subclass must have it’s own table and therefore migration for it.

Business Process Classes

Process Type Purpose Comments
BankProcess Business process for top up or withdrawal via bank.  
CardAttachmentProcess Business process of Payment Card verification.  
CardRefundProcess Returning funds to customer after they performed “processed” card payment.  
CashDeskProcess Process of manipulations with client coin via cash desk. Possible manipulations are: charge, redeem.  
CashbackPaymentProcess Payment for an invoice created by a merchant.  
ClientTransactionProcess Transaction between two coins.

Possible operations are: transfer between two client coins, splitting one client coin into two, merge two client coins into one, issue of a client coin, checking balance of a client coin, withdrawal from a client coin, issuing a prepaid coin or transfer from client’s coin to a prepaid coin, transfer from a prepaid coin to a client coin.

 
ContractTransitProcess Payment for a new contract settings.  
DepositProcess Operation, occurred with deposit coin: deposit top-up, payment of a profit form deposit, capitalization of profits, accruing deposit, paying out a deposit.  
ExchangeProcess Exchange process between coins.  
ExchangeReserveProcess Business process for top up or withdrawal exchange reserve wallet via bank.  
TopUpExchangeProcess* Process specifies top up part of an exchange process *deprecated in V4.17.0

new process: ExchangeProcess

WithdrawExchangeProcess* Process specifies withdraw part of an exchange process. *deprecated in V4.17.0

new process: ExchangeProcess

GateProcess Manipulation with a coin via gate: top-up, withdrawal, product purchase.  
MerchantBaseProcess

 
MerchantInvoiceProcess Customer pays for the invoice from merchant.  
MerchantPaymentProcess Customer pays for merchant’s product.  
SystemCashProcess

 
CashReserveProcess Transfer of cash or securities from cash desk or provider account coin to reserve coin and vice versa.  
InvestmentProcess Input of cash or securities into the system to cash desk or provider account coin.  

Business Process Types

businessProcess class businessProcess.

businessProcessType

UI field name (filter “Types”) businessProcessType
description
GateProcess gate_redeem Withdrawal via provider withdrawal from client coin through gate provider
ClientTransactionProcess client_transaction_transfer Transfer transfer from one client coin to another (from client-1 coin to client-2 coin)
ClientTransactionProcess client_transaction_issue Account creation creation a new client coin (transaction with amount = 0)
ClientTransactionProcess client_create_prepaid Voucher creation voucher creation from client coin
ClientTransactionProcess client_charge_prepaid Voucher activation payment of voucher amount to client coin
MerchantPaymentProcess merchant_payment Merchant payment payment for merchant goods and services to merchant coin
MerchantInvoiceProcess merchant_invoice Invoice the payment for the invoice that was created by merchant.
GateProcess gate_charge Top up via provider top up of client coin through gate provider
GateProcess gate_purchase Purchase via provider product purchase using client coin
GateProcess gate_issue_card Issue Card issue card using client coin
ExchangeProcess exchange_transaction Currency exchange currency exchange operation
ExchangeReserveProcess exchange_reserve_top_up Top up Exchange reserve top up of exchange reserve coin from bank account
ExchangeReserveProcess exchange_reserve_withdraw Withdraw Exchange reserve withdraw from exchange reserve coin to bank account
CashDeskProcess cash_desk_redeem Withdrawal via cash desk withdrawal from client coin through cash desk
CashDeskProcess cash_desk_charge Top up via cash desk top up of client through cash desk
InvestmentProcess cash_investment Provider/cash desk account top up investment money to cash desk
CashReserveProcess cash_collect Cash collect money movement between cash desks (collect money)
CashReserveProcess cash_input Cash input money movement between cash desks (input money)
ContractTransitProcess contract_transit Contract change fee  
BankProcess bank_topup Topup via bank top up of client coin from bank account
BankProcess bank_redeem Withdrawal via bank withdrawal from client coin to bank account

Business Process Statuses

BusinessProcessStatus reflects steps in BusinessProcess flow.

Business process is created in either pending or limited statuses and transits to declined, rejected, error or processed, waiting_for_approval statuses.

See more details about limited operations management

Business Process Status

Current status State State transition flow Description
limited In progress Success
Failed
Process is restricted by limit profile and need to be approved by anti-fraud specialist
pending In progress Success
Failed
Process is created and waits for processing, declining or rejecting
processed Success n/a Pending operation is processed. This status is happened in conditions:

  • when transaction is completed

or

  • if this BP is composite all child BP processes should also be processed
error Failed n/a Error occurs while processing
declined Failed n/a Pending process is declined
rejected Failed n/a Limited process was rejected by anti-fraud
waiting_for_approval In progress Success
Failed
Process was created and is waiting for approval by Compliance or Administrator

Business Process Flow

Status Can transit to Transition Reason
pending processed The process was completed successfully.

declined The process is declined because of some decision. For example, when the accountant decides to decline request to withdraw funds via cash desk.

error The process failed due to some internal exception.
limited processed Anti-fraud specialists approved the process and it was completed successfully.

rejected Anti-fraud specialists rejected the  process.

pending The process, which anti-fraud specialist approved, is waiting to be processed.

error The process failed due to some internal exception.
waiting_for_approval pending Issue card process was approved by the service role and is waiting to be processed
  declined Issue card process is declined because of some decision.
  error The process failed due to some internal exception.

 

Dependency on business process statuses and balance updates

Transfer, TopUp via Provider, BankTopUP etc.

Operations performed within a single session. If the session was successful, the money is withdrawn, if not, the money is in its initial (before the operation) state.

Withdrawal via Provider etc.

The transactions are distributed (additional condition fulfillment is required). During the first session, the money was on hold.

In the second session:

  • if the transaction is approved, the money is captured and sent to the recipient’s wallet
  • if the operation is declined, then the money is reversed and returned to the sender’s wallet
  • if an error occurs (within the second session), the money is in the state as before the second session start – on the hold

Business process and transaction identifiers in POST/transactions/view

  • id – ID of the business process (operation) in SDK system
  • requestIdentifier – ID of the business request as a part of the business process (present for distributed operations, e.g. Top up via bank, Top up via cash desk, etc.)
    • externalProcessId – ID of the transaction from the provider system, will return from the response if the provider sets it and returns in the integration. Present only for GateProcess operations. This identifier can be used to track transactions in both, SDK and provider systems
  • transactions[0].id – ID of the atomic transactions (e.g. merge, issue, transfer) inside the business process
  • refundProcess.id
    • if operation type: gate_purchase – ID of the refund business process that was created for the original operation
    • if operation type: gate_refund – ID of the original business process that was refunded

txIdToRefund – transaction ID to be used for Refund operation