XUMM PYTHON SDK: 3. Your first payload 🔔
Tags: xrpl, xrp, xumm, sdk
Published: 2022-02-28 17:47:40

Previous: [2. Prepare your project and start coding 🔨](https://dev.to/dangell7/python-xumm-sdk-2-prepare-your-project-and-start-coding-1ige)

Now that we have established a connection to the XUMM platform using the XUMM SDK, it is time to actually send something that we can sign. We will send a "transaction template" to the XUMM platform, called a `Payload`. The lifecycle of a payload is explained [in more detail](https://xumm.readme.io/docs/payload-workflow) in the XUMM API documentation.

Some things to consider:

1. A payload (sign request) sent to the XUMM platform should be formatted as per [XRP ledger transaction specificaftions](https://xrpl.org/transaction-types.html), but some fields may be omitted as XUMM will automatically fill them in if able to do so.
2. Usually, a payload sent to the XUMM platform will be signed by the end user (e.g., for a sign in, subscription, payment, ...). For this tutorial, you will be the initiator and the end user, either signing or rejecting the payload.
3. The **first sign request** from a specific XUMM app will **always** have to be **scanned using a QR** code on the desktop **or redirected in the case of a smartphone**. Once an end user trusts your application, by signing your request, your application can obtain a user specific `user token` to deliver future sign requests using push notifications.
4. This tutorial is running on your own computer, from the terminal so we will need to copy then paste a sign request URL to our browser. In a real life application, a nicer flow for end users can be created with redirects / [live status updates](https://xumm.readme.io/docs/payload-status#websocket) / [push and fallback QR codes](https://xumm.readme.io/docs/pushing-sign-requests), etc.

Our first payload will be a `Payment` transaction type. A basic `Payment` payload you can send to the XUMM platform would be as per the following example:

{% gist https://gist.github.com/dangell7/40724f53e9798e8cab67fe9708b9b1be %}

If, like in the minimal example above, no amount is entered, the end user will be able to select the currency and amount to send in XUMM after opening the sign request. You could also add more details to your payload, as per the following example:

{% gist https://gist.github.com/dangell7/ffae27f8a81c128007aa184f5be11aa4 %}

This sample specifies an amount in Drops (one XRP is one million Drops, the featured **ten thousand drops** represents 0.01 XRP) and a Memo ([HEX encoded string](https://gist.github.com/WietseWind/5cbcc8d15fa2be3ae7d4c20962af0a8e)). We will use this example in our code.

_Please change the destination account to an account that you own (remember to use your destination tag if this is required), or if you wish, you can test by sending a small amount of XRP to the XRPL Labs team by using the account in the example._

We are going to use the `sdk.payload.create()` code to do this. We will provide two arguments to the `sdk.payload.create(..., ...)` code.

The first argument will be our payload (like in our previous example above) and in the second argument we will provide a flag (boolean, `True`) telling the code to return an error, if one occurs.

Our code now looks like this:

{% gist https://gist.github.com/dangell7/1a617791f29da40d28651d049e4305c5 %}

Let's run the code. In the terminal panel, type the previously issued command to run our code: `python3 playground.py`. This should get you your very first XUMM sign request 🎉



![Blog.3.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f3ccqb3fcn3hnduts3dq.gif)

**Next:**

**[4. Verify the results ⛑ and push 🚀](https://dev.to/dangell7/xumm-python-sdk-4-verify-the-results-and-push-47nd)**

[5. Security & finishing touch 🎉](https://dev.to/dangell7/xumm-python-sdk-5-security-finishing-touch-5gd2)

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

The XUMM SDK (PY) [readme](https://test.pypi.org/project/xumm-sdk-py-dangell7)
The XUMM SDK (PY) [source code](https://github.com/XRPL-Labs/xumm-sdk-py)
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/hc/en-us)
In case of questions: support@xumm.app