XUMM SDK: 5. Security & finishing touch 🎉
Tags: xumm
Published: 2020-10-23 12:43:49

_Previous: [4. Verify the results ⛑ and push 🚀](https://dev.to/wietse/xumm-sdk-4-verify-the-results-and-push-381)_

If you have made it this far, you may want to actually build something (even if it's just a hobby project) using the XUMM SDK. If you do, please  **VERIFY THE PAYLOAD RESULT ON the XRP LEDGER**.

You can use the **XRPL-TxData** package, or use the `Sdk.getTransaction(txHash)` method to do this by relying on the XUMM platform to fetch the on ledger transaction outcome for you, or, for example, by using the `xrpl-txdata` package to verify 'locally'.

By using the `xrpl-txdata` package, you can connect to one of the public XRP ledger nodes and verify the transaction. To do so, add the `xrpl-txdata` package to your project by entering this in the terminal: `npm install xrpl-txdata`. You can then verify a transaction as per the [package documentation](https://www.npmjs.com/package/xrpl-txdata).

Pay special attention to the `balanceChanges` response.
**❗ There are several reasons why you need to check. For example, a payment can yield a different result (eg. lower amount sent) than requested!**

It is your responsibility to check the transaction outcome returned from the XRP ledger rather than relying on XUMM telling you that a transaction has been signed. For example if:

- The user signed successfully in XUMM, but with a key that is no longer valid for a certain account (because multisign has been configured, an account has been rekeyed, etc.)
- The user sent a Partial Payment (e.g., sending EUR to deliver XRP, while the owned amount of EUR was insufficient due to exchange rate slippage)
- The user tried to trick you into accepting a testnet payment, by signing with a funded Testnet account

Please take a look at [this sample code implementing the `xrpl-txdata` package](https://gist.github.com/WietseWind/6c6a3aefc551927ca42e73745e56a062) to verify on ledger balance changes for a signed XUMM payload.

![Verify on ledger transaction](https://lmjk5ut.dlvr.cloud/tx.gif)

# That's it! You made it 🎉

Thank you for reading this tutorial! We hope you had fun! If you have questions, suggestions, something to share: our contact details are available at https://xrpl-labs.com :)

## Resources 📚
If you want to learn more about the XUMM SDK, platform, documentation, etc., make sure to check out:

- The XUMM SDK [readme](https://www.npmjs.com/package/xumm-sdk)
- The XUMM SDK [source code](https://github.com/XRPL-Labs/XUMM-SDK)
- The XUMM API [documentation](https://xumm.readme.io/docs) & API [reference](https://xumm.readme.io/reference/about)
- XUMM (end user) [support docs](https://support.xumm.app/)
- In case of questions: [support@xumm.app](mailto:support@xumm.app?subject=XUMM+SDK+-+dev.to)

#### Thank you XRP Community!
... For checking, correcting & testing the SDK & tutorial!
[@technotip](https://twitter.com/technotip), [@calvincs](https://github.com/calvincs), [@wenusch](https://github.com/wenusch), [@alloyxrp](https://github.com/alloyxrp), [@rippleitinnz](https://github.com/rippleitinnz), [@Ubbah](https://github.com/Ubbah), [@enclavia](https://twitter.com/enclavia), [@WormholeMech](https://twitter.com/WormholeMech), [@Chicles_](https://twitter.com/Chicles_), [@3N0RYM](https://twitter.com/3N0RYM), [@XrpSpark](https://twitter.com/XrpSpark), [@devnullinator](https://twitter.com/devnullinator), [@Vetjes](https://twitter.com/Vetjes), [@KevinKing64](https://twitter.com/KevinKing64), [@Kujistudios](https://twitter.com/Kujistudios), [@nodehash](https://twitter.com/nodehash), [@4thMadHatter](https://twitter.com/4thMadHatter), [@Vkumzy](https://twitter.com/Vkumzy), [@CarpeDiemXRP](https://twitter.com/CarpeDiemXRP), [@Hex539](https://twitter.com/Hex539), [@xrplosion1](https://twitter.com/xrplosion1), [@chemical_realm](https://twitter.com/chemical_realm), [@RossMacFirdeen](https://twitter.com/RossMacFirdeen)