POST
/
simulate
curl --request POST \
  --url https://sandbox.cashfree.com/pg/simulate \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "entity": "PAYMENTS",
  "entity_id": "14934289844",
  "entity_simulation": {
    "payment_status": "FAILED",
    "payment_error_code": "ISSUER_NOT_AVAILABLE"
  }
}'

Authorizations

x-client-id
string
headerrequired

Client app ID. You can find your app id in the Merchant Dashboard.

x-client-secret
string
headerrequired

Client secret key. You can find your secret in the Merchant Dashboard.

Headers

x-api-version
string
default: 2023-08-01required

API version to be used. Format is in YYYY-MM-DD

x-request-id
string

Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree

x-idempotency-key
string

An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.

Body

application/json

simulate payment request object

entity
enum<string>
required

Entity type should be PAYMENTS or SUBS_PAYMENTS only.

Available options:
PAYMENTS,
SUBS_PAYMENTS
entity_id
string
required

If the entity type is PAYMENTS, the entity_id will be the transactionId. If the entity type is SUBS_PAYMENTS, the entity_id will be the merchantTxnId

entity_simulation
object
required

Entity Simulation it contains payment_status and payment_error_code

Response

200 - application/json

Simulation response object

simulation_id
string
entity
string
entity_id
string
entity_simulation
object

Entity Simulation it contains payment_status and payment_error_code