{"id":706,"date":"2026-11-19T12:00:00","date_gmt":"2026-11-19T12:00:00","guid":{"rendered":"https:\/\/paymentsetu.com\/blog\/?p=706"},"modified":"2026-11-19T12:00:00","modified_gmt":"2026-11-19T12:00:00","slug":"upi-payment-integration-android","status":"publish","type":"post","link":"https:\/\/paymentsetu.com\/blog\/upi-payment-integration-android\/","title":{"rendered":"UPI Payment Integration in Android (Kotlin) With Auto-Verification"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">UPI payment integration in android is straightforward to start with an intent, but the intent result is not proof that money reached your account. This guide shows a Kotlin flow that creates an order on your server, launches an order-specific UPI payment, and marks the order paid only after server-side verification.<\/p>\n\n\n\n<aside class=\"ap-card\" aria-label=\"PaymentSetu Pro\">\n<span class=\"ap-card__badge\">Best for app teams<\/span>\n<div class=\"ap-card__body\"><p class=\"ap-card__name\">PaymentSetu Pro<\/p><p class=\"ap-card__best\">Best for growing WooCommerce \/ WHMCS stores and service businesses with up to 1,000 UPI payments a month (most popular)<\/p><ul class=\"ap-card__features\"><li>1,000 credits (1 credit = 1 successful payment verified)<\/li><li>0% commission, direct-to-bank UPI settlement<\/li><li>Dynamic QR, webhooks and API access<\/li><li>WooCommerce and WHMCS plugins<\/li><li>Priority support<\/li><\/ul><\/div>\n<div class=\"ap-card__side\"><p class=\"ap-card__price\">\u20b9999 <small>Most popular \u00b7 \u20b9999 \/ 30 days \u00b7 1,000 verified payments<\/small><\/p><a class=\"ap-card__btn\" href=\"https:\/\/paymentsetu.com\/auth\/register\">Get Pro \u2192<\/a><\/div>\n<\/aside>\n\n\n\n<p class=\"wp-block-paragraph\">The important separation is simple: Android starts the payment experience; your backend decides whether the order is paid. PaymentSetu is a payment verification service, not a payment gateway. The customer pays directly into your own connected Paytm Business or PhonePe Business merchant account, while PaymentSetu matches the payment to the order and sends your webhook.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What you need<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: an Android app can display a payment request, but it should not hold credentials or make the final payment decision.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prepare these pieces before writing the Kotlin screen:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>An Android Studio project using Kotlin and AndroidX Activity.<\/li>\n\n\n<li>A PaymentSetu account with an API key and webhook secret kept on your server.<\/li>\n\n\n<li>A connected Paytm Business or PhonePe Business merchant account that should receive the customer\u2019s payment.<\/li>\n\n\n<li>A backend database record for the order amount, currency, unique <code>client_txn_id<\/code>, payment status and UTR.<\/li>\n\n\n<li>A public HTTPS webhook endpoint.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">For a custom app, PaymentSetu exposes <code>POST \/api\/create_order<\/code>, <code>GET \/api\/order_status\/{client_txn_id}<\/code> and <code>GET \/api\/check_credits<\/code>. API-key authentication belongs on your backend, never in the APK. The service uses HMAC-signed webhooks, so your endpoint can verify that a notification came from the configured integration before changing an order.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are building a website rather than a native app, see our guide to <a href=\"https:\/\/paymentsetu.com\/blog\/how-to-create-upi-payment-link\/\">creating a UPI payment link<\/a>. The same rule applies: a link starts payment, while a trusted server event confirms it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How UPI intent works on Android<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: knowing the hand-off boundary prevents you from treating an app switch as a successful transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Android\u2019s implicit <code>ACTION_VIEW<\/code> intent lets your app pass a URI to another installed app that can handle it. A UPI payment URI commonly uses the <code>upi:\/\/pay<\/code> scheme and carries values such as the payee, amount, currency and transaction reference. Android then lets the customer choose an available UPI app and authorise the payment there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/developer.android.com\/guide\/components\/intents-common\" target=\"_blank\" rel=\"noopener\">Android common intents documentation<\/a> describes <code>ACTION_VIEW<\/code>, URI data and checking <code>resolveActivity()<\/code> before launching. NPCI also lists intent as one of the merchant UPI integration modes in its <a href=\"https:\/\/www.npci.org.in\/what-we-do\/upi\/faqs\" target=\"_blank\" rel=\"noopener\">UPI FAQ<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For an order-based flow, the URI should contain values generated from the server\u2019s order record. A typical shape looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>upi:\/\/pay?pa=merchant%40bank&amp;pn=Example%20Store&amp;am=1299.00&amp;cu=INR&amp;tr=ORD-20261029-1042&amp;tn=Order%201042<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not build the payee, price or order reference from an untrusted amount supplied by the app. Your server should create the order, calculate the final amount, and return either the payment URI or the payment data needed by your integration. Encode each URI value once; an ampersand inside a note must not become a new query parameter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like this: tapping Pay opens a compatible UPI app with the expected merchant and amount visible, and your app still shows the order as pending until the backend confirms it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why the intent response is not proof of payment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: a return code describes the hand-off between apps, not the final credit in your merchant account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The UPI app can return control to your activity after the customer cancels, completes, or leaves the payment screen. Even an <code>Activity.RESULT_OK<\/code> value is not your accounting record. It does not, on its own, prove the correct amount reached the correct merchant account or that the reference has not already been used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google recommends the AndroidX Activity Result APIs for receiving activity results, and notes that the callback should be registered every time the activity is created because the process can be recreated while another activity is open. See <a href=\"https:\/\/developer.android.com\/training\/basics\/intents\/result\" target=\"_blank\" rel=\"noopener\">Get a result from an activity<\/a> for the current pattern.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the result only to update the interface:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><code>RESULT_OK<\/code> or a returned data value can trigger a \u201cchecking payment\u201d state.<\/li>\n\n\n<li><code>RESULT_CANCELED<\/code> can return the user to the payment screen without changing the order.<\/li>\n\n\n<li>A missing or unexpected result should also leave the order pending.<\/li>\n\n\n<li>Only a verified backend event should unlock a product, confirm a booking or activate an account.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This is also why a customer screenshot should not be your success signal. Your server should compare the expected amount, the intended merchant account, the verified UTR and the current order state. The update must be idempotent, so the same event cannot fulfil the order twice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create the order on your server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: the server must own the amount and reference before the app opens a UPI app.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the customer taps your app\u2019s Pay button, call your own backend, for example <code>POST \/mobile\/payments<\/code>. The app sends a product or cart identifier, not a trusted final price. Your backend should:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Load the product or cart from your database.<\/li>\n\n\n<li>Calculate the amount using server-side rules.<\/li>\n\n\n<li>Generate a unique <code>client_txn_id<\/code>, such as <code>android-20261029-8f21c6<\/code>.<\/li>\n\n\n<li>Save the order as <code>pending<\/code> before calling the payment verification service.<\/li>\n\n\n<li>Call <code>POST \/api\/create_order<\/code> with the current request format from your PaymentSetu API documentation.<\/li>\n\n\n<li>Return only the order reference, payment URI or QR data, and a display amount to the Android app.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The API key and webhook secret must never be returned to the app. Keep the vendor-specific mapping in one backend adapter so your mobile client does not depend on a response wrapper or field name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A server adapter has this shape. The endpoint and authentication are fixed integration boundaries; use the exact payload and response fields shown in your current PaymentSetu account documentation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/\/ Your backend: POST \/mobile\/payments\n$clientTxnId = 'android-' . bin2hex(random_bytes(8));\n$amount = lookupFinalAmountFromYourDatabase($_POST['cart_id'] ?? '');\n\n\/\/ Persist clientTxnId, amount and status=pending before the API request.\n$payload = [\n    'client_txn_id' =&gt; $clientTxnId,\n    'amount' =&gt; number_format($amount, 2, '.', ''),\n    \/\/ Add the webhook URL and any other fields required by your API setup.\n];\n\n\/\/ Send $payload to POST \/api\/create_order with your server-side API key.\n\/\/ Map the documented response to your own stable response:\n\/\/ {\"client_txn_id\":\"...\", \"upi_uri\":\"...\", \"amount\":\"...\"}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not let the app call <code>create_order<\/code> directly. A public API key can be extracted from an APK, and a client-calculated amount can be changed before the order is created.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like this: your database contains one pending order with a unique reference and exact amount, and the app receives a payment request associated with that same reference.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Launch the UPI app from Kotlin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: the Android layer should launch the payment request and handle the return without claiming that the order is paid.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Register an AndroidX activity-result launcher in your <code>Activity<\/code> or <code>Fragment<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import android.app.Activity\nimport android.content.Intent\nimport android.net.Uri\nimport android.os.Bundle\nimport androidx.activity.ComponentActivity\nimport androidx.activity.result.contract.ActivityResultContracts\n\nclass CheckoutActivity : ComponentActivity() {\n\n    private val upiLauncher = registerForActivityResult(\n        ActivityResultContracts.StartActivityForResult()\n    ) { result -&gt;\n        \/\/ This is only a client-side return. It is not payment confirmation.\n        if (result.resultCode == Activity.RESULT_OK) {\n            showPaymentState(\"Checking payment\u2026\")\n        } else {\n            showPaymentState(\"Payment not confirmed yet\")\n        }\n\n        \/\/ Ask your backend for the order state; do not mark it paid here.\n        refreshOrderFromServer()\n    }\n\n    fun launchUpiPayment(upiUriFromYourServer: String) {\n        val paymentIntent = Intent(\n            Intent.ACTION_VIEW,\n            Uri.parse(upiUriFromYourServer)\n        )\n\n        if (paymentIntent.resolveActivity(packageManager) == null) {\n            showPaymentState(\"No compatible UPI app found\")\n            return\n        }\n\n        upiLauncher.launch(\n            Intent.createChooser(paymentIntent, \"Pay with UPI\")\n        )\n    }\n\n    private fun showPaymentState(message: String) {\n        \/\/ Update your view model or Compose state here.\n    }\n\n    private fun refreshOrderFromServer() {\n        \/\/ GET your own \/mobile\/payments\/{client_txn_id}\/status endpoint.\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Call <code>launchUpiPayment()<\/code> only with the URI returned by your backend. If your server response contains QR data rather than a URI, show the QR as a separate option or have your backend provide the app-ready payment data according to your configured flow. Do not silently construct a new payee or amount in the app.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The customer can return to your app before the verification event reaches your backend. Keep the screen in a pending state and let your status endpoint read your database, rather than accepting a value supplied in the activity result.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Confirm with the webhook and order status<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: the webhook is the server-side signal that connects the verified payment to the order; the status endpoint is useful for a controlled re-check.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configure your PaymentSetu webhook URL on the server. On each notification, process the raw request in this order:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Read the raw request body without reserialising it.<\/li>\n\n\n<li>Read the signature header configured for your webhook.<\/li>\n\n\n<li>Calculate the HMAC using the webhook secret and the exact raw body.<\/li>\n\n\n<li>Compare signatures in constant time and reject an invalid signature.<\/li>\n\n\n<li>Parse the event and load the local order by <code>client_txn_id<\/code>.<\/li>\n\n\n<li>Compare the verified amount with the stored amount.<\/li>\n\n\n<li>Check that the UTR has not already been applied to another order.<\/li>\n\n\n<li>In one database transaction, record the UTR and change the order from <code>pending<\/code> to <code>paid<\/code>.<\/li>\n\n\n<li>Make a repeated event a harmless no-op and return a successful response after the existing paid record is confirmed.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The HMAC check is intentionally shown as an algorithm rather than a made-up header name or JSON shape:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>expected = HMAC-SHA256(webhook_secret, raw_request_body)\naccept only when constant_time_compare(expected, configured_signature)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Your Android status endpoint can now return <code>pending<\/code> or <code>paid<\/code> from your own database. If a webhook has not yet been observed, your backend can call <code>GET \/api\/order_status\/{client_txn_id}<\/code> using the API key and update the local record after applying the same amount, UTR and idempotency checks. The app should never call that vendor endpoint with the API key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a website or existing checkout, the same pattern can be added without building a native screen. Our guide to <a href=\"https:\/\/paymentsetu.com\/blog\/accept-upi-payments-on-website-without-gateway\/\">accepting UPI payments on a website without a gateway<\/a> explains the direct-to-merchant verification model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like this: the UPI app\u2019s return only starts a refresh, while the backend changes the order to paid after a valid signed event and a matching amount.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Keep the Android UI honest<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: clear states stop customers and support staff from confusing \u201capp closed\u201d with \u201cpayment verified\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use a small state machine rather than a single Boolean:<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>App state<\/th><th>What it means<\/th><th>Allowed action<\/th><\/tr><\/thead><tbody><tr><td><code>creating<\/code><\/td><td>Your backend is creating the order<\/td><td>Disable duplicate taps<\/td><\/tr><tr><td><code>ready<\/code><\/td><td>The server returned a payment request<\/td><td>Launch the UPI intent<\/td><\/tr><tr><td><code>checking<\/code><\/td><td>The customer returned or the app is refreshing<\/td><td>Query your backend<\/td><\/tr><tr><td><code>paid<\/code><\/td><td>Your backend received and applied a verified event<\/td><td>Fulfil once<\/td><\/tr><tr><td><code>pending<\/code><\/td><td>No verified event is recorded yet<\/td><td>Keep the order open and allow a safe refresh<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the <code>client_txn_id<\/code> in the screen\u2019s state or saved-state model so a process recreation does not cause a second order accidentally. When the app resumes, fetch the order from your backend. Do not create a replacement order merely because the first activity result was empty.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like this: every screen state comes from the order reference and your backend, so reopening the app cannot accidentally fulfil or duplicate the order.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Show the merchant name and amount before the customer confirms payment. Never place API keys, webhook secrets or bank-login credentials in strings resources, build constants, logs or analytics events.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Test on a real Android device<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Why this matters: intent handling depends on the installed UPI apps and the customer\u2019s device, so an emulator-only check is incomplete.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use a controlled test order and verify each boundary:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Create an order from the app and confirm the backend stored the expected amount and unique reference.<\/li>\n\n\n<li>Check that the returned URI shows the intended payee and amount in the selected UPI app.<\/li>\n\n\n<li>Complete a controlled low-value payment and confirm the money reaches your own connected merchant account.<\/li>\n\n\n<li>Confirm that the webhook signature is checked against the raw body.<\/li>\n\n\n<li>Confirm that the matching UTR changes only the intended order to <code>paid<\/code>.<\/li>\n\n\n<li>Relaunch the app and verify that it reads the existing order rather than creating a duplicate.<\/li>\n\n\n<li>Deliver the same webhook event again and confirm that fulfilment happens once.<\/li>\n\n\n<li>Call your status endpoint for a pending reference and confirm that the API key remains server-side.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Test the return path as well: close the UPI app without authorising, return to your app, and make sure the order remains pending. The customer-facing screen can offer \u201cCheck payment status\u201d while your backend continues to rely on the signed verification flow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like this: a real-device payment can be traced from the app\u2019s order reference to the verified UTR, and replaying the webhook does not repeat fulfilment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The UPI app does not open<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Log the scheme and check that your URI begins with <code>upi:\/\/pay<\/code>. Keep <code>resolveActivity()<\/code> in place and provide a QR or another payment surface when no compatible handler is installed. Also check that you are testing on a device with a UPI app configured for payments.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The app returns but the order is still pending<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">That return is not the payment confirmation. Show a checking state, ask your own backend for the order status, and let the webhook or verified <code>order_status<\/code> result update the order. Do not change the status from the Kotlin callback.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The amount or merchant name looks wrong<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the server\u2019s stored order and the URI it returned. Check that the amount was formatted as a plain decimal such as <code>1299.00<\/code>, that each parameter value was encoded once, and that the app did not rebuild the URI from stale cart data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The webhook is rejected<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Compare the HMAC input byte-for-byte with the raw request body and use the secret configured for this endpoint. Do not parse and reserialise JSON before calculating the signature. After the signature passes, verify <code>client_txn_id<\/code>, amount, status and UTR before applying the event.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">How do I integrate UPI payments in an Android Kotlin app?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create the order on your backend, return an order-specific UPI payment request, and launch it with an Android <code>ACTION_VIEW<\/code> intent. After the customer pays, confirm the order through a signed server webhook or a server-side status check; do not trust the activity result alone.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I mark an order paid from <code>Activity.RESULT_OK<\/code>?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The result only describes what happened during the activity hand-off. Mark the order paid after your backend verifies the matching amount and UTR for the intended merchant account and processes the event idempotently.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should the Android app call PaymentSetu directly?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Keep the PaymentSetu API key and webhook secret on your server. The app should call your own backend, which creates the order, returns safe payment data, and exposes a status endpoint that contains only the information the app needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is PaymentSetu a payment gateway for Android apps?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. PaymentSetu is a payment verification service. The customer pays directly into your own Paytm Business or PhonePe Business merchant account, and PaymentSetu matches the payment to the order and sends your webhook.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Which PaymentSetu plan suits a growing Android app?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PaymentSetu Pro costs \u20b9999 per 30 days and includes 1,000 credits, with one credit representing one successful payment verified. It includes dynamic QR, webhooks, REST API access and priority support; <a href=\"https:\/\/paymentsetu.com\/#pricing\">compare the current plans<\/a> before choosing your volume.<\/p>\n\n\n\n<aside class=\"ap-cta\" aria-label=\"Fulfil only verified orders\"><div class=\"ap-cta__content\"><p class=\"ap-cta__eyebrow\">Verify Android payments<\/p><p class=\"ap-cta__title\">Fulfil only verified orders<\/p><p class=\"ap-cta__text\">Connect your merchant account and add signed UPI verification to your Android checkout.<\/p><\/div><a class=\"ap-cta__btn\" href=\"https:\/\/paymentsetu.com\/auth\/register\">Create your account<\/a><\/aside>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"How do I integrate UPI payments in an Android Kotlin app?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Create the order on your backend, return an order-specific UPI payment request, and launch it with an Android ACTION_VIEW intent. After the customer pays, confirm the order through a signed server webhook or a server-side status check; do not trust the activity result alone.\"}}, {\"@type\": \"Question\", \"name\": \"Can I mark an order paid from `Activity.RESULT_OK`?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. The result only describes what happened during the activity hand-off. Mark the order paid after your backend verifies the matching amount and UTR for the intended merchant account and processes the event idempotently.\"}}, {\"@type\": \"Question\", \"name\": \"Should the Android app call PaymentSetu directly?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Keep the PaymentSetu API key and webhook secret on your server. The app should call your own backend, which creates the order, returns safe payment data, and exposes a status endpoint that contains only the information the app needs.\"}}, {\"@type\": \"Question\", \"name\": \"Is PaymentSetu a payment gateway for Android apps?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. PaymentSetu is a payment verification service. The customer pays directly into your own Paytm Business or PhonePe Business merchant account, and PaymentSetu matches the payment to the order and sends your webhook.\"}}, {\"@type\": \"Question\", \"name\": \"Which PaymentSetu plan suits a growing Android app?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"PaymentSetu Pro costs \u20b9999 per 30 days and includes 1,000 credits, with one credit representing one successful payment verified. It includes dynamic QR, webhooks, REST API access and priority support; compare the current plans before choosing your volume.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Learn upi payment integration in android with Kotlin, UPI intent, server-created orders, signed webhooks and safe auto-verification step by step.","protected":false},"author":1,"featured_media":705,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[29],"tags":[229,230,231,30,28],"class_list":["post-706","post","type-post","status-publish","format-standard","has-post-thumbnail","category-upi-payment-verification","tag-android","tag-kotlin","tag-payment-integration","tag-upi","tag-webhooks","cs-entry"],"_links":{"self":[{"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/posts\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":1,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":930,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/posts\/706\/revisions\/930"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/media\/705"}],"wp:attachment":[{"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/categories?post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paymentsetu.com\/blog\/wp-json\/wp\/v2\/tags?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}