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 barrier token that you provide to StarkEx to enable authenticating the endpoint.

Procedure
  1. 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.

    If you want to skip the invalid transaction, send an empty list.

  2. 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.