This section will provide guidelines for triggering and executing transactions on the third party when quotes are accepted.
Requirements
- The user must be on a Tier that allows transactions. Tiers are configured per Group using the Rehive Admin Dashboard.
- In order to execute any conversion transaction on a third party, all steps in Request a quote must be successfully completed.
- The quote information from the Request a quote steps will be used to trigger the associated transactions on the third-party ledger as well as the Rehive Platform. For this, it will need to store Collection ID’s from quotes provided to the Rehive Conversion Estension.
- Your custom extension will need to subscribe to Rehive transaction webhooks (see Rehive docs).
Steps
- The user accepts quote
- The Rehive Conversion Extension creates a pending transaction collection on the Rehive Platform
- The Rehive platform sends a transactiona webhook with the relevant transaction collection details
- Your custom extension matches the transaction
collection_id
to one stored against a quote and triggers the transaction to be executed on the third-party platform - The third-party platform returns the outcome (success/failure)
- Your custom extension patches the pending platform transaction with the outcome,
failed
orcomplete
using the/admin/transactions/{tx_code}/
endpoint.
Note
- This flow assumes that the transaction is linked to a
collection_id
that matches that of a previously processed quote. Any transaction webhooks received without a matchingcollection_id
should be ignored. - This process will be repeated for each transaction in the transaction collection.
- Once all transactions in the collection have been executed and updated, the quote should be fulfilled on any third-party and and the associated Rehive transactions completed.
Recommended additional configurations:
- Create and customize notifications using the Notifications Extension to ping users when a new withdraw transaction is processed.
- The Rehive Expressions Guide is useful for creating notifications with specific trigger variables.