Transactions
Create transaction
To create transaction, you can follow the flow outlined below.
List of queries and mutations in use:
- userQueries:
- endUser
- recipients
- userMutations:
- createTransaction
- publicQueries:
- corridorsGroups
- purposes
- calculateAmount
On createTransaction
you should re-fetch user data related to the amounts send and delivered, and raisedFlags.
Inbound selection for the transaction
Once transation is created, you can instruct user to make payment for the transaction.
Present InboundServiceType
list for user to select inbound:
- If there are items in
paymentMethods
show them all withaccount.name
, if not - you can show an image based on the code or present
displayName
;
When user selects inbound (if there are paymentMethods
provide paymentMethodId
, inbound
: is InboundServiceType.code
) use mutation userMutations.initiatePayment
: InboundResponseType
Based on inbound integration, InboundResponseType
can have different values and flows:
- If a
newTab
istrue
open new tab withnavigateURL
value;
List of queries and mutations in use:
- userQueries:
- inbounds
- userMutations:
- initiatePayment
Continue transaction
To be able to continue an transaction, check on the continue
attribute on Transaction
. For this transactions you can start from inbound selection for the transaction.
Cancel transaction
To be able to cancel an transaction, check on the canCancel
attribute on Transaction
. For cancelation use userMutations.cancelTransaction
mutation.
Transaction history
To show transaction history for transaction use userQueries.transactionHistory
query.