Advanced Integration
Customize your integration (Optional Step)

Offer

You can pass the offer keys to checkoutPro as below:
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
let offerDetailObj1 = PayUOfferDetails(title: <#T##String#>,
3
offerDescription: <#T##String#>,
4
offerKey: <#T##String#>,
5
paymentTypes: <#T##[PaymentType]#>)
6
7
let offerDetailObj2 = PayUOfferDetails(title: <#T##String#>,
8
offerDescription: <#T##String#>,
9
offerKey: <#T##String#>,
10
paymentTypes: <#T##[PaymentType]#>)
11
12
let offerDetailObj3 = PayUOfferDetails(title: <#T##String#>,
13
offerDescription: <#T##String#>,
14
offerKey: <#T##String#>,
15
paymentTypes: <#T##[PaymentType]#>)
16
17
18
config.offerDetails = [offerDetailObj1, offerDetailObj2, offerDetailObj3]
19
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
PayUOfferDetails *offerDetailObj1 = [[PayUOfferDetails alloc] initWithTitle:<#(NSString * _Nonnull)#>
3
offerDescription:<#(NSString * _Nonnull)#>
4
offerKey:<#(NSString * _Nonnull)#>
5
paymentTypes:[[NSArray alloc] initWithObjects:[NSNumber numberWithInt:<#(PaymentType)#>], nil]];
6
7
PayUOfferDetails *offerDetailObj2 = [[PayUOfferDetails alloc] initWithTitle:<#(NSString * _Nonnull)#>
8
offerDescription:<#(NSString * _Nonnull)#>
9
offerKey:<#(NSString * _Nonnull)#>
10
paymentTypes:[[NSArray alloc] initWithObjects:[NSNumber numberWithInt:<#(PaymentType)#>], nil]];
11
12
PayUOfferDetails *offerDetailObj3 = [[PayUOfferDetails alloc] initWithTitle:<#(NSString * _Nonnull)#>
13
offerDescription:<#(NSString * _Nonnull)#>
14
offerKey:<#(NSString * _Nonnull)#>
15
paymentTypes:[[NSArray alloc] initWithObjects:[NSNumber numberWithInt:<#(PaymentType)#>], nil]];
16
17
config.offerDetails = @[offerDetailObj1, offerDetailObj2, offerDetailObj3];
Copied!

Change theme

You can change the primary and the secondary color of the UI to match your apps theme
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.customiseUI(primaryColor: <#UIColor#>, secondaryColor: <#UIColor#>)
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
[config customiseUIWithPrimaryColor:[UIColor blueColor] secondaryColor:[UIColor whiteColor]];
Copied!

Set Merchant Name & Logo

You can customise the name and logo to personalise the checkout screen
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.merchantName = <#T##String?#>
3
config.merchantLogo = <#T##UIImage?#>
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.merchantName = <#(NSString * _Nullable)#>;
3
config.merchantLogo = <#(NSString * _Nullable)#>;
Copied!

Hide Checkout screen back button dialog

Merchant can choose to hide dialog that appears when back button is pressed from L1 screen. Default value is true.
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.showExitConfirmationOnCheckoutScreen = <#Bool#>
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.showExitConfirmationOnCheckoutScreen = <#(BOOL)#>;
Copied!

Hide back button dialog after payment initialisation

Merchant can choose to hide dialog that appears when back button is pressed after payment is initialised. Default value is true.
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.showExitConfirmationOnPaymentScreen = <#Bool#>
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.showExitConfirmationOnPaymentScreen = <#(BOOL)#>;
Copied!

Auto select OTP

Merchant can choose to auto select OTP flow on bank page with below flag. Default value is false.
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.autoSelectOtp = <#Bool#>
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.autoSelectOtp = <#(BOOL)#>;
Copied!

Set merchant response timeout

This is time PayU will wait for merchant surl/furl to load before passing the transaction response back to the app. If merchant surl/furl pages take a longer to load then by default PayU has response timeout of 5 sec. However, if merchant feel that their surl/furl can take longer than 5 seconds then they can set this flag.
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.merchantResponseTimeout = <#TimeInterval?#>
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.merchantResponseTimeout = <#(NSTimeInterval * _Nullable)#>;
Copied!

Enable surepay on bank page

Merchant can enable surepay on bank page. When internet is lost during the transaction, if transaction can be retry from that bank page after internet is resumed, surepay dialog is displayed. It has legitimate values as 0,1,2 and 3. Where number defines number of times surepay dialog should be displayed during the transaction for no internet connectivity. Default value is 0.
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.surePayCount = <#UInt?#>
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.surePayCount = <#(NSUInteger * _Nullable)#>;
Copied!

Review Order

Merchant can pass the checkout order details to the SDK that will be displayed in the SDK during the transaction flow.
Swift
Objective-C
1
let config = PayUCheckoutProConfig()
2
config.cartDetails = [["Milk": "1L"],["Butter": "1Kg"]]
Copied!
1
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
2
config.cartDetails = @[@{@"Milk": @"1L"},@{@"Butter": @"1Kg"}];
Copied!

Additional payment options in the Checkout screen

Consider below example to display Google Pay, PhonePe and Paytm on primary checkout screen
Swift
Objective-C
1
var preferredPaymentModes: [PaymentMode] = []
2
preferredPaymentModes.append(PaymentMode(paymentType: .upi, paymentOptionID: BankCodes.gPayUPI))
3
preferredPaymentModes.append(PaymentMode(paymentType: .wallet, paymentOptionID: BankCodes.phonePeWallet))
4
preferredPaymentModes.append(PaymentMode(paymentType: .wallet, paymentOptionID: BankCodes.paytmWallet))
5
6
let config = PayUCheckoutProConfig()
7
config.paymentModesOrder = preferredPaymentModes
Copied!
1
NSMutableArray<PaymentMode *> *preferredPaymentModes = [NSMutableArray new];
2
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType:PaymentTypeUpi paymentOptionID:BankCodes.gPayUPI]];
3
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType:PaymentTypeWallet paymentOptionID:BankCodes.phonePeWallet]];
4
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType:PaymentTypeWallet paymentOptionID:BankCodes.paytmWallet]];
5
6
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
7
config.paymentModesOrder = preferredPaymentModes;
Copied!
This will display Google Pay, PhonePe and Paytm respectively on top of available payment options. To reorder the all the payment options check the next section.

Set checkout payment modes order

Default payment modes order on checkout screen is as below: Card, NetBanking, UPI and Wallets
Merchant can specify the checkout payment options order. For this, merchant need to provide list of payment modes. Checkout order will be the order of items in the list. If not all payment modes order is mentioned in list the other payment modes will be displayed in their default order as shown above.
Consider below example to order Cards and UPI on L1 screen
Swift
Objective-C
1
var preferredPaymentModes: [PaymentMode] = []
2
preferredPaymentModes.append(PaymentMode(paymentType: .ccdc))
3
preferredPaymentModes.append(PaymentMode(paymentType: .netBanking))
4
preferredPaymentModes.append(PaymentMode(paymentType: .upi))
5
preferredPaymentModes.append(PaymentMode(paymentType: .wallet))
6
preferredPaymentModes.append(PaymentMode(paymentType: .emi))
7
8
let config = PayUCheckoutProConfig()
9
config.paymentModesOrder = preferredPaymentModes
Copied!
1
NSMutableArray<PaymentMode *> *preferredPaymentModes = [NSMutableArray new];
2
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType: PaymentTypeCcdc paymentOptionID: nil]];
3
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType: PaymentTypeNetBanking paymentOptionID: nil]];
4
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType: PaymentTypeUpi paymentOptionID: nil]];
5
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType: PaymentTypeWallet paymentOptionID: nil]];
6
[preferredPaymentModes addObject: [[PaymentMode alloc] initWithPaymentType: PaymentTypeEmi paymentOptionID: nil]];
7
8
PayUCheckoutProConfig *config = [PayUCheckoutProConfig new];
9
config.paymentModesOrder = preferredPaymentModes;
Copied!
The resulting order on the initial Checkout screen will be:
Cards (credit/debit)
Net Banking
UPI
Wallets
EMI

Set Native OTP Assist

It offers to capture OTP in the merchant app without any redirection to the bank’s 3Dsecure/ACS page. This means that there's one less point of failure in the checkout process and a faster completion rate for transactions.
To integrate this, please get enabled txn_s2s_flow on your merchant key from your Key Account Manager at PayU.
To see the Native OTP Assist experience, Please click on the link
Merchant can choose to auto Native OTP flow on with the below flag. The default value is false.
Swift
Objective-C
1
paymentParam.enableNativeOTP = <#Bool#>
Copied!
1
paymentParam.enableNativeOTP = <#(BOOL)#>;
Copied!
Last modified 9d ago