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"
}
}
'{
"simulation_id": "sim_2900842gV18Lhh7owswLj5XF0uHHUn1CX",
"entity": "PAYMENTS",
"entity_id": "14934289844",
"entity_simulation": {
"payment_status": "FAILED",
"payment_error_code": "ISSUER_NOT_AVAILABLE"
}
}{
"message": "bad URL, please check API documentation",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "request_failed",
"type": "invalid_request_error"
}{
"message": "authentication Failed",
"code": "request_failed",
"type": "authentication_error"
}{
"message": "something is not found",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "somethind_not_found",
"type": "invalid_request_error"
}{
"message": "Too many requests from IP. Check headers",
"code": "request_failed",
"type": "rate_limit_error"
}{
"message": "internal Server Error",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "internal_error",
"type": "api_error"
}Simulation
Simulate Payment
Use this API to simulate payment. To use this API you should first create an order using the Create Order API. Also, you need to create a payment with the same order.
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"
}
}
'{
"simulation_id": "sim_2900842gV18Lhh7owswLj5XF0uHHUn1CX",
"entity": "PAYMENTS",
"entity_id": "14934289844",
"entity_simulation": {
"payment_status": "FAILED",
"payment_error_code": "ISSUER_NOT_AVAILABLE"
}
}{
"message": "bad URL, please check API documentation",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "request_failed",
"type": "invalid_request_error"
}{
"message": "authentication Failed",
"code": "request_failed",
"type": "authentication_error"
}{
"message": "something is not found",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "somethind_not_found",
"type": "invalid_request_error"
}{
"message": "Too many requests from IP. Check headers",
"code": "request_failed",
"type": "rate_limit_error"
}{
"message": "internal Server Error",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "internal_error",
"type": "api_error"
}Authorizations
XClientID & XClientSecretXClientID & XPartnerAPIKeyXClientID & XClientSignatureHeaderXPartnerMerchantID & XPartnerAPIKey
Client app ID. You can find your app id in the merchant dashboard.
Client secret key. You can find your secret in the merchant dashboard.
Headers
Body
application/json
Request Body to Make Simulation
simulate payment request object
Response
Payment Simulated Response
