SDK Integration
  • Getting Started
  • Onboarding Requirements
  • Hash Generation
  • Test Merchant list
  • Android
    • Android SDK Offering
    • PayUCheckoutPro
      • Integration
      • Build the Payment Params
        • Additional Params
      • Hash Generation
      • Set up the payment hashes
      • Initiate the Payment
      • Customized Integration
        • Set Webview Properties
        • SDK Configuration
        • Additional Offerings
      • Offers Integration
      • Convenience Fee Integration
      • Custom Note Integration
      • MCP Integration
    • Core
      • Supported Payment Types
      • TPV Integration
      • Merchant Web Services
        • Getting Enabled Payment Options
        • GetCheckoutDetails API
        • Lookup API
    • Custom Browser
      • Integration
        • CustomBrowser Config
        • CustomBrowserCallback
        • Supporting below Lollipop Versions
        • Third-Party Payments Support
      • Sample App
      • Change Logs
    • Native OTP Assist
      • Integration
      • Customization
      • Change Logs
    • UPI
      • Integration
      • TPV Integration in UPI
      • Sample App
      • Change Logs
    • Google Payâ„¢
      • Integration
      • Sample App
    • PhonePe
      • Integration
      • Sample App
      • Change Logs
    • OlaMoney
    • PayU OTP Parser
      • Integration
    • FAQ Android
  • iOS
    • PayUCheckoutPro
      • Integration
      • Advanced Integration
      • Set up the payment hashes
      • Convenience Fee Integration
      • MCP Integration
      • Custom Note Integration
    • Core
      • POD Integration
      • Seamless
      • Web Services
      • Objective C-Non-Seamless
      • Standing Instructions
      • TPV Integration
      • Sample App
    • Custom Browser
      • Sample App
    • OlaMoney
    • Native OTP Assist
      • Integration
      • Customization
    • UPI
      • Integration
      • Sample App
    • PayUParams
      • PayUSIParams
      • PayUBeneficiaryParams
  • Releasing to Apple
  • React-Native
    • PayUCheckoutPro
      • Integration
      • Set up the payment hashes
      • Advanced Integration
      • Change Logs
    • Core
    • Non-Seamless Wrapper
    • TPV (beta)
      • Integration
  • FAQ iOS
Powered by GitBook
On this page
  • Create Offers List
  • Pass Offers List to SDK

Was this helpful?

  1. Android
  2. PayUCheckoutPro

Offers Integration

(Optional Step)

Follow this section if you want to integrate Offers in PayUCheckoutPro SDK

Create Offers List

Create a list of offers that you want to pass to the CheckoutPro SDK. For each offer in list, offer title, offer description, offer key and offer payment types need to be passed. On Checkout Page SDK will show the best offer applicable on that payment mode based on the offers list sent to the SDK. Below is an example code for offers list

 ArrayList<PayUOfferDetails> offerDetails = new ArrayList<>();
 PayUOfferDetails payUOfferDetails1 = new PayUOfferDetails();
 payUOfferDetails1.setOfferTitle("Instant discount of Rs.2");
 payUOfferDetails1.setOfferDescription("Get Instant dicount of Rs.2 on all Credit and Debit card transactions");
 payUOfferDetails1.setOfferKey("OfferKey@9227");

 ArrayList<PaymentType> offerPaymentTypes1 = new ArrayList<>();
 offerPaymentTypes1.add(PaymentType.CARD);
 payUOfferDetails1.setOfferPaymentTypes(offerPaymentTypes1);

 PayUOfferDetails payUOfferDetails2 = new PayUOfferDetails();
 payUOfferDetails2.setOfferTitle("Instant discount of Rs.2");
 payUOfferDetails2.setOfferDescription("Get Instant dicount of Rs.2 on all NetBanking transactions");
 payUOfferDetails2.setOfferKey("TestOffer100@9229");

 ArrayList<PaymentType> offerPaymentTypes2 = new ArrayList<>();
 offerPaymentTypes2.add(PaymentType.NB);
 payUOfferDetails2.setOfferPaymentTypes(offerPaymentTypes2);

 offerDetails.add(payUOfferDetails1);
 offerDetails.add(payUOfferDetails2);
 val offerDetails = ArrayList<PayUOfferDetails>()
 offerDetails.add(PayUOfferDetails().also {
            it.offerTitle = " Instant discount of Rs.2"
            it.offerDescription = "Get Instant dicount of Rs.2 on all Credit and Debit card transactions"
            it.offerKey = "OfferKey@9227"
            it.offerPaymentTypes = ArrayList<PaymentType>().also {
                it.add(PaymentType.CARD)
            }
        })
  offerDetails.add(PayUOfferDetails().also {
            it.offerTitle = " Instant discount of Rs.2"
            it.offerDescription = "Get Instant dicount of Rs.2 on all NetBanking transactions"
            it.offerKey = "TestOffer100@9229"
            it.offerPaymentTypes = ArrayList<PaymentType>().also {
                it.add(PaymentType.NB)
            }
        })

Pass Offers List to SDK

To pass the Offers List created in above section to the SDK. Create a Object of PayUCheckoutProConfig and set Offers List as below

 PayUCheckoutProConfig checkoutProConfig = new PayUCheckoutProConfig();
 checkoutProConfig.setOfferDetails(offerDetails);
 val checkoutProConfig = PayUCheckoutProConfig()
 checkoutProConfig.offerDetails = offerDetails
PreviousAdditional OfferingsNextConvenience Fee Integration

Last updated 4 years ago

Was this helpful?

This checkoutProConfig object should be passed in PayUCheckoutPro.open() method as mentioned

here