Webhooks
The web wallet webhooks allow you to build or setup integrations for dapps or payment flows.
The web wallet webhooks are links that point the user of the wallet to either login or populate a "send transaction" form with the provided arguments. Once the action is performed, the user is redirected to the provided callback URL along with a success or error status.
Login hook
This is useful when you need to find the user's wallet address. A common use case is that, starting from this address you can query the API for the wallet's balance or recent transactions.
URL Parameters
https://wallet.multiversx.com/hook/login?callbackUrl=https://example.com/
Param | Required | Description |
---|---|---|
callbackUrl | REQUIRED | The URL the user should be redirected to after login. |
Upon a successful login, the user is redirected back to the callback URL along which the user's address is appended.
Callback URL Parameters
https://example.com/?address=erd1axhx4kenjlae6sknq7zjg2g4fvzavv979r2fg425p62wkl84avtqsf7vvv
Param | Description |
---|---|
address | The users's Address (bech32). |
Send transaction hook
This is useful when you need to prepopulate a transaction required to send an EGLD amount or pre-populate the transaction's data field with a smart contract function invocation.
URL Parameters
https://wallet.multiversx.com/hook/transaction?receiver=erd1qqqqqqqqqqqqqpgqxwakt2g7u9atsnr03gqcgmhcv38pt7mkd94q6shuwt&value=0&gasLimit=250000000&data=claimRewards&callbackUrl=https://example.com/
Param | Required | Description |
---|---|---|
receiver | REQUIRED | The receiver's Address (bech32). |
value | REQUIRED | The Value to transfer (can be zero). |
gasLimit | OPTIONAL | The maximum amount of Gas Units to consume. |
data | OPTIONAL | The message (data) of the Transaction. |
callbackUrl | OPTIONAL | The URL the user should be redirected to after login. |
Callback URL Parameters
https://example.com/?status=success&txHash=48f68a2b1ca1c3a343cbe14c8b755934eb1a4bb3a4a5f7068bc8a0b52094cc89&address=erd1axhx4kenjlae6sknq7zjg2g4fvzavv979r2fg425p62wkl84avtqsf7vvv
Param | Description |
---|---|
status | Success / failure of sending transaction. |
txHash | The transaction's hash. |