TuxoPay Docs
APIPayment flows

Simulate payment flow

Simulate a payment flow execution to check shop availability without affecting any state (such as round robin counters). This is useful for validation before actual processing.

POST
/flows/simulate

Authorization

Authorization<token>

Enter token in format (Bearer )

In: header

Request Body

application/jsonRequired
flow_name
Required
string
amountnumber

Defaults to 100.00 if not provided

Format: "float"
currencystring

Defaults to USD if not provided

Maximum length: 3
countrystring
Maximum length: 2
customer_idinteger
metadataobject
simpleboolean

Set to true to return only a boolean response indicating availability

curl -X POST "https://orchestrator.tuxopay.com/api/flows/simulate" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "flow_name": "primary-flow",
    "amount": 100,
    "currency": "USD",
    "country": "US",
    "customer_id": 123,
    "metadata": {
      "order_id": "ORD-123"
    },
    "simple": true
  }'

Simulation completed successfully

{
  "success": true,
  "data": {
    "success": true,
    "flow": {
      "id": 1,
      "name": "primary-flow",
      "strategy": "round_robin"
    },
    "result": {
      "strategy": "round_robin",
      "primary_shop": {
        "shop_id": 2,
        "shop_name": "Secondary Shop",
        "priority": 5,
        "weight": 30
      },
      "simulation_mode": true,
      "current_counter": 1,
      "next_counter": 2
    },
    "simulation": true
  }
}