iOS Mobile SDKs
PayU offers various iOS SDKs that each serve a unique use case. Before you begin integrating PayU iOS SDKs into your application, complete the following prerequisites to ensure a smooth integration process.
1. Account Setup
Register and Activate Your PayU Account
| Step | Action | Link |
|---|---|---|
| 1 | Register for a PayU Merchant Account | Register |
| 2 | Complete KYC and activate your account | Activate Account |
| 3 | Access your Test Merchant Key and Salt | Get Test Credentials |
Important: Never use production credentials during development. Always use test credentials until you're ready for go-live.
Obtain Your Credentials
You'll need the following credentials from the PayU Dashboard. Refer to Access Merchant Key and Salt.
| Credential | Description |
|---|---|
| Merchant Key | Unique identifier for your account |
| Merchant Salt | Used for hash generation |
| Client ID | For OAuth-based authentication |
| Client Secret | For OAuth-based authentication |
2. Development Environment Requirements
Minimum System Requirements
| Requirement | Minimum Version | Recommended |
|---|---|---|
| Xcode | 16.0+ | 26.0 |
| iOS Deployment Target | iOS 13.0 | iOS 15.0+ |
| Swift | 5.0+ | 5.7+ |
| macOS | Sequoia 15.0 | Tahoe 26.0 |
Package Manager Support
PayU iOS SDKs are available through:
| Package Manager | Supported | Notes |
|---|---|---|
| CocoaPods | ✅ Yes | Recommended for most projects |
| Swift Package Manager | ✅ Yes | Available for select SDKs |
| Manual Integration | ✅ Yes | Framework files available |
CocoaPods Setup
Add the following to your Podfile:
# Podfile example
platform :ios, '12.0'
use_frameworks!
target 'YourApp' do
# Add the SDK you need
pod 'PayUIndia-CheckoutPro' # For Checkout Pro SDK
# pod 'PayUIndia-PG-SDK' # For Core SDK
endThen run:
pod install3. Apple Privacy & Compliance
Privacy Manifest Configuration
Starting with iOS 17, Apple requires apps to declare the data they collect. PayU SDKs collect certain data for payment processing.
Required Privacy Manifest Entries
Add the following to your app's PrivacyInfo.xcprivacy file:
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePaymentInfo</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
</dict>Required App Permissions
Depending on the SDK and payment methods you enable, add these to your Info.plist:
<!-- For UPI Intent (opening UPI apps) -->
<key>LSApplicationQueriesSchemes</key>
<array>
<string>phonepe</string>
<string>tez</string>
<string>paytm</string>
<string>bhim</string>
<string>upi</string>
</array>
<!-- For camera access (card scanning, if enabled) -->
<key>NSCameraUsageDescription</key>
<string>Camera access is required to scan your card details</string>
<!-- For network access -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
</dict>4. Server-Side Hash Generation Setup
PayU uses hash-based verification for security. Hash must be generated on your server, never on the client.
Hash Generation Flow

