Incoming TRP Transactions
Setting the Scene
In this scenario, your customer is the beneficiary. The customer wants to receive funds from an originator who is a customer of a third party VASP, a.k.a. a counterparty VASP.
In this guide, the necessary steps are listed to integrate the described scenario using the 21 Travel Rule GraphQL API.
Add Support for Travel Address in UI
Your customer needs to be able to obtain his Travel Address from your UI. You have created a wallet address by adding him to the Address Book. Once he's able to obtain his Travel Address, he can share it with the payer.
React to TRP Events
The { trpdTransactions }
subscription will emit events, whenever a TRP
transaction's status changes, returning a complete TrpdTxUnion
object.
At some point, you will receive inquiries from your counterparty VASPs through
TRP. You can identify them using the status
and type
fields on the object
returned from the subscription.
Note that inquires from unknown VASPs that try to inquire to your VASP for the
first time will also emit events but with status
of BLOCKED
. It is only
possible to proceed after the corresponding
VASP has been marked as trusted.
Depending on the details found in the returned object you can choose to approve
or decline the transaction using the { trpd { assessTx } }
mutation. Note that
in case of an approval the wallet address in your customer's Address Book entry
will be shared with the counterparty VASP which it will use for the transaction.
Optionally, you can listen for your counterparty VASP's confirmation which
contains the blockchain transaction ID which might be useful to correlate with
your custody system. Again, you can identify them using the status
and type
fields on the object returned from the subscription. Alternatively, you can
identify on the presence of the txId
field as only confirmed TRP transactions
have a non-null txId
value.