Forces a state transition on a Payment Intent for integration testing. Only available in test mode (pk_test_ keys).
pk_test_
cURL
curl --request POST \ --url https://api.cherp.dev/v1/test/intents/{id}/simulate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "targetState": "confirmed", "failureReason": "insufficient_balance" } '
{ "intent": { "id": "pi_abc123def456ghij", "chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp", "token": "USDC", "amount": "10.50", "requestor": "<string>", "direction": "request", "state": "created", "reference": "<string>", "expiresAt": "2023-11-07T05:31:56Z", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", "livemode": true, "idempotencyKey": "<string>", "tokenAddress": "<string>", "amountBaseUnits": "<string>", "fulfiller": "<string>", "retryRequired": true, "pendingAtExpiry": true, "txSignature": "<string>", "detectedAt": "2023-11-07T05:31:56Z", "ataRentLamports": 123, "ttlSeconds": 86400, "confirmedAt": "2023-11-07T05:31:56Z", "finalizedAt": "2023-11-07T05:31:56Z", "metadata": {}, "refundedBy": "<string>", "refundOf": "<string>" } }
API key. Use pk_live_* for production or pk_test_* for test mode.
pk_live_*
pk_test_*
The Payment Intent ID
The state to transition to
confirmed
failed
expired
dropped
Optional failure reason when targeting failed state
insufficient_balance
revert
slippage
State transition simulated
Show child attributes