Hash Formula
v1 Hashing
hash = SHA512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||salt)v2 Hashing
hash = SHA512(hashStringWithoutSalt | salt)Sample Server-Side Code
const crypto = require('crypto');
function generatePayUHash(params, salt) {
const hashString = `${params.key}|${params.txnid}|${params.amount}|${params.productinfo}|${params.firstname}|${params.email}|${params.udf1 || ''}|${params.udf2 || ''}|${params.udf3 || ''}|${params.udf4 || ''}|${params.udf5 || ''}||||||${salt}`;
return crypto.createHash('sha512').update(hashString).digest('hex');
}import hashlib
def generate_payu_hash(params, salt):
hash_string = f"{params['key']}|{params['txnid']}|{params['amount']}|{params['productinfo']}|{params['firstname']}|{params['email']}|{params.get('udf1', '')}|{params.get('udf2', '')}|{params.get('udf3', '')}|{params.get('udf4', '')}|{params.get('udf5', '')}||||||{salt}"
return hashlib.sha512(hash_string.encode()).hexdigest()function generatePayUHash($params, $salt) {
$hashString = $params['key'] . '|' . $params['txnid'] . '|' . $params['amount'] . '|' . $params['productinfo'] . '|' . $params['firstname'] . '|' . $params['email'] . '|' . ($params['udf1'] ?? '') . '|' . ($params['udf2'] ?? '') . '|' . ($params['udf3'] ?? '') . '|' . ($params['udf4'] ?? '') . '|' . ($params['udf5'] ?? '') . '||||||' . $salt;
return hash('sha512', $hashString);
}Security Note: Never embed your Salt in the iOS app. Always generate hashes server-side.
5. Choose Your SDK
Based on your requirements, select the appropriate SDK:
| Your Requirement | Recommended SDK | Integration Effort | Time Estimate |
|---|---|---|---|
| Fastest integration, pre-built UI | Checkout Pro SDK | Low | ~2-3 days |
| Full UI customization | Core SDK | Medium | ~1-2 weeks |
| UPI payments only | UPI SDK | Low | ~1-2 days |
| Improved card success rates | Core SDK + Native OTP Assist | Medium | ~1 week |
| One-click UPI payments | UPI Bolt SDK | Low | ~1-2 days |
| Native 3D Secure experience | 3DS 2.0 SDK | Medium | ~3-5 days |
6. Webhook Setup
Configure webhooks to receive real-time payment notifications.
Required Webhook Events
| Event | Description |
|---|---|
payment.success | Payment completed successfully |
payment.failed | Payment failed |
payment.pending | Payment is pending |
refund.success | Refund processed successfully |
refund.failed | Refund failed |
Webhook Configuration
- Navigate to Dashboard → Settings → Webhooks
- Click Create New Webhook
- Enter your webhook URL (must be HTTPS)
- Select the events you want to receive
- Save and note the webhook secret for verification
Note: For detailed webhook setup, refer to Webhooks for Payments.
Choose your integration
Note: The best SDK for you will depend on your specific needs and requirements.
If you need a quick and easy way to integrate a payment interface into your app, then the Checkout Pro SDK is a good option. If you need more control over the look and feel of the payment interface, then the Core SDK is a good choice. And if you need to accept payments through UPI, OlaMoney, PhonePe, or Native OTP Assist, then the respective SDKs are a good fit.
Here is a comparison table that summarizes the key features of the different SDKs:
| SDK | Features | Use Case |
|---|---|---|
| iOS CheckoutPro SDK | Complete ready-to-use native checkout UI allows you to get started quickly with minimal effort. This SDK is a great choice for small and medium sized businesses that operates on limited tech resource. | | Low Effort Integration, | Non-Seamless Checkout | Limited Tech | Resource | |
| iOS Core SDK | Create your own UI for the payment flow by leveraging various methods exposed in the Core SDK. This SDK is more suitable for larger enterprises that can allocate dedicated engineering resource to develop customised payment flow. | | Seamless Checkout | Medium Effort | Enterprise Businesses | |
| iOS UPI SDK | This SDK best suited for creating a custom payment UI for UPI only checkout. | Low Effort Integration|UPI Checkout |
| iOS Ola Money SDK | Allows you to integrate OlaMoney payments into your iOS app. | Low Effort Integration|OlaMoney Checkout |
| iOS Custom Browser SDK | Collect netbanking payment on the bank's page | Low Effort Integration|PhonePe Checkout |
| iOS Native OTP Assist SDK | Allows you to capture OTP (One Time Password) directly from your iOS app without redirecting the user to the bank's 3D secure page. | Native OTP Support| Low Effort Integration |
| iOS 3DS 2.0 SDK | provide a native experience rather than redirecting customer to a bank page. The UI is standardised according to EMVCO guidelines and offers customisation. | Native OTP Support |
| iOS UPI Bolt SDK | Allows you to simpler and more efficient payment experience to the merchants. It will eliminate any third-party redirection and higher success rate. | One-Click Payment| UPI Checkout |
Next Steps
Once you've completed the prerequisites above, proceed with your chosen SDK integration:
- Integrate Checkout Pro SDK - For quick, ready-to-use checkout
- Integrate Core SDK - For custom payment flows
Updated 7 days ago
