Custom Note Integration
(Optional steps)
Follow this section if you want to integrate Custom Note in PayUCheckoutPro SDK

Create Custom Note List

Create a list of custom Note that you want to pass to the CheckoutPro SDK. For each custom note , custom_note and custom_note_category needs to be passed.
Java
Kotlin
1
// for specific custom_note_category
2
3
ArrayList<CustomNote> customNote = new ArrayList<>();
4
ArrayList<PaymentType> noteCategory1 = new ArrayList<>();
5
noteCategory1.add(PaymentType.CARD);
6
CustomNote customNote1 = new CustomNote("Please welcome note", noteCategory1);
7
customNote1.setCustom_note("Please welcome note");
8
customNote1.setCustom_note_category(noteCategory1);
9
10
ArrayList<PaymentType> noteCategory2 = new ArrayList<>();
11
noteCategory2.add(PaymentType.CARD);
12
CustomNote customNote2 = new CustomNote("Please welcome note", noteCategory1);
13
customNote2.setCustom_note("Please welcome note");
14
customNote2.setCustom_note_category(noteCategory2);
15
customNote.add( customNote1);
16
customNote.add( customNote2);
17
18
// when want to pass same custom note for multiple custom_note_category
19
20
ArrayList<CustomNote> customNote = new ArrayList<>();
21
ArrayList<PaymentType> noteCategory1 = new ArrayList<>();
22
noteCategory1.add(PaymentType.CARD);
23
noteCategory1.add(PaymentType.NB);
24
noteCategory1.add(PaymentType.UPI);
25
CustomNote customNote1 = new CustomNote("Please welcome note", noteCategory1);
26
customNote1.setCustom_note("Please welcome note");
27
customNote1.setCustom_note_category(noteCategory1);
28
customNote.add( customNote1);
29
30
// if do not want to pass any custom_note_category
31
ArrayList<CustomNote> customNote = new ArrayList<>();
32
CustomNote customNote1 = new CustomNote("Please welcome note", null);
33
customNote1.setCustom_note("Please welcome note");
34
customNote1.setCustom_note_category(null);
35
Copied!
1
// for specific custom_note_category
2
val customNote = ArrayList<CustomNote>()
3
4
customNote.add(CustomNote().also{
5
it.custom_note = "Please welcome in Cards"
6
it.custom_note_category = ArrayList<PaymentType>().also {
7
it.add(PaymentType.CARD)
8
}
9
}
10
// when want to pass same custom note for multiple custom_note_category
11
12
val customNote = ArrayList<CustomNote>()
13
customNote.add(CustomNote().also{
14
it.custom_note = "Please welcome in Cards"
15
it.custom_note_category = ArrayList<PaymentType>().also {
16
it.add(PaymentType.NB)
17
it.add(PaymentType.CARD)
18
}
19
}
20
// if do not want to pass any custom_note_category
21
22
val customNote = ArrayList<CustomNote>()
23
customNote.add(CustomNote().also{
24
it.custom_note = "Please welcome in Cards"
25
it.custom_note_category = null
26
}
Copied!

Pass custom Note List to SDK

To pass the custom Note List created in above section to the SDK. Create a Object of PayUCheckoutProConfig and set custom Note List as below
Java
Kotlin
1
PayUCheckoutProConfig checkoutProConfig = new PayUCheckoutProConfig();
2
checkoutProConfig.setCustomNoteDetails(customNote);
Copied!
1
val checkoutProConfig = PayUCheckoutProConfig()
2
checkoutProConfig.customNoteDetails = customNote
Copied!
This checkoutProConfig object should be passed in PayUCheckoutPro.open() method as mentioned here