# Aptos Payload Transactions To create an Aptos transaction, you need to provide the following: - The gas configuration - The serialized transaction [payload](https://aptos.dev/en/network/blockchain/txns-states#types-of-transaction-payloads) in base64 format The following example creates a transaction request that swaps Aptos (APT) to PancakeSwap (CAKE) on [SushiSwap](https://aptos.pancakeswap.finance/swap). The request should be signed, as demonstrated [here](/developers/authentication#request-signing). ```json { "signer_type": "api_signer", "type": "aptos_transaction", "details": { "type": "aptos_serialized_entry_point_payload", "chain": "aptos_mainnet", "gas_config": { "price": { "type": "priority", "priority": "medium" }, }, "serialized_transaction_payload": "AsfvtAdtvhQ8vNmM+qqSns/I8pkgPf/2O5XMtr/hmFD6BnJvdXRlchpzd2FwX2V4YWN0X2lucHV0X2RvdWJsZWhvcAMHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKYXB0b3NfY29pbglBcHRvc0NvaW4AB14VbxIH0Ov6Ganu/wDWKigiePuHGfT6s6WGoKLA//vqBGNvaW4BVAAHFZ32t2iUNwFhCKAZ/Vvvc2usaSttSh8QyUH2+7mnTKYDb2Z0B0Nha2VPRlQAAgighgEAAAAAAAjjYAUAAAAAAA==" }, "note": "Swapping APT to CAKE", "vault_id": "8988893a-cf29-4a02-acc7-5bb723c74f47" } ``` ## Aptos SDK for building serialized transaction payload Building the serialized transaction payload can be done using any of several [Aptos SDKs](https://aptos.dev/en/build/sdks). One example is the [Aptos Python package](https://github.com/aptos-labs/aptos-python-sdk). The following example demonstrates how to obtain the serialized payload of the swap transaction from APT to CAKE on SushiSwap. First, [install](https://github.com/aptos-labs/aptos-python-sdk?tab=readme-ov-file#requirements) the Aptos Python package, and run the following snippet to obtain the serialized payload: ```python import base64 import aptos_sdk import aptos_sdk.account import aptos_sdk.account_address import aptos_sdk.async_client import aptos_sdk.bcs import aptos_sdk.transactions import aptos_sdk.type_tag entry_function = aptos_sdk.transactions.EntryFunction.natural( module="0xc7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa::router", function="swap_exact_input_doublehop", ty_args=[ aptos_sdk.type_tag.TypeTag(aptos_sdk.type_tag.StructTag.from_str("0x1::aptos_coin::AptosCoin")), aptos_sdk.type_tag.TypeTag(aptos_sdk.type_tag.StructTag.from_str("0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea::coin::T")), aptos_sdk.type_tag.TypeTag(aptos_sdk.type_tag.StructTag.from_str("0x159df6b7689437016108a019fd5bef736bac692b6d4a1f10c941f6fbb9a74ca6::oft::CakeOFT")), ], args=[ aptos_sdk.transactions.TransactionArgument( value=100000, encoder=aptos_sdk.bcs.Serializer.u64, ), aptos_sdk.transactions.TransactionArgument( value=352483, encoder=aptos_sdk.bcs.Serializer.u64, ), ], ) payload = aptos_sdk.transactions.TransactionPayload(entry_function) serializer = aptos_sdk.bcs.Serializer() payload.serialize(serializer) data = serializer.output() serialized_data = base64.b64encode(data) print(serialized_data) ```