Handling a request for alternative transactions

When StarkEx identifies an invalid transaction, StarkEx marks the transaction as invalid and sends a request to the application’s endpoint for a list of alternative transactions.

Prerequisites
  • A server with an http endpoint to accept and respond to requests for your application. This endpoint serves the following purposes:

    • StarkEx sends the endpoint requests for alternative transactions when a transaction is invalid.

    • The endpoint responds to these requests with a list of alternative transactions.

  • A certificate or a bearer token that you provide to StarkEx to enable authenticating the endpoint.

Procedure
  • When you receive a request from StarkEx for a list of alternative transactions, send a list of zero or more alternative transactions in .json format.

    You should not skip sending an alternative transaction. Instead, you can send an empty list. This method requires your application’s administrator to accordingly, carefully, roll back the state.

    Sending an empty list is not the same as not sending an alternative transaction.

  • Send a transfer before a failed settlement to facilitate missing transaction fees, which are required for the settlement to succeed.

  • If you receive a REPLACED_BEFORE error, StarkEx previously identified the same transaction id. If the list of alternative transactions is valid, you can resend the same list.