Relayers

Prepares a sponsored (gasless) transaction with fee payments.

This endpoint builds a transaction where the relayer will pay the network fees on behalf of the user. The user pays fees in a token of their choice (e.g., USDC) instead of the native network currency.

The endpoint accepts either a pre-built transaction XDR or a set of operations to build a transaction from. It returns a prepared transaction that includes:

  • The transaction XDR (base64 encoded) ready for signing
  • The fee amount in both the fee token and native currency (stroops for Stellar)
  • The fee token identifier
  • The transaction validity timestamp

After receiving the prepared transaction, the user must sign it and submit it through the standard transaction submission endpoint. For Stellar, the transaction will be wrapped in a fee-bump transaction where the relayer pays the network fees.

post/api/v1/relayers/{relayer_id}/transactions/sponsored/build

Path parameters

relayer_idstring required

The unique identifier of the relayer

Request body

OR

Response

Sponsored transaction built successfully

errorstring
successboolean required

Changes

Changed in 4 of the 18 revisions of this API.34

    • added the pattern ^-?[0-9]+$ to the request property ///////

      request-property-pattern-added

    • the /////// request property type changed from integer to string, and format from int64 to no format

      request-property-type-changed

    • added the optional property ///// to the response with the status

      response-optional-property-added

    • added the optional property ///// to the response with the status

      response-optional-property-added

    • added the optional property ///// to the response with the status

      response-optional-property-added

    • endpoint added

      endpoint-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 43 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog