Use this API to check whether a recharge is likely to go through, before you take payment from the customer.
Send the same details as in the recharge request, without the reference_id. The API runs the same input checks as the recharge request, so a malformed request returns the same errors.
The API always returns HTTP 200. Read data.status:
VALID: The recharge can be attempted. data.validation_ref holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it.
INVALID: The recharge cannot go through as sent. data.reason_code and data.reason_message tell you why. Do not take payment for it.
UNAVAILABLE: The check could not be completed right now. You can still send the recharge request.
reason_code and reason_message are null when the status is VALID, and validation_ref is null for any other status.
The API runs the following checks, depending on your account type and the fields that you send. For what prefunding and postfunding mean, see Payment Scenarios. The shortfall limit is the maximum amount by which your recharge wallet can go below zero. The last column lists the reason codes that the API returns when a check fails or cannot be completed:
Check
Applies to
What the API checks
Reason codes
Recharge wallet
All accounts
A recharge wallet is set up for your account, and it is active.
wallet_not_configured, wallet_inactive
Wallet balance
Prefunding accounts
The wallet balance covers the full amount.
insufficient_balance, wallet_unavailable
Shortfall limit
Postfunding accounts
The amount that the wallet has to cover keeps the wallet within your shortfall limit.
The operator is supported for the service type, and the recharge number is valid for that operator.
-
Operator check
All requests
Cashfree validates the recharge with the operator.
-
If payments has a pg_amount but no pg_reference_id, nothing is verified. The API uses pg_amount only to work out how much of the recharge the wallet has to cover.
A VALID result is advisory. The Recharge Request API checks everything again, so its result can differ if your wallet balance, your shortfall limit, or the payment changes between the two calls.
Reason codes
When the status is INVALID or UNAVAILABLE, the API returns HTTP 200 with a reason_code and a reason_message that explain the result. Do not take payment for an INVALID recharge. For an UNAVAILABLE result, you can still send the recharge request. The following table lists the reason codes the API can return:
Reason codes
Reason code
Description
Status
wallet_not_configured
No recharge wallet is set up for your account.
INVALID
wallet_inactive
Your recharge wallet is not active.
INVALID
insufficient_balance
Your wallet balance is lower than the amount. Prefunding accounts only.
INVALID
shortfall_limit_exceeded
The recharge would take your wallet past your shortfall limit. Postfunding accounts only.
INVALID
shortfall_threshold_not_configured
No shortfall limit is set for your account. Postfunding accounts only.
INVALID
pg_payment_invalid
The payment cannot be used for this recharge. reason_message says why.
INVALID
pg_payment_already_used
The payment is already linked to another recharge.
INVALID
wallet_unavailable
The wallet balance could not be checked right now.
UNAVAILABLE
shortfall_threshold_unavailable
The shortfall limit could not be checked right now.
UNAVAILABLE
pg_unavailable
The payment could not be verified right now.
UNAVAILABLE
Other reason codes can be returned. Handle them by status, and show reason_message where it helps.
Error codes
The following table lists the error codes you may encounter when validating a recharge:
Error codes
Code
Description
Type
Status
request_failed
The amount is not a whole rupee amount greater than 0. Message: amount must be a whole rupee amount greater than 0
invalid_request_error
400
request_failed
The recharge_number is not a valid Indian mobile number. Message: recharge_number is not a valid indian mobile number
invalid_request_error
400
request_failed
The pg_amount in payments is more than the amount. Message: payments[0].pg_amount must not be more than amount
invalid_request_error
400
request_failed
The x-client-id or x-client-secret is missing or incorrect. Message: authentication Failed
authentication_error
401
request_failed
Your account is not set up for recharges, or its recharge access is switched off. Message: Recharge is not enabled for this account
invalid_request_error
403
request_failed
You sent too many requests in a short time. Message: Too many requests from IP. Check headers
rate_limit_error
429
internal_error
An unexpected error occurred at Cashfree. Message: internal Server Error
api_error
500
Authorizations
x-client-id
string
header
required
Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.
x-client-secret
string
header
required
Your unique client secret issued by Cashfree. Keep this confidential and never expose it in client-side code. You can find this in your Merchant Dashboard.
Headers
x-api-version
enum<string>
default:2025-01-01
API version to be used. Format is YYYY-MM-DD. The only supported version for this API is 2025-01-01. If not specified, 2025-01-01 is used.
Available options:
2025-01-01
Body
application/json
The recharge to check. These are the fields of the recharge request, without reference_id.
recharge_number
string
required
The mobile number or direct-to-home (DTH) customer ID to recharge. A mobile number must be a valid Indian mobile number.
Maximum string length: 20
Example:
"9876543210"
operator
string
required
The operator code, from the Fetch Operators or Fetch Operator Details API.
Maximum string length: 50
Example:
"JIO"
amount
number
required
The recharge amount in rupees. It must be a whole rupee amount greater than 0.
Example:
299
service_type
enum<string>
required
The type of recharge.
Available options:
MOBILE,
DTH
Example:
"MOBILE"
circle
string
The telecom circle of the number, as returned by the Fetch Operator Details API, for example Delhi. It is optional and is not case-sensitive.
Maximum string length: 50
Example:
"Delhi"
payments
object[]
How the customer paid, or will pay. Send it when the customer pays through Cashfree Payment Gateway, so that the check matches the recharge request. Leave it out when the customer pays another way.
Maximum array length: 1
Show child attributes
Response
The check was completed. Read data.status for the result.
status
string
The status of the API call. Returns OK whenever the request is processed, whatever the result.
Example:
"OK"
message
string
A message describing the result.
Example:
"Recharge validation processed"
data
object
The result of the check.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cashfree Developer Documentation","colors":{"primary":"#6930ca","light":"#cfb8f5","dark":"#130851"},"logo":{"light":"https://mintcdn.com/cashfreepayments-d00050e9/6mQw7is1us8FhXrb/static/logo/light.svg?fit=max\u0026auto=format\u0026n=6mQw7is1us8FhXrb\u0026q=85\u0026s=8a2837083063d8a01e0be6b454a1baf1","dark":"https://mintcdn.com/cashfreepayments-d00050e9/6mQw7is1us8FhXrb/static/logo/dark.svg?fit=max\u0026auto=format\u0026n=6mQw7is1us8FhXrb\u0026q=85\u0026s=5c7de40784c6f6f9eebdad085ec5a7ef"},"favicon":"https://mintcdn.com/cashfreepayments-d00050e9/NpjCgm3mwC7v6gp-/static/favicon.png?fit=max\u0026auto=format\u0026n=NpjCgm3mwC7v6gp-\u0026q=85\u0026s=ba85dcd024bd70845e38c3f3957514c6","appearance":{"default":"light","strict":false},"background":{"color":{"light":"#fbfbfb","dark":"#000000"}},"navbar":{"links":[{"href":"https://www.cashfree.com/support/","label":"Contact Us"}],"primary":{"type":"button","label":"Get Started","href":"https://merchant.cashfree.com/merchants/signup?source-action=docs%20page\u0026action=Sign%20Up\u0026button-id=StartNow_Navbar"}},"footer":{"socials":{"github":"https://github.com/cashfree","youtube":"https://www.youtube.com/channel/UCxO0W7xVngh7TfkChPa_nwg","website":"https://www.cashfree.com/blog/category/engineering","discord":"https://discord.com/invite/w97HT9RKCF"}},"search":{"prompt":"Search or ask..."},"seo":{"metatags":{"og:title":"Cashfree Developer Documentation","og:description":"Welcome to the Cashfree developer documentation. You will find help about Cashfree products and APIs that will help you start using our products quickly.","og:site_name":"Cashfree Developer Documentation","twitter:site":"@gocashfree","google-site-verification":"T69Ao_T0Ps8pkRbluKzW179qvd_aCsWISCApeSsIhRU"},"indexing":"all"},"fonts":{"heading":{"family":"Inter","weight":600},"body":{"family":"Inter","weight":400}},"styling":{"codeblocks":"dark","latex":true},"integrations":{"ga4":{"measurementId":"G-56SCQ867FW"},"gtm":{"tagId":"GTM-5SRVH4P"}},"contextual":{"options":["chatgpt","claude","copy","view",{"title":"Open in Discord","description":"Join our Discord community","icon":"discord","href":"https://discord.com/invite/w97HT9RKCF"}],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cashfreepayments-d00050e9","hasAudioNarration":false,"actualSubdomain":"cashfreepayments-d00050e9","customDomains":["www.cashfree.com"],"gitSource":{"type":"github","owner":"cashfree","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b080ea3e817875fa67f8675","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Payments APIs","count":520},{"language":"default","tag":"Other Versions","count":349},{"language":"default","tag":"Payments","count":316},{"language":"default","tag":"v2026-01-01","count":159},{"language":"default","tag":"Subscription","count":154},{"language":"default","tag":"v2025-01-01","count":150},{"language":"default","tag":"v2023-08-01","count":142},{"language":"default","tag":"Payment Gateway","count":142},{"language":"default","tag":"Payouts","count":105},{"language":"default","tag":"Secure ID","count":88}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":false,"email":"documentation@cashfree.com","showHelpButton":true}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"6916d346c181a220cfa37e8d","deploymentId":"66d5827f2de686bc28e7722b","questionText":"How do I accept payments online?","status":"active","generatedBy":"manual","createdAt":"2025-11-14T06:59:18.295Z","updatedAt":"2025-11-14T06:59:18.295Z","__v":0},{"_id":"6916d306c181a220cfa370e8","deploymentId":"66d5827f2de686bc28e7722b","questionText":"What is Cashfree Hosted Checkout?","status":"active","generatedBy":"manual","createdAt":"2025-11-14T06:58:14.574Z","updatedAt":"2025-11-14T06:58:14.574Z","__v":0},{"_id":"6916d2dbc181a220cfa368a4","deploymentId":"66d5827f2de686bc28e7722b","questionText":"How do I create a payment link?","status":"active","generatedBy":"manual","createdAt":"2025-11-14T06:57:31.657Z","updatedAt":"2025-11-14T06:57:31.657Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/docs/_mintlify/custom/cashfreepayments-d00050e9/d27e7b15bbcae12a/style.css"},{"filePath":"grid.css","content":".container,.container-fluid{margin-right:auto;margin-left:auto;padding-top:3rem;padding-bottom:3rem}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-0.5rem;margin-left:-0.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width: 48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width: 64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width: 75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}"},{"filePath":"typography.css","content":".landing-page h1{font-size:2.4rem}.landing-page h2{font-size:2rem}.landing-page h3{font-size:1.6rem}.landing-page h4{font-size:1.2rem}.landing-page h5{font-size:1rem}.landing-page h6{font-size:0.8rem}.bold{font-weight:bold}.semibold{font-weight:600}.medium{font-weight:500}.regular{font-weight:400}.light{font-weight:300}"}]}
{"page":{"pagePath":"api-reference/other-apis/recharge-cou/validation/validate-recharge","slug":"/api-reference/other-apis/recharge-cou/validation/validate-recharge","pageMetadata":{"title":"Validate Recharge","sidebarTitle":"Validate Recharge","openapi":"openapi/bbps/recharge-cou.yaml post /bbps/cou/v1/recharge/validate","keywords":["validate recharge","recharge validation","mobile recharge","DTH recharge","COU"],"og:title":"Validate Recharge | Cashfree","og:description":"Check that a mobile or DTH recharge can go through before you take payment, using the Cashfree COU Validate Recharge API.","description":"Use this API to check whether a recharge is likely to go through, before you take payment from the customer.\n\nSend the same details as in the recharge request, without the `reference_id`. The API runs the same input checks as the recharge request, so a malformed request returns the same errors.\n\nThe API always returns HTTP 200. Read `data.status`:\n\n- `VALID`: The recharge can be attempted. `data.validation_ref` holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it.\n- `INVALID`: The recharge cannot go through as sent. `data.reason_code` and `data.reason_message` tell you why. Do not take payment for it.\n- `UNAVAILABLE`: The check could not be completed right now. You can still send the recharge request.\n\n`reason_code` and `reason_message` are `null` when the status is `VALID`, and `validation_ref` is `null` for any other status.","href":"/api-reference/other-apis/recharge-cou/validation/validate-recharge","hidden":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Use this API to check whether a recharge is likely to go through, before you take payment from the customer.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send the same details as in the recharge request, without the \", _jsx(_components.code, {\n children: \"reference_id\"\n }), \". The API runs the same input checks as the recharge request, so a malformed request returns the same errors.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The API always returns HTTP 200. Read \", _jsx(_components.code, {\n children: \"data.status\"\n }), \":\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"VALID\"\n }), \": The recharge can be attempted. \", _jsx(_components.code, {\n children: \"data.validation_ref\"\n }), \" holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"INVALID\"\n }), \": The recharge cannot go through as sent. \", _jsx(_components.code, {\n children: \"data.reason_code\"\n }), \" and \", _jsx(_components.code, {\n children: \"data.reason_message\"\n }), \" tell you why. Do not take payment for it.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"UNAVAILABLE\"\n }), \": The check could not be completed right now. You can still send the recharge request.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"reason_code\"\n }), \" and \", _jsx(_components.code, {\n children: \"reason_message\"\n }), \" are \", _jsx(_components.code, {\n children: \"null\"\n }), \" when the status is \", _jsx(_components.code, {\n children: \"VALID\"\n }), \", and \", _jsx(_components.code, {\n children: \"validation_ref\"\n }), \" is \", _jsx(_components.code, {\n children: \"null\"\n }), \" for any other status.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,Heading,Note,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`validation-checks`,children:`Validation checks`}),`\n`,_jsxs(_components.p,{children:[`The API runs the following checks, depending on your account type and the fields that you send. For what prefunding and postfunding mean, see `,_jsx(_components.a,{href:`/api-reference/other-apis/bbps-cou/payment-scenarios`,children:`Payment Scenarios`}),`. The shortfall limit is the maximum amount by which your recharge wallet can go below zero. The last column lists the reason codes that the API returns when a check fails or cannot be completed:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Check`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Applies to`}),_jsx(_components.th,{style:{textAlign:`left`},children:`What the API checks`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Reason codes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Recharge wallet`}),_jsx(_components.td,{style:{textAlign:`left`},children:`All accounts`}),_jsx(_components.td,{style:{textAlign:`left`},children:`A recharge wallet is set up for your account, and it is active.`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`wallet_not_configured`}),`, `,_jsx(_components.code,{children:`wallet_inactive`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Wallet balance`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Prefunding accounts`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The wallet balance covers the full `,_jsx(_components.code,{children:`amount`}),`.`]}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`insufficient_balance`}),`, `,_jsx(_components.code,{children:`wallet_unavailable`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Shortfall limit`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Postfunding accounts`}),_jsx(_components.td,{style:{textAlign:`left`},children:`The amount that the wallet has to cover keeps the wallet within your shortfall limit.`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`shortfall_limit_exceeded`}),`, `,_jsx(_components.code,{children:`shortfall_threshold_not_configured`}),`, `,_jsx(_components.code,{children:`shortfall_threshold_unavailable`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Payment`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Requests where `,_jsx(_components.code,{children:`payments`}),` has a `,_jsx(_components.code,{children:`pg_reference_id`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:`The Cashfree Payment Gateway payment is verified the same way as in the Recharge Request API.`}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`pg_payment_invalid`}),`, `,_jsx(_components.code,{children:`pg_payment_already_used`}),`, `,_jsx(_components.code,{children:`pg_unavailable`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Recharge details`}),_jsx(_components.td,{style:{textAlign:`left`},children:`All requests`}),_jsx(_components.td,{style:{textAlign:`left`},children:`The operator is supported for the service type, and the recharge number is valid for that operator.`}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`-`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:`Operator check`}),_jsx(_components.td,{style:{textAlign:`left`},children:`All requests`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Cashfree validates the recharge with the operator.`}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`-`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`payments`}),` has a `,_jsx(_components.code,{children:`pg_amount`}),` but no `,_jsx(_components.code,{children:`pg_reference_id`}),`, nothing is verified. The API uses `,_jsx(_components.code,{children:`pg_amount`}),` only to work out how much of the recharge the wallet has to cover.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`VALID`}),` result is advisory. The Recharge Request API checks everything again, so its result can differ if your wallet balance, your shortfall limit, or the payment changes between the two calls.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`reason-codes`,children:`Reason codes`}),`\n`,_jsxs(_components.p,{children:[`When the status is `,_jsx(_components.code,{children:`INVALID`}),` or `,_jsx(_components.code,{children:`UNAVAILABLE`}),`, the API returns HTTP 200 with a `,_jsx(_components.code,{children:`reason_code`}),` and a `,_jsx(_components.code,{children:`reason_message`}),` that explain the result. Do not take payment for an `,_jsx(_components.code,{children:`INVALID`}),` recharge. For an `,_jsx(_components.code,{children:`UNAVAILABLE`}),` result, you can still send the recharge request. The following table lists the reason codes the API can return:`]}),`\n`,_jsx(Accordion,{title:`Reason codes`,id:`reason-codes`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Reason code`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Status`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`wallet_not_configured`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`No recharge wallet is set up for your account.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`wallet_inactive`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Your recharge wallet is not active.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`insufficient_balance`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Your wallet balance is lower than the amount. Prefunding accounts only.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`shortfall_limit_exceeded`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The recharge would take your wallet past your shortfall limit. Postfunding accounts only.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`shortfall_threshold_not_configured`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`No shortfall limit is set for your account. Postfunding accounts only.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`pg_payment_invalid`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The payment cannot be used for this recharge. `,_jsx(_components.code,{children:`reason_message`}),` says why.`]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`pg_payment_already_used`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The payment is already linked to another recharge.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`INVALID`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`wallet_unavailable`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The wallet balance could not be checked right now.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`UNAVAILABLE`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`shortfall_threshold_unavailable`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The shortfall limit could not be checked right now.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`UNAVAILABLE`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`pg_unavailable`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`The payment could not be verified right now.`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`UNAVAILABLE`})})]})]})]})}),`\n`,_jsxs(_components.p,{children:[`Other reason codes can be returned. Handle them by `,_jsx(_components.code,{children:`status`}),`, and show `,_jsx(_components.code,{children:`reason_message`}),` where it helps.`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error codes`}),`\n`,_jsx(_components.p,{children:`The following table lists the error codes you may encounter when validating a recharge:`}),`\n`,_jsx(Accordion,{title:`Error codes`,id:`error-codes`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Code`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Status`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`request_failed`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`amount`}),` is not a whole rupee amount greater than 0. Message: `,_jsx(_components.code,{children:`amount must be a whole rupee amount greater than 0`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`invalid_request_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`400`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`request_failed`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`recharge_number`}),` is not a valid Indian mobile number. Message: `,_jsx(_components.code,{children:`recharge_number is not a valid indian mobile number`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`invalid_request_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`400`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`request_failed`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`pg_amount`}),` in `,_jsx(_components.code,{children:`payments`}),` is more than the `,_jsx(_components.code,{children:`amount`}),`. Message: `,_jsx(_components.code,{children:`payments[0].pg_amount must not be more than amount`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`invalid_request_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`400`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`request_failed`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The `,_jsx(_components.code,{children:`x-client-id`}),` or `,_jsx(_components.code,{children:`x-client-secret`}),` is missing or incorrect. Message: `,_jsx(_components.code,{children:`authentication Failed`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`authentication_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`401`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`request_failed`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Your account is not set up for recharges, or its recharge access is switched off. Message: `,_jsx(_components.code,{children:`Recharge is not enabled for this account`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`invalid_request_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`403`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`request_failed`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`You sent too many requests in a short time. Message: `,_jsx(_components.code,{children:`Too many requests from IP. Check headers`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`rate_limit_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`429`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`internal_error`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`An unexpected error occurred at Cashfree. Message: `,_jsx(_components.code,{children:`internal Server Error`})]}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`api_error`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`500`})]})]})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Validate Recharge","sidebarTitle":"Validate Recharge","openapi":"openapi/bbps/recharge-cou.yaml post /bbps/cou/v1/recharge/validate","keywords":["validate recharge","recharge validation","mobile recharge","DTH recharge","COU"],"og:title":"Validate Recharge | Cashfree","og:description":"Check that a mobile or DTH recharge can go through before you take payment, using the Cashfree COU Validate Recharge API.","description":"Use this API to check whether a recharge is likely to go through, before you take payment from the customer.\n\nSend the same details as in the recharge request, without the `reference_id`. The API runs the same input checks as the recharge request, so a malformed request returns the same errors.\n\nThe API always returns HTTP 200. Read `data.status`:\n\n- `VALID`: The recharge can be attempted. `data.validation_ref` holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it.\n- `INVALID`: The recharge cannot go through as sent. `data.reason_code` and `data.reason_message` tell you why. Do not take payment for it.\n- `UNAVAILABLE`: The check could not be completed right now. You can still send the recharge request.\n\n`reason_code` and `reason_message` are `null` when the status is `VALID`, and `validation_ref` is `null` for any other status.","href":"/api-reference/other-apis/recharge-cou/validation/validate-recharge","hidden":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Validation checks","slug":"validation-checks","depth":2,"children":[]},{"title":"Reason codes","slug":"reason-codes","depth":2,"children":[]},{"title":"Error codes","slug":"error-codes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/cashfreepayments-d00050e9/0a1efd0b138512b4/util/downloadImages.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/7b49b0aba32ccd66/util/checkLinks.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/6520965c686ab08e/util/updateFrontmatter.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/82d5b75dd1e333d2/snippets/postman-buttons/postman-links.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/e8f71dc9fab8d95d/scripts/ga4-video-tracking.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/e3b0c44298fc1c14/scripts/generate-postman-buttons.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/bc4eac15553663a2/scripts/openapi-rm-desc.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/5748000362acad1e/scripts/quote-openapi.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/0a7365ce97b5cca7/scripts/script.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/d99a96c0c4b010fe/scripts/updateHelpAccordionsWithPostHog.js","/docs/_mintlify/custom/cashfreepayments-d00050e9/bd8561d01634fd2e/scripts/updateIframeSrc.js"],"openApiReferenceData":{"operation":{"summary":"Validate Recharge","description":"Use this API to check whether a recharge is likely to go through, before you take payment from the customer.\n\nSend the same details as in the recharge request, without the `reference_id`. The API runs the same input checks as the recharge request, so a malformed request returns the same errors.\n\nThe API always returns HTTP 200. Read `data.status`:\n\n- `VALID`: The recharge can be attempted. `data.validation_ref` holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it.\n- `INVALID`: The recharge cannot go through as sent. `data.reason_code` and `data.reason_message` tell you why. Do not take payment for it.\n- `UNAVAILABLE`: The check could not be completed right now. You can still send the recharge request.\n\n`reason_code` and `reason_message` are `null` when the status is `VALID`, and `validation_ref` is `null` for any other status.","operationId":"validateRecharge","tags":["Recharge Validation"],"x-codeSamples":[{"lang":"cURL","label":"Without payment","source":"curl --request POST \\\n --url https://sandbox.cashfree.com/bbps/cou/v1/recharge/validate \\\n --header 'Content-Type: application/json' \\\n --header 'x-api-version: 2025-01-01' \\\n --header 'x-client-id: \u003capi-key>' \\\n --header 'x-client-secret: \u003capi-key>' \\\n --data '{\n \"recharge_number\": \"9876543210\",\n \"operator\": \"JIO\",\n \"circle\": \"Delhi\",\n \"amount\": 299,\n \"service_type\": \"MOBILE\"\n }'"},{"lang":"cURL","label":"With a Cashfree Payment Gateway payment","source":"curl --request POST \\\n --url https://sandbox.cashfree.com/bbps/cou/v1/recharge/validate \\\n --header 'Content-Type: application/json' \\\n --header 'x-api-version: 2025-01-01' \\\n --header 'x-client-id: \u003capi-key>' \\\n --header 'x-client-secret: \u003capi-key>' \\\n --data '{\n \"recharge_number\": \"9876543210\",\n \"operator\": \"JIO\",\n \"circle\": \"Delhi\",\n \"amount\": 299,\n \"service_type\": \"MOBILE\",\n \"payments\": [\n {\n \"source\": \"CASHFREE_PG\",\n \"pg_reference_id\": \"555001\",\n \"pg_amount\": 200\n }\n ]\n }'"}],"parameters":["c0b71200-067a-45ed-b85f-d8a45c53b61f"],"requestBody":"f834266b-3df6-41d9-b27c-59075b2e0fb9","responses":{"200":"622fa8b8-a3a0-4168-875d-b0df4ebb8ef4","400":"61bec4cb-c6f8-4da1-bc29-29667b66a648","401":"8a645938-6e74-4af3-bee3-11cb969900da","403":"4767e02e-5f29-42a3-92fa-bd23074a5a74","429":"bbaa16af-947d-41ac-82cf-9157e5a20924","500":"faadf5fe-9e95-4296-822d-1dab37adda3b"},"method":"post","type":"path","servers":["7e08fa90-a4ab-42a8-92ed-241ef84d4e8b","62644396-d77b-43ba-abae-c1e34b9c627f"],"security":["7f64cdbc-c2e4-4b13-865c-c52914083533"],"path":"/bbps/cou/v1/recharge/validate","baseUrlOptions":["https://sandbox.cashfree.com","https://api.cashfree.com"],"title":"Validate Recharge","codeSamples":[{"label":"Without payment","lang":"cURL","source":"curl --request POST \\\n --url https://sandbox.cashfree.com/bbps/cou/v1/recharge/validate \\\n --header 'Content-Type: application/json' \\\n --header 'x-api-version: 2025-01-01' \\\n --header 'x-client-id: \u003capi-key>' \\\n --header 'x-client-secret: \u003capi-key>' \\\n --data '{\n \"recharge_number\": \"9876543210\",\n \"operator\": \"JIO\",\n \"circle\": \"Delhi\",\n \"amount\": 299,\n \"service_type\": \"MOBILE\"\n }'"},{"label":"With a Cashfree Payment Gateway payment","lang":"cURL","source":"curl --request POST \\\n --url https://sandbox.cashfree.com/bbps/cou/v1/recharge/validate \\\n --header 'Content-Type: application/json' \\\n --header 'x-api-version: 2025-01-01' \\\n --header 'x-client-id: \u003capi-key>' \\\n --header 'x-client-secret: \u003capi-key>' \\\n --data '{\n \"recharge_number\": \"9876543210\",\n \"operator\": \"JIO\",\n \"circle\": \"Delhi\",\n \"amount\": 299,\n \"service_type\": \"MOBILE\",\n \"payments\": [\n {\n \"source\": \"CASHFREE_PG\",\n \"pg_reference_id\": \"555001\",\n \"pg_amount\": 200\n }\n ]\n }'"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"c0b71200-067a-45ed-b85f-d8a45c53b61f":{"in":"header","name":"x-api-version","required":false,"description":"API version to be used. Format is YYYY-MM-DD. The only supported version for this API is `2025-01-01`. If not specified, `2025-01-01` is used.\n","schema":{"type":"string","default":"2025-01-01","enum":["2025-01-01"],"isRequired":false,"description":"API version to be used. Format is YYYY-MM-DD. The only supported version for this API is `2025-01-01`. If not specified, `2025-01-01` is used.\n","uniqueKey":"","typeLabel":"enum\u003cstring>"},"example":"2025-01-01"}},"requestBody":{"description":"The recharge to check. These are the fields of the recharge request, without `reference_id`.","required":true,"content":{"application/json":{"schema":{"type":"object","required":["recharge_number","operator","amount","service_type"],"properties":{"recharge_number":{"type":"string","maxLength":20,"description":"The mobile number or direct-to-home (DTH) customer ID to recharge. A mobile number must be a valid Indian mobile number.","example":"9876543210","isRequired":true,"uniqueKey":"recharge_number","typeLabel":"string"},"operator":{"type":"string","maxLength":50,"description":"The operator code, from the Fetch Operators or Fetch Operator Details API.","example":"JIO","isRequired":true,"uniqueKey":"operator","typeLabel":"string"},"amount":{"type":"number","description":"The recharge amount in rupees. It must be a whole rupee amount greater than 0.","example":299,"isRequired":true,"uniqueKey":"amount","typeLabel":"number"},"service_type":{"type":"string","description":"The type of recharge.","enum":["MOBILE","DTH"],"example":"MOBILE","isRequired":true,"uniqueKey":"service_type","typeLabel":"enum\u003cstring>"},"circle":{"type":"string","maxLength":50,"description":"The telecom circle of the number, as returned by the Fetch Operator Details API, for example `Delhi`. It is optional and is not case-sensitive.","example":"Delhi","uniqueKey":"circle","typeLabel":"string"},"payments":{"type":"array","maxItems":1,"description":"How the customer paid, or will pay. Send it when the customer pays through Cashfree Payment Gateway, so that the check matches the recharge request. Leave it out when the customer pays another way.","items":{"type":"object","required":["source","pg_amount"],"properties":{"source":{"type":"string","description":"The payment source.","enum":["CASHFREE_PG"],"example":"CASHFREE_PG","isRequired":true,"uniqueKey":"payments.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"pg_amount":{"type":"number","description":"The amount that the customer paid, or will pay, through Cashfree Payment Gateway. It must be greater than 0, have at most 2 decimal places, and not be more than `amount`.","example":200,"isRequired":true,"uniqueKey":"payments.items.[INDEX].pg_amount","typeLabel":"number"},"pg_reference_id":{"type":"string","maxLength":64,"description":"The Cashfree Payment Gateway transaction ID of the payment. Send it when the customer has already paid, and the payment is verified. Leave it out when the customer has not paid yet.","example":"555001","uniqueKey":"payments.items.[INDEX].pg_reference_id","typeLabel":"string"}},"uniqueKey":"payments.items.[INDEX]","typeLabel":"object"},"uniqueKey":"payments","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"without_payment":{"title":"without_payment","summary":"Customer pays another way","value":{"recharge_number":"9876543210","operator":"JIO","circle":"Delhi","amount":299,"service_type":"MOBILE"}},"with_payment":{"title":"with_payment","summary":"Customer paid through Cashfree Payment Gateway","value":{"recharge_number":"9876543210","operator":"JIO","circle":"Delhi","amount":299,"service_type":"MOBILE","payments":[{"source":"CASHFREE_PG","pg_reference_id":"555001","pg_amount":200}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"622fa8b8-a3a0-4168-875d-b0df4ebb8ef4":{"description":"The check was completed. Read `data.status` for the result.","headers":{"x-api-version":{"schema":{"type":"string","format":"YYYY-MM-DD","enum":["2025-01-01"]},"description":"The API version used to process this request, echoed back in the response."}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"The status of the API call. Returns `OK` whenever the request is processed, whatever the result.","example":"OK","uniqueKey":"status","typeLabel":"string"},"message":{"type":"string","description":"A message describing the result.","example":"Recharge validation processed","uniqueKey":"message","typeLabel":"string"},"data":{"type":"object","description":"The result of the check.","properties":{"status":{"type":"string","description":"The result of the check.","enum":["VALID","INVALID","UNAVAILABLE"],"example":"VALID","uniqueKey":"data.status","typeLabel":"enum\u003cstring>"},"reason_code":{"oneOf":[{"type":"string","description":"Why the result is not `VALID`. `null` when the status is `VALID`.","example":"shortfall_limit_exceeded","uniqueKey":"data.reason_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Why the result is not `VALID`. `null` when the status is `VALID`.","example":"shortfall_limit_exceeded","uniqueKey":"data.reason_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.reason_code","typeLabel":"string | null"},"reason_message":{"oneOf":[{"type":"string","description":"A readable explanation of the reason. `null` when the status is `VALID`.","example":"The recharge would take the wallet past the shortfall limit","uniqueKey":"data.reason_message.oneOf.0","typeLabel":"string"},{"type":"null","description":"A readable explanation of the reason. `null` when the status is `VALID`.","example":"The recharge would take the wallet past the shortfall limit","uniqueKey":"data.reason_message.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.reason_message","typeLabel":"string | null"},"validation_ref":{"oneOf":[{"type":"string","description":"The reference of the check. Returned only when the status is `VALID`, and `null` otherwise.","example":"VAL1732450001","uniqueKey":"data.validation_ref.oneOf.0","typeLabel":"string"},{"type":"null","description":"The reference of the check. Returned only when the status is `VALID`, and `null` otherwise.","example":"VAL1732450001","uniqueKey":"data.validation_ref.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.validation_ref","typeLabel":"string | null"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"valid":{"title":"valid","summary":"The recharge can be attempted","value":{"status":"OK","message":"Recharge validation processed","data":{"status":"VALID","reason_code":null,"reason_message":null,"validation_ref":"VAL1732450001"}}},"invalid":{"title":"invalid","summary":"The recharge cannot go through","value":{"status":"OK","message":"Recharge validation processed","data":{"status":"INVALID","reason_code":"insufficient_balance","reason_message":"Recharge wallet balance is lower than the amount","validation_ref":null}}},"unavailable":{"title":"unavailable","summary":"The check could not be completed, you can still send the recharge","value":{"status":"OK","message":"Recharge validation processed","data":{"status":"UNAVAILABLE","reason_code":"pg_unavailable","reason_message":"The PG payment could not be verified right now, the recharge can still be attempted","validation_ref":null}}}},"exampleType":"examples"}},"exampleType":"examples"},"61bec4cb-c6f8-4da1-bc29-29667b66a648":{"description":"Bad request error.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A description of the error explaining what went wrong.","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"An error code for the failure. Use the HTTP status code and the `message` to decide how to handle an error.","uniqueKey":"code","typeLabel":"string"},"type":{"type":"string","description":"The category of the error indicating the class of failure.","uniqueKey":"type","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalid_amount":{"title":"invalid_amount","summary":"Amount is not a whole rupee amount","value":{"message":"amount must be a whole rupee amount greater than 0","code":"request_failed","type":"invalid_request_error"}},"invalid_mobile_number":{"title":"invalid_mobile_number","summary":"Not a valid Indian mobile number","value":{"message":"recharge_number is not a valid indian mobile number","code":"request_failed","type":"invalid_request_error"}},"pg_amount_too_high":{"title":"pg_amount_too_high","summary":"pg_amount is more than amount","value":{"message":"payments[0].pg_amount must not be more than amount","code":"request_failed","type":"invalid_request_error"}}},"exampleType":"examples"}},"exampleType":"examples"},"8a645938-6e74-4af3-bee3-11cb969900da":{"description":"Authentication Error.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A description of the error explaining what went wrong.","example":"authentication Failed","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"An error code identifying the specific failure. Use this to handle errors programmatically.","example":"request_failed","uniqueKey":"code","typeLabel":"string"},"type":{"type":"string","description":"The category of the error indicating the class of failure.","example":"authentication_error","uniqueKey":"type","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"authentication Failed","code":"request_failed","type":"authentication_error"}}},"exampleType":"generated"}},"exampleType":"generated"},"4767e02e-5f29-42a3-92fa-bd23074a5a74":{"description":"Your account is not set up for recharges, or its recharge access is switched off.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A description of the error explaining what went wrong.","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"An error code for the failure. Use the HTTP status code and the `message` to decide how to handle an error.","uniqueKey":"code","typeLabel":"string"},"type":{"type":"string","description":"The category of the error indicating the class of failure.","uniqueKey":"type","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"institution_not_found":{"title":"institution_not_found","summary":"Recharge is not set up for your account","value":{"message":"Recharge is not enabled for this account","code":"request_failed","type":"invalid_request_error"}}},"exampleType":"examples"}},"exampleType":"examples"},"bbaa16af-947d-41ac-82cf-9157e5a20924":{"description":"Rate Limit Error.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A description of the error explaining what went wrong.","example":"Too many requests from IP. Check headers","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"An error code identifying the specific failure. Use this to handle errors programmatically.","example":"request_failed","uniqueKey":"code","typeLabel":"string"},"type":{"type":"string","description":"The category of the error indicating the class of failure.","example":"rate_limit_error","uniqueKey":"type","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Too many requests from IP. Check headers","code":"request_failed","type":"rate_limit_error"}}},"exampleType":"generated"}},"exampleType":"generated"},"faadf5fe-9e95-4296-822d-1dab37adda3b":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A description of the error explaining what went wrong.","example":"internal Server Error","uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"An error code identifying the specific failure. Use this to handle errors programmatically.","example":"internal_error","uniqueKey":"code","typeLabel":"string"},"type":{"type":"string","description":"The category of the error indicating the class of failure.","example":"api_error","uniqueKey":"type","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"internal Server Error","code":"internal_error","type":"api_error"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"7f64cdbc-c2e4-4b13-865c-c52914083533":{"XClientID":{"type":"apiKey","in":"header","name":"x-client-id","description":"Your unique client identifier issued by Cashfree. You can find this in your [Merchant Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).","scopes":[],"schemeName":"XClientID"},"XClientSecret":{"type":"apiKey","in":"header","name":"x-client-secret","description":"Your unique client secret issued by Cashfree. Keep this confidential and never expose it in client-side code. You can find this in your [Merchant Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).","scopes":[],"schemeName":"XClientSecret"}}},"servers":{"7e08fa90-a4ab-42a8-92ed-241ef84d4e8b":{"url":"https://sandbox.cashfree.com","description":"Sandbox (Testing) environment."},"62644396-d77b-43ba-abae-c1e34b9c627f":{"url":"https://api.cashfree.com","description":"Production environment."}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-client-id","description":"Your unique client identifier issued by Cashfree. You can find this in your [Merchant Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).","scopes":[],"schemeName":"XClientID"},"schema":{"title":"x-client-id","type":"string","description":"Your unique client identifier issued by Cashfree. You can find this in your [Merchant Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"XClientID","name":"x-client-id"},{"scheme":{"type":"apiKey","in":"header","name":"x-client-secret","description":"Your unique client secret issued by Cashfree. Keep this confidential and never expose it in client-side code. You can find this in your [Merchant Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).","scopes":[],"schemeName":"XClientSecret"},"schema":{"title":"x-client-secret","type":"string","description":"Your unique client secret issued by Cashfree. Keep this confidential and never expose it in client-side code. You can find this in your [Merchant Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"XClientSecret","name":"x-client-secret"}],"title":"XClientID \u0026 XClientSecret"}]},"originalFileLocation":"openapi/bbps/recharge-cou.yaml"},"subdomain":"cashfreepayments-d00050e9","siteName":"Cashfree Developer Documentation","title":"Validate Recharge | Cashfree","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"manual"},"contextualStarterQuestions":[{"_id":"6b0804942271e3245d0949dc","deploymentId":"66d5827f2de686bc28e7722b","questionText":"When should I use this API?","status":"active","generatedBy":"contextual","path":"api-reference/other-apis/recharge-cou/validation/validate-recharge","createdAt":"2026-11-26T10:06:12.626Z","updatedAt":"2026-11-26T10:06:12.626Z","__v":0},{"_id":"6b0804942271e3245d0949dd","deploymentId":"66d5827f2de686bc28e7722b","questionText":"What do reason codes mean?","status":"active","generatedBy":"contextual","path":"api-reference/other-apis/recharge-cou/validation/validate-recharge","createdAt":"2026-11-26T10:06:12.626Z","updatedAt":"2026-11-26T10:06:12.626Z","__v":0},{"_id":"6b0804942271e3245d0949db","deploymentId":"66d5827f2de686bc28e7722b","questionText":"What checks does validation run?","status":"active","generatedBy":"contextual","path":"api-reference/other-apis/recharge-cou/validation/validate-recharge","createdAt":"2026-11-26T10:06:12.625Z","updatedAt":"2026-11-26T10:06:12.625Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T10:06:04.410Z","originalFileLocation":"api-reference/other-apis/recharge-cou/validation/validate-recharge.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use this API to check whether a recharge is likely to go through, before you take payment from the customer. Send the same details as in the recharge request, without the reference_id. The API runs the same input checks as the recharge request, so a malformed request returns the same errors. The API always returns HTTP 200. Read data.status: - VALID: The recharge can be attempted. data.validation_ref holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it. - INVALID: The recharge cannot go through as sent. data.reason_code and data.reason_message tell you why. Do not take payment for it. - UNAVAILABLE: The check could not be completed right now. You can still send the recharge request. reason_code and reason_message are null when the status is VALID, and validation_ref is null for any other status.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cashfree Developer Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Validate Recharge | Cashfree\">\u003cmeta data-mint-head property=\"og:description\" content=\"Check that a mobile or DTH recharge can go through before you take payment, using the Cashfree COU Validate Recharge API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cashfree Developer Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cashfreepayments-d00050e9.mintlify.site/docs/_mintlify/api/og/v2?division=Validation\u0026amp;title=Validate+Recharge\u0026amp;description=Use+this+API+to+check+whether+a+recharge+is+likely+to+go+through%2C+before+you+take+payment+from+the+customer.%0A%0ASend+the+same+details+as+in+the+recharge+request%2C+\u0026amp;theme=977e1513659fc78ed9084d30\u0026amp;signature=9e7b9244c7b4d205d7a8be9c9f6135467129c0a3ddbebe1cddacab4369b248ae\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Validate Recharge | Cashfree\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Check that a mobile or DTH recharge can go through before you take payment, using the Cashfree COU Validate Recharge API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cashfreepayments-d00050e9.mintlify.site/docs/_mintlify/api/og/v2?division=Validation\u0026amp;title=Validate+Recharge\u0026amp;description=Use+this+API+to+check+whether+a+recharge+is+likely+to+go+through%2C+before+you+take+payment+from+the+customer.%0A%0ASend+the+same+details+as+in+the+recharge+request%2C+\u0026amp;theme=977e1513659fc78ed9084d30\u0026amp;signature=9e7b9244c7b4d205d7a8be9c9f6135467129c0a3ddbebe1cddacab4369b248ae\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/cashfreepayments-d00050e9/MP8bOqKxh3TohVa1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cashfree Developer Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6930ca\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"T69Ao_T0Ps8pkRbluKzW179qvd_aCsWISCApeSsIhRU\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.cashfree.com/#organization\",\"name\":\"Cashfree Developer Documentation\",\"url\":\"https://www.cashfree.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cashfreepayments-d00050e9/6mQw7is1us8FhXrb/static/logo/light.svg?fit=max\u0026auto=format\u0026n=6mQw7is1us8FhXrb\u0026q=85\u0026s=8a2837083063d8a01e0be6b454a1baf1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.cashfree.com/docs#website\",\"name\":\"Cashfree Developer Documentation\",\"url\":\"https://www.cashfree.com/docs\",\"publisher\":{\"@id\":\"https://www.cashfree.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge#webpage\",\"url\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge\",\"name\":\"Validate Recharge\",\"description\":\"Use this API to check whether a recharge is likely to go through, before you take payment from the customer. Send the same details as in the recharge request, without the reference_id. The API runs the same input checks as the recharge request, so a malformed request returns the same errors. The API always returns HTTP 200. Read data.status: - VALID: The recharge can be attempted. data.validation_ref holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it. - INVALID: The recharge cannot go through as sent. data.reason_code and data.reason_message tell you why. Do not take payment for it. - UNAVAILABLE: The check could not be completed right now. You can still send the recharge request. reason_code and reason_message are null when the status is VALID, and validation_ref is null for any other status.\",\"dateModified\":\"2026-11-26T10:06:04.410Z\",\"isPartOf\":{\"@id\":\"https://www.cashfree.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Telecom Recharge for Customers\",\"item\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/operators/fetch-operator-details\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Validate Recharge\",\"item\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge#apireference\",\"headline\":\"Validate Recharge\",\"name\":\"Validate Recharge\",\"description\":\"Use this API to check whether a recharge is likely to go through, before you take payment from the customer. Send the same details as in the recharge request, without the reference_id. The API runs the same input checks as the recharge request, so a malformed request returns the same errors. The API always returns HTTP 200. Read data.status: - VALID: The recharge can be attempted. data.validation_ref holds the reference of the check. Keep it for your records and quote it if you contact support. The Recharge Request API does not need it. - INVALID: The recharge cannot go through as sent. data.reason_code and data.reason_message tell you why. Do not take payment for it. - UNAVAILABLE: The check could not be completed right now. You can still send the recharge request. reason_code and reason_message are null when the status is VALID, and validation_ref is null for any other status.\",\"url\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge\",\"mainEntityOfPage\":{\"@id\":\"https://www.cashfree.com/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge#webpage\"},\"dateModified\":\"2026-11-26T10:06:04.410Z\",\"keywords\":\"validate recharge, recharge validation, mobile recharge, DTH recharge, COU\",\"publisher\":{\"@id\":\"https://www.cashfree.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.cashfree.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cashfree Developer Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cashfree Developer Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/other-apis/recharge-cou/validation/validate-recharge.md","siteName":"Cashfree Developer Documentation","nav":{"global":null,"tabs":[{"tab":"Payments","pages":[{"title":"Payments","href":"/payments/introduction"}]},{"tab":"Payouts","pages":[{"title":"Payouts","href":"/payouts/payouts/introduction"}]},{"tab":"Secure ID","pages":[{"title":"Secure ID","href":"/secure-id/introduction"}]},{"tab":"Partners and Platforms","pages":[{"title":"Partners and Platforms","href":"/partners/introduction"}]},{"tab":"Payments APIs","hidden":true,"pages":[{"title":"Payments APIs","href":"/api-reference/payments/overview"}]},{"tab":"Payouts APIs","hidden":true,"pages":[{"title":"Payouts APIs","href":"/api-reference/payouts/overview"}]},{"tab":"Secure ID APIs","hidden":true,"pages":[{"title":"Secure ID APIs","href":"/api-reference/vrs/overview"}]},{"tab":"Additional APIs","hidden":true,"pages":[{"title":"Additional APIs","href":"/api-reference/prepaid-payment-instruments/overview"}]},{"tab":"Partners APIs","hidden":true,"pages":[{"title":"Partners APIs","href":"/api-reference/platforms/overview"}]},{"tab":"Additional APIs","hidden":true,"groups":[{"group":"BBPS for Business","pages":[{"title":"BBPS for Business","sidebarTitle":"Overview","description":"API reference for Cashfree BBPS for Business covering NPCI-compliant biller API design, transaction status, complaint handling, and onboarding configuration.","href":"/api-reference/other-apis/bbps/overview"},{"title":"APIs to Implement","sidebarTitle":"APIs to Implement","description":"Reference for the APIs billers must expose to join the BBPS network, covering bill fetch, payment posting, and authentication requirements.","href":"/api-reference/other-apis/bbps/apis-to-implement"},{"title":"Next Steps for Biller","sidebarTitle":"Next Steps for Biller","description":"Follow these next steps after implementing the BBPS biller APIs, including sharing endpoints and credentials with Cashfree to complete onboarding and go live.","href":"/api-reference/other-apis/bbps/next-steps-for-biller"},{"openapi":"get /bbps/biller/bill/status/{bbps_transaction_id}","title":"Check Transaction Status","description":"The check transaction status API allows billers to retrieve the current status of a transaction using the unique BBPS transaction ID associated with the bill. This endpoint serves as a reliable method for querying transaction details, providing merchants with real-time updates on payment status.","href":"/api-reference/other-apis/bbps/check-transaction-status"},{"title":"NPCI Onboarding Configurations","sidebarTitle":"NPCI Onboarding Configurations","description":"Configure BBPS biller onboarding fields including customer input parameters, payment amount exactness, extra bill fetch response data, and acceptance rules.","href":"/api-reference/other-apis/bbps/npci-onboarding-configurations"}]},{"group":"BBPS for Customers","pages":[{"title":"BBPS for Customers","sidebarTitle":"Overview","description":"Cashfree's BBPS COU APIs enable Agent Institutions to connect to the BBPS network and offer bill payment services across all NPCI-registered billers.","href":"/api-reference/other-apis/bbps-cou/overview"},{"title":"Data to Test Integration","sidebarTitle":"Data to Test Integration","description":"Use the sandbox credentials, test billers, and end-to-end flow on this page to validate your BBPS COU integration before going live.","href":"/api-reference/other-apis/bbps-cou/data-to-test-integration"},{"title":"Synchronous Responses","sidebarTitle":"Synchronous responses","description":"Learn how to handle synchronous responses for the Bill Fetch Request and Bill Payment Request APIs when the opt-in feature is enabled.","href":"/api-reference/other-apis/bbps-cou/synchronous-responses"},{"title":"Payment Scenarios","sidebarTitle":"Payment scenarios","description":"BBPS COU payment scenarios for prefunding and postfunding Agent Institutions, covering standard, shortfall, split, and Pay Together use cases.","href":"/api-reference/other-apis/bbps-cou/payment-scenarios"},{"group":"Billers","pages":[{"title":"Fetch Biller Categories","sidebarTitle":"Biller Categories","openapi":"openapi/bbps/bbps-cou.yaml get /bbps/cou/v1/billers/categories","description":"Biller categories represent the top-level classification of billers on the BBPS network, such as Electricity, DTH, Gas, Loan Repayment, and Education Fees. Every biller belongs to a category, and fetching the category list is the first step in the biller discovery flow before initiating a bill fetch or payment.\n\nBecause biller categories change infrequently, cache this response and refresh it periodically rather than calling the API on every user request.","href":"/api-reference/other-apis/bbps-cou/billers/categories"},{"title":"Fetch Biller MDM Details","sidebarTitle":"Biller MDM Details","description":"Retrieve BBPS biller MDM details, including customer parameters, supported payment modes, and fee structures, by biller category or biller ID.","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/info","href":"/api-reference/other-apis/bbps-cou/billers/info"}]},{"group":"Bill Fetch","pages":[{"title":"Bill Fetch Request","sidebarTitle":"Bill Fetch Request","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/request/bill-fetch","description":"With the biller's MDM details in hand, use this API to initiate a bill fetch or validation for the customer. Pass the customer input parameters specified in the biller's MDM response, such as a consumer number or mobile number, along with the agent device context. The API automatically determines the payment flow (`FETCH_AND_PAY` or `VALIDATE_AND_PAY`) based on the biller's configuration.\n\n\u003cWarning>\nThis API is only applicable for billers whose `fetch_requirement` or `support_bill_validation` is `MANDATORY` or `OPTIONAL`. For billers where both are `NOT_SUPPORTED` (`DIRECT_PAY` flow), skip this step and proceed directly to the [Bill Payment Request API](/api-reference/other-apis/bbps-cou/bill-payment/request).\n\u003c/Warning>\n\n\u003cAccordion title=\"Flow determination logic\">\n\nThe flow is evaluated in the following priority order based on the biller's MDM configuration:\n\n| Priority | `fetch_requirement` | `support_bill_validation` | Flow |\n|---|---|---|---|\n| 1 | `MANDATORY` | Any | `FETCH_AND_PAY` |\n| 2 | `NOT_SUPPORTED` | `MANDATORY` or `OPTIONAL` | `VALIDATE_AND_PAY` |\n| 3 | `NOT_SUPPORTED` | `NOT_SUPPORTED` | `DIRECT_PAY` |\n| 4 | `OPTIONAL` | `MANDATORY` | `VALIDATE_AND_PAY` |\n| 5 | `OPTIONAL` | Any other | `FETCH_AND_PAY` |\n\nFor `DIRECT_PAY`, this API is not applicable. Calling it returns a validation error. Proceed directly to the Bill Payment Request API.\n\n\u003c/Accordion>\n\n\u003cWarning>\nWith synchronous responses enabled, handle both HTTP `200` and HTTP `202`, and set your HTTP client timeout to at least 30 seconds. For details, see [Synchronous responses](/api-reference/other-apis/bbps-cou/synchronous-responses).\n\u003c/Warning>\n\n\u003cTip>\nOnce you receive a successful bill fetch, proceed to the [Bill Payment Request API](/api-reference/other-apis/bbps-cou/bill-payment/request) to complete the payment. When polling the [Bill Fetch Response API](/api-reference/other-apis/bbps-cou/bill-fetch/response) for the result, check the biller's `biller_response_type` field from the Fetch Biller MDM Details response. If it is `LIST` (the biller can return multiple outstanding bills in a single fetch, such as traffic challans), use `x-api-version: 2026-01-01` on the response API to receive all bills in the `biller_responses` array. For all other billers, use the default `x-api-version: 2025-01-01`, which returns a single bill in `biller_response`.\n\u003c/Tip>","href":"/api-reference/other-apis/bbps-cou/bill-fetch/request"},{"title":"Bill Fetch Response","sidebarTitle":"Bill Fetch Response","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/response/bill-fetch","description":"Use this API to retrieve the result of a previously initiated bill fetch or validation request. Pass the `ref_id` returned by the Bill Fetch Request API to get the current status and, on success, the complete bill details or validation confirmation.\n\nThe `flow` field from the Bill Fetch Request response determines what this API returns. For `FETCH_AND_PAY`, the response includes the customer's outstanding bill details for review before payment. For `VALIDATE_AND_PAY`, the response confirms the customer's identity without returning bill details. Use the `message` field to determine whether the result is ready, successful, or failed.\n\n\u003cNote>\nIf synchronous responses are enabled for your account and the Bill Fetch Request API returned HTTP `200`, the final result is already available in `data.result` and you do not need to poll. Poll only when the request returned HTTP `202`.\n\u003c/Note>\n\n\u003cAccordion title=\"Polling strategy\">\n\nPoll at increasing intervals until `message` is no longer `\"Request is still being processed\"`:\n\n| Attempt | Wait before this poll |\n|---|---|\n| 1 | 5 seconds |\n| 2 | 15 seconds |\n| 3 | 30 seconds |\n| 4 | 1 minute |\n| 5+ | 3 minutes |\n\nStop polling when `message` is `\"Bill details fetched successfully\"` or `\"Bill request failed\"`. If the request remains in a processing state beyond your retry limit, treat it as a timeout and raise a support ticket.\n\n\u003c/Accordion>\n\n## API versions\n\nThis API supports two versions through the `x-api-version` header. Version `2026-01-01` introduces the Multi-Bill Fetch and Pay feature, which allows billers to return multiple outstanding bills in a single fetch response. This is useful for billers such as traffic challans or loan accounts where a customer may have more than one outstanding bill.\n\nVersion `2026-01-01` is recommended for all new integrations. In this version, bill details are returned in the `biller_responses` array, which supports both single and multiple bills. In `2025-01-01` (the default), bill details are returned in a single `biller_response` object, which only supports one bill per fetch.\n\n| Header value | Bill details field | Supports multiple bills |\n|---|---|---|\n| `2025-01-01` (default) | `biller_response` (object) | No. Returns only one bill. |\n| `2026-01-01` | `biller_responses` (array) | Yes. Returns all outstanding bills. |\n\nFor billers that support multi-bill fetch and pay (`biller_response_type: LIST` in the Fetch Biller MDM Details response), use `selection_type` from the MDM response to determine whether the customer must pay all bills (`ALL`), can select one (`SINGLE`), or can choose multiple (`MULTIPLE`).\n\n\u003cAccordion title=\"Response fields by flow and outcome\">\n\n| Flow | Outcome | `message` | Fields in `data` |\n|---|---|---|---|\n| Both | Pending | `Request is still being processed` | `bill_fetch_response` |\n| `FETCH_AND_PAY` | Success | `Bill details fetched successfully` | `bill_fetch_response`, `bill_details`, `biller_response` or `biller_responses`, `additional_info` |\n| `VALIDATE_AND_PAY` | Success | `Bill details fetched successfully` | `bill_fetch_response`, `additional_info` |\n| Both | Failed | `Bill request failed` | `bill_fetch_response` (includes `compliance_resp_cd` and `compliance_reason`) |\n\n\u003c/Accordion>\n\n\u003cTip>\nOnce the bill fetch is successful, use the data from this response to initiate payment through the [Bill Payment Request API](/api-reference/other-apis/bbps-cou/bill-payment/request).\n\u003c/Tip>","href":"/api-reference/other-apis/bbps-cou/bill-fetch/response"}]},{"group":"Bill Payment","pages":[{"title":"Bill Payment Request","sidebarTitle":"Bill Payment Request","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/request/bill-payment","description":"Once a bill fetch or validation is successful, use this API to initiate the bill payment. This is the core transaction step in the BBPS bill payment journey. It debits the customer's chosen payment instrument, processes the payment through the BBPS network, and settles the amount with the biller.\n\nPass the `bill_fetch_ref_id` from the Bill Fetch Request to link this payment to the corresponding fetch. For `DIRECT_PAY` billers (where no prior fetch is required), omit the `bill_fetch_ref_id`. Include the bill details, payment method, amount, and payment instrument information as described in the request parameters below.\n\nBy default, this API is asynchronous and returns HTTP `202` with a `transaction_ref_id`. Poll the [Bill Payment Response API](/api-reference/other-apis/bbps-cou/bill-payment/response) using both `bill_fetch_ref_id` and `transaction_ref_id` to get the final payment status. If synchronous responses are enabled for your account, the API attempts to return the final result in the same call. For details, see [Synchronous responses](/api-reference/other-apis/bbps-cou/synchronous-responses).\n\n\u003cWarning>\nWith synchronous responses enabled, handle both HTTP `200` and HTTP `202`, and set your HTTP client timeout to at least 30 seconds. Do not resend a payment request after a client timeout, as this can create a duplicate payment.\n\u003c/Warning>\n\n\u003cTip>\nAfter the payment is processed, use the [Bill Payment Response API](/api-reference/other-apis/bbps-cou/bill-payment/response) to retrieve the final payment status. If the customer has a dispute, use the [Ticket APIs](/api-reference/other-apis/bbps-cou/ticket/request) to raise a support ticket.\n\u003c/Tip>\n\n\u003cNote>\nWhen polling the [Bill Payment Response API](/api-reference/other-apis/bbps-cou/bill-payment/response), use the same `x-api-version` you used for the Bill Fetch Response API. If the biller's `biller_response_type` is `LIST` (from the Fetch Biller MDM Details response), use `x-api-version: 2026-01-01` to receive bill details in the `biller_responses` array. For all other billers, use the default `x-api-version: 2025-01-01`.\n\u003c/Note>","href":"/api-reference/other-apis/bbps-cou/bill-payment/request"},{"title":"Bill Payment Response","sidebarTitle":"Bill Payment Response","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/response/bill-payment","description":"Use this API to retrieve the final status of a previously submitted bill payment. This is the last step in the bill payment journey. A successful response confirms that the payment has been settled with the biller through the BBPS network. For postfunding Agent Institutions, settlement debits the shortfall amount from the shortfall wallet.\n\nPass both `bill_fetch_ref_id` and `transaction_ref_id` from the Bill Payment Request API response. The `bill_fetch_ref_id` is not required for the `DIRECT_PAY` flow. Use the `message` field to determine whether the payment is still processing, successful, or failed.\n\n\u003cNote>\nIf synchronous responses are enabled for your account and the Bill Payment Request API returned HTTP `200`, the final payment status is already available in `data.result` and you do not need to poll. Poll only when the request returned HTTP `202`.\n\u003c/Note>\n\n\u003cAccordion title=\"Polling strategy\">\n\nPoll at increasing intervals until `message` is no longer `\"Payment is still being processed\"`:\n\n| Attempt | Wait before this poll |\n|---|---|\n| 1 | 5 seconds |\n| 2 | 15 seconds |\n| 3 | 30 seconds |\n| 4 | 1 minute |\n| 5+ | 3 minutes |\n\nStop polling when `message` is `\"Payment successful\"` or `\"Payment failed\"`. If the payment remains in a processing state beyond your retry limit, treat it as a timeout and raise a support ticket.\n\n\u003c/Accordion>\n\n\u003cAccordion title=\"Response outcomes\">\n\nThe outcome is conveyed by the top-level `message` and can be confirmed from `data.bill_payment_response.reason.response_code`:\n\n| `message` | `response_code` | Meaning |\n|---|---|---|\n| `Payment is still being processed` | `PENDING` | Payment is still in progress. Continue polling. |\n| `Payment successful` | `000` | Payment completed successfully. Use the response data to show a receipt to the customer. |\n| `Payment failed` | Empty or biller decline code | Payment failed. Read `reason.compliance_reason` for the cause. |\n\n\u003c/Accordion>\n\n## API versions\n\nThis API supports two versions through the `x-api-version` header. Version `2026-01-01` introduces the Multi-Bill Fetch and Pay feature, which allows billers to confirm multiple bills in a single payment response.\n\nVersion `2026-01-01` is recommended for all new integrations. In this version, confirmed bill details are returned in the `biller_responses` array. In `2025-01-01` (the default), bill details are returned in a single `biller_response` object.\n\n| Header value | Bill details field | Supports multiple bills |\n|---|---|---|\n| `2025-01-01` (default) | `biller_response` (object) | No. Returns only one bill. |\n| `2026-01-01` | `biller_responses` (array) | Yes. Returns all settled bills. |\n\nFor billers that support multi-bill fetch and pay (`biller_response_type: LIST` in the Fetch Biller MDM Details response), use `selection_type` from the MDM response to determine how many bills were selected by the customer (`SINGLE`, `MULTIPLE`, or `ALL`).\n\n\u003cTip>\nIf the customer has a dispute about a successfully processed payment, use the [Ticket APIs](/api-reference/other-apis/bbps-cou/ticket/request) to raise a support ticket.\n\u003c/Tip>","href":"/api-reference/other-apis/bbps-cou/bill-payment/response"}]},{"group":"Ticket","pages":[{"title":"Raise a Ticket Request","sidebarTitle":"Ticket Request","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/request/ticket","description":"Use this API to raise a support ticket for a previously processed bill payment.\nThis is an **async** API. It returns an acknowledgement with a `ref_id`.\nPoll the Ticket Status API using `ref_id` to get the current status of your ticket.\n\n\u003cAccordion title=\"Disposition codes\">\n\nPass one of the following codes in the `disposition` field:\n\n| Disposition code | Description | Type |\n|---|---|---|\n| `D11` | Transaction Successful, Amount Debited but services not received | Dispute |\n| `D12` | Transaction Successful, Amount Debited but Service Disconnected or Service Stopped | Dispute |\n| `D13` | Transaction Successful, Amount Debited but LPSC Late Payment Surcharge Charges added in next bill | Dispute |\n| `D21` | Erroneously paid in wrong account | Dispute |\n| `D22` | Duplicate Payment | Dispute |\n| `D23` | Erroneously paid the wrong amount | Dispute |\n| `D31` | Payment information not received from Biller or delay in receiving payment information from the Biller | Complaint |\n| `D32` | Bill paid but amount not adjusted or still showing due amount | Complaint |\n\n\u003c/Accordion>","href":"/api-reference/other-apis/bbps-cou/ticket/request"},{"title":"Poll Ticket Status Response","sidebarTitle":"Ticket Status Response","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/v1/billers/response/ticket-status","description":"Use this API to poll the status of a previously raised ticket.\nCall this using the `ref_id` returned from the Raise Ticket Request API.\n\n\u003cAccordion title=\"Polling strategy\">\n\nPoll at increasing intervals until `message` is no longer `\"Ticket request is still being processed\"`:\n\n| Attempt | Wait before this poll |\n|---|---|\n| 1 | 5 seconds |\n| 2 | 15 seconds |\n| 3 | 30 seconds |\n| 4 | 1 minute |\n| 5+ | 3 minutes |\n\nStop polling when `message` is `\"Ticket details fetched successfully\"` or `\"Ticket request failed\"`. If the ticket remains in a processing state beyond your retry limit, contact Cashfree support with the `ref_id`.\n\n\u003c/Accordion>\n\n\u003cAccordion title=\"Response outcomes by `message`\">\n\n| `message` | Meaning |\n|---|---|\n| `\"Ticket details fetched successfully\"` | Completed. Check `data` for ticket details. |\n| `\"Ticket request failed\"` | Terminal failure. Stop polling. |\n| `\"Ticket request is still being processed\"` | Still processing. Continue polling. |\n\n\u003c/Accordion>","href":"/api-reference/other-apis/bbps-cou/ticket/response"}]},{"group":"Wallet","pages":[{"title":"Fetch Agent Institution Wallet Balance","sidebarTitle":"Wallet Balance","openapi":"openapi/bbps/bbps-cou.yaml get /bbps/cou/agent/{agentId}/wallet/balance","description":"Use this API to fetch the current available wallet balance for a given Agent Institution.\nThis balance reflects funds available for BBPS bill payment transactions.\n\n\u003cNote>\nThe balance can be positive or negative, depending on the Agent Institution's funding model:\n- Prefunding model: the Agent Institution funds the wallet in advance, and bill payments are debited from it. The balance is the remaining prefunded amount and does not go below zero.\n- Shortfall (postfunding) model: bill payments are drawn against the Agent Institution's shortfall wallet. A negative balance represents the current shortfall, that is, the amount the Agent Institution has drawn and must repay.\n\u003c/Note>","href":"/api-reference/other-apis/bbps-cou/wallet/balance"},{"title":"Fetch Agent Institution Wallet Ledger","sidebarTitle":"Wallet Ledger","openapi":"openapi/bbps/bbps-cou.yaml post /bbps/cou/agent/{agentId}/wallet/ledger","description":"Use this API to fetch a paginated list of wallet ledger entries for a given Agent Institution.\nIncludes credits (recharges) and debits (bill payments).\nResults can be filtered by date range, transaction type, or UTR.\nAll request body fields are optional. An empty body returns all entries.\n\n\u003cNote>\nThe ledger lists wallet credits (recharges) and debits (bill payments). On the prefunding model, each bill payment also produces freeze and unfreeze hold entries against the prefunded balance. On the shortfall (postfunding) model, debits can take the running balance negative, reflecting the amount drawn against the credit line.\n\u003c/Note>","href":"/api-reference/other-apis/bbps-cou/wallet/ledger"}]},{"title":"Bill Fetch and Payment Error Codes","sidebarTitle":"Error Codes","description":"Cashfree BBPS Customer Operating Unit (COU) compliance response codes for failed bill fetch, validation, and payment requests, with retry categories.","href":"/api-reference/other-apis/bbps-cou/error-codes"},{"title":"COU Webhooks","sidebarTitle":"COU Webhooks","description":"Cashfree BBPS COU webhooks notify your server when a bill fetch, bill validation, bill payment, recharge, or biller MDM update reaches a terminal state.","icon":"webhook","href":"/api-reference/other-apis/bbps-cou/webhooks"}]},{"group":"Telecom Recharge for Customers","pages":[{"group":"Operators","pages":[{"title":"Fetch Operator Details","sidebarTitle":"Operator Details","openapi":"openapi/bbps/recharge-cou.yaml post /bbps/cou/v1/recharge/fetch-operator-details","description":"Use this API to find the operator and telecom circle that a customer's mobile number belongs to. A telecom circle is the service area of a mobile network in India. Call it before you show recharge plans or send a recharge, so that you can pre-select the right operator for the customer.\n\nSend the number as the customer typed it. The API keeps only the digits and drops leading zeros. If more than 10 digits remain and they start with `91`, the `91` country code is dropped. The result must be a 10-digit number that starts with 6, 7, 8, or 9.\n\n\u003cNote>\nAlways let the customer confirm or change the operator before they pay. Use the Fetch Operators API to build the list of operators to choose from.\n\u003c/Note>\n\nWhen the operator cannot be found, the API still returns HTTP 200. In that case `data.operator_code` is `null`, and you ask the customer to select the operator. Check `data.operator_code` on every response, and do not rely on the HTTP status code alone.\n\nUse the `operator_code` from the response as the `operator` value in the Validate Recharge, Fetch Plans, and Recharge Request APIs.","href":"/api-reference/other-apis/recharge-cou/operators/fetch-operator-details"},{"title":"Fetch Operators","sidebarTitle":"Operator List","openapi":"openapi/bbps/recharge-cou.yaml get /bbps/cou/v1/recharge/operators","description":"Use this API to get the operators that your customers can recharge. Use it to fill the operator list on your recharge screen, and to let a customer change the operator that the Fetch Operator Details API suggested.\n\nPass `service_type` to get the operators of one type, or leave it out to get all operators. The value is not case-sensitive.\n\nWhen there is no operator for the type that you ask for, the API still returns HTTP 200 with an empty `operators` list.\n\nUse the `operator_code` of the operator that the customer selects as the `operator` value in the Validate Recharge, Fetch Plans, and Recharge Request APIs.","href":"/api-reference/other-apis/recharge-cou/operators/fetch-operators"}]},{"group":"Plans","pages":[{"title":"Fetch Plans","sidebarTitle":"Fetch Plans","openapi":"openapi/bbps/recharge-cou.yaml get /bbps/cou/v1/recharge/plans","description":"Use this API to get the recharge plans of an operator, so that you can show the customer what they can buy.\n\nPass the `operator` code from the Fetch Operators or Fetch Operator Details API. For `AIRTEL` and `VI`, also pass the customer's `mobile_number`. The number is cleaned in the same way as in the Fetch Operator Details API, and the result must be a valid 10-digit Indian mobile number. For `JIO`, you do not need to pass `mobile_number`.\n\nEvery operator returns plans in the same format. The field values come from the operator unchanged. A field that does not apply to a plan is `null`.\n\nWhen no plans are available for the operator, the API still returns HTTP 200 with an empty `plans` list.","href":"/api-reference/other-apis/recharge-cou/plans/fetch-plans"}]},{"group":"Validation","pages":[{"title":"Validate Recharge","sidebarTitle":"Validate Recharge","openapi":"openapi/bbps/recharge-cou.yaml post /bbps/cou/v1/recharge/validate","href":"/api-reference/other-apis/recharge-cou/validation/validate-recharge"}]},{"group":"Recharge","pages":[{"title":"Recharge Request","sidebarTitle":"Recharge Request","openapi":"openapi/bbps/recharge-cou.yaml post /bbps/cou/v1/recharge/request","description":"Use this API to recharge a mobile number or a direct-to-home (DTH) connection. Send your own unique `reference_id` with every recharge. The API uses it to recognise a recharge that you send again.\n\nIn the sandbox environment, you can test with any valid recharge number.\n\nThe API returns HTTP 200 for every recharge that it accepts, so read `data.status`:\n\n- `SUCCESS`: The recharge is done. `data.operator_ref` holds the operator's reference when the operator gives one.\n- `FAILED`: The recharge did not go through. `data.failure_reason` says why.\n- `PROCESSING`: The recharge is still in progress. Do not send it again as a new recharge. Use the [Fetch Recharge Status API](/api-reference/other-apis/recharge-cou/recharge/fetch-recharge-status) with the same `reference_id` to get the final result. You are also notified through the [`RECHARGE_STATUS` webhook](/api-reference/other-apis/bbps-cou/webhooks#recharge_status) when a recharge that was in progress is finalised.\n\n## Recharge funding\n\nThe recharge is always paid from your recharge wallet. What you send in `payments` tells the API how the customer paid. For what prefunding and postfunding mean, see [Payment Scenarios](/api-reference/other-apis/bbps-cou/payment-scenarios). The shortfall limit is the maximum amount by which your recharge wallet can go below zero. A recharge that would take the wallet past this limit cannot go through.\n\nThe following table shows what the wallet pays in each case:\n\n| Account | With `payments` | Without `payments` |\n|---|---|---|\n| **Prefunding** | The wallet pays the full `amount`. | The wallet pays the full `amount`. |\n| **Postfunding** | The wallet pays the `amount` less `payments[].pg_amount`. The customer's payment goes toward the recharge. | The wallet pays the full `amount`. |\n\nLeave out `payments` when the customer paid another way. Nothing is verified in that case.\n\nWhen you send `payments`, the Cashfree Payment Gateway payment is verified before the recharge starts. The payment must be successful, must belong to your account, and `pg_amount` must equal the amount captured for the payment less any vendor splits on its order. A payment backs one recharge. If the recharge fails, the customer's payment is refunded.\n\n## Duplicate requests\n\nThe following rules apply when you send a recharge with a `reference_id` that you have used before:\n\n- **Same `reference_id`, same details**: The API returns the recharge that it already has, with its current status. It does not create a second recharge. A recharge that you send with a new `reference_id` is a new recharge. To check the result of a recharge, use the Fetch Recharge Status API with its `reference_id`.\n- **What counts as the same details**: The same `recharge_number`, `operator`, `amount`, `service_type`, and `payments`. `circle` is not compared.\n- **Same `reference_id`, different details**: The API returns a 409 error.\n- **A recharge that is `FAILED`**: It stays failed for that `reference_id`.","href":"/api-reference/other-apis/recharge-cou/recharge/recharge-request"},{"title":"Fetch Recharge Status","sidebarTitle":"Recharge Status","openapi":"openapi/bbps/recharge-cou.yaml get /bbps/cou/v1/recharge/status","description":"Use this API to get the current state of a recharge that you sent with the Recharge Request API. Pass the same `reference_id` that you used in the recharge request.\n\nThe response has the same fields as the Recharge Request response. Read `data.status`:\n\n- `SUCCESS`: The recharge is done. `data.operator_ref` holds the operator's reference when the operator gives one.\n- `FAILED`: The recharge did not go through. `data.failure_reason` says why. A failed recharge stays failed for that `reference_id`.\n- `PROCESSING`: The recharge is still in progress.\n\n## Status notifications\n\nYou are notified through the [`RECHARGE_STATUS` webhook](/api-reference/other-apis/bbps-cou/webhooks#recharge_status) when a recharge that was in progress is finalised.","href":"/api-reference/other-apis/recharge-cou/recharge/fetch-recharge-status"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"AI Stack","pages":[{"title":"AI Stack","href":"/tools-ai/overview"}]},{"tab":"Help Center","pages":[{"title":"Help Center","href":"/help/overview"}]}]},"basePath":"","title":"Validate Recharge | Cashfree","deploymentId":"dpl_GdAzCmzmx9W4gre8gBQCspoLrBzA","buildId":"dpl_GdAzCmzmx9W4gre8gBQCspoLrBzA","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-D6BRPibu.js","snippetPresets-DsVotmIn.js","utils-JkySM0S9.js","style-to-object-BY3JEAdk.js","utils-2LVMUG-b.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-Cu4GBcqW.js","conditional-requirements-CFM0id0Q.js","cloneDeep-E7nJO2ao.js","_Uint8Array-CrqfV1l9.js","isObject-FP1Yky1u.js","ApiExamples-BZGAm2ku.js","usePlaygroundInputsStore-CPGdvGcU.js","shallow-RUq8jv1c.js","isEqual-Biqx0dfZ.js","CodeSnippets-DRItjFNm.js","CodeSnippet-DCGpIA6_.js","use-playground-group-access-D3hf_5DD.js","Page-Bz_ZNFmj.js","api-description-markdown-4VF3VdSe.js","DynamicMarkdown-CG1SzpW8.js","SectionHeading-Qkn3p9WH.js","MethodPill-1rLYbtHF.js","getPastedJson-rsbWFJUH.js","Check2Icon-DYVgxsyH.js","axios-CsQoIw0U.js","Markdown-fnczw8FV.js","AssistantPageLink-BWJlpE1a.js","dist-DmLaGBKJ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}