Simulate transaction status change (Sandbox Only)

As part of the IC API sandbox environment, developers can use a special endpoint to simulate different transaction statuses, such as compliance checks, rejections, and acceptances. This helps developers test their integration with the API and ensure that their application is handling different scenarios and error cases. In this section, we'll explore the steps involved in using this endpoint to change transaction statuses for simulation purposes.

Note: This endpoint is only available in the IC API's sandbox environment, and should not be used in production applications. In addition, be sure to follow the API Reference and guidelines closely, and test your integration thoroughly to ensure that it is functioning correctly.

Authenticating Your Request

Before changing a transaction status, authenticate your request using your API key and the other required headers. The IC API uses Basic Authentication, so you'll need to include your API key in the Authorization header of your request. You may also need to include additional headers, such as the subscription key or financial API headers, depending on the endpoint you're using. Consult the API documentation for more information on required headers and authentication methods.

Changing a Transaction Status

To change a transaction status, you'll need to use the PUT /simulations/transactions/update-status endpoint. This endpoint allows you to specify the reference transaction ID and the new status you want to set. Here are the parameters you'll need to include in your request:

  • reference: This is a 9-digit unique Instant Cash Transaction Code (ICTC) reference number that identifies the transaction.
  • new_status: The new status to set for the transaction.