---
description: Using your UI
---

# Seamless

{% hint style="info" %}
To download iOS SDK through cocoa-pod, please go [here](pod-integration) first.
{% endhint %}

{% hint style="info" %}
To run our Sample app do the following:

* Download latest SDK version and unzip it.
* Now unzip Release-Universal, now drag and drop the content of unzipped file into Sample App
{% endhint %}

## Initial Setup

* To integrate with iOS SDK, download the latest SDK from [here](https://github.com/payu-intrepos/iOS-SDK/releases).
* Drag and drop PayUBizCoreSDK.framework into your project

Import our SDK as below:

{% tabs %}
{% tab title="Objective-C/Swift" %}
```objectivec
#import <PayUBizCoreKit/PayUBizCoreKit.h>
```
{% endtab %}
{% endtabs %}

{% hint style="info" %}
While working with swift project add the above code in Bridging-Header.h file.
{% endhint %}

* Get all the required parameters

Create an object of `PayUModelPaymentParams` and set all the parameter in it

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
  @property (strong, nonatomic) PayUModelPaymentParams *paymentParamForPassing;
  self.paymentParamForPassing = [PayUModelPaymentParams new];
  self.paymentParamForPassing.key = @"0MQaQP";
  self.paymentParamForPassing.transactionID = @"Ywism0Q9XC88qvy";
  self.paymentParamForPassing.amount = @"10.0";
  self.paymentParamForPassing.productInfo = @"Nokia";
  self.paymentParamForPassing.firstName = @"Ram";
  self.paymentParamForPassing.email = @"email@testsdk1.com";
  self.paymentParamForPassing.userCredentials = @"ra:ra";
  self.paymentParamForPassing.phoneNumber = @"1111111111";
  self.paymentParamForPassing.SURL = @"https://payu.herokuapp.com/ios_success";
  self.paymentParamForPassing.FURL = @"https://payu.herokuapp.com/ios_failure";
  self.paymentParamForPassing.udf1 = @"u1";
  self.paymentParamForPassing.udf2 = @"u2";
  self.paymentParamForPassing.udf3 = @"u3";
  self.paymentParamForPassing.udf4 = @"u4";
  self.paymentParamForPassing.udf5 = @"u5";
  self.paymentParamForPassing.environment= ENVIRONMENT_PRODUCTION;
  self.paymentParamForPassing.offerKey = @"offertest@1411";
//You don't need to set udf1-5 in case you are not using them email and firstname can be empty strings "" if you don't want to use them For store user card feature you need to set userCredentials
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
  self.paymentParamForPassing.userCredentials = @"ra:ra"
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.userCredentials = "ra:ra"
```
{% endtab %}
{% endtabs %}

For offers you need to set `offerKey`

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
  self.paymentParamForPassing.offerKey = @"offertest@1411"
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.offerKey = "offertest@1411"
```
{% endtab %}
{% endtabs %}

For any other payment default param (like phone and others)

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
  self.paymentParamForPassing.phoneNumber = @"1111111111";
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.phoneNumber = "1111111111"
```
{% endtab %}
{% endtabs %}

Get the required hashes by using your own server. Set the hashes as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
  self.paymentParamForPassing.hashes.paymentHash = @"ade84bf6dd9da35d0aab50a5bf61d6272ab0fc488b361b65c66745054aacf1900e3c60b5022d2114bae7360174ebcb3cd7185a5d472e5c99701e5e7e1eccec34";
  self.paymentParamForPassing.hashes.paymentRelatedDetailsHash = @"915299224c80eff0eb2407b945a5087556292f58baca25fd05a0bceb6826aa9eb531810001dd4b4677dd928dd60d39eecf843b2189f213f9bb82c5a9483e3aac";
  self.paymentParamForPassing.hashes.VASForMobileSDKHash = @"5c0314c2781876f7e0a53676b0d08e1457dafe904d2d15d948626b57409538d51093eef4f15c792b1b9651be7b5659efdd45926e43a1145d68cea094687011ca";
  self.paymentParamForPassing.hashes.deleteUserCardHash = @"03e10e892005755f91061121036fb1b10f46202b4138d182f153c5de5c7fd44930ed94b32fac230e59bac1e4ca123aca3297e4b9d25024bf13237db9721fec1a";
  self.paymentParamForPassing.hashes.offerHash = @"1e99fdb59bd91c1a85624104c0fcfae34d7fcb850dd17a0b75e7efe49857d15fdefc47dd0d86ca34cbc3a8b580839aea6341a573e4e60dc1ddcf7ecc32bf9cae";
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.hashes.paymentHash = "ade84bf6dd9da35d0aab50a5bf61d6272ab0fc488b361b65c66745054aacf1900e3c60b5022d2114bae7360174ebcb3cd7185a5d472e5c99701e5e7e1eccec34"
paymentParamForPassing.hashes.paymentRelatedDetailsHash = "915299224c80eff0eb2407b945a5087556292f58baca25fd05a0bceb6826aa9eb531810001dd4b4677dd928dd60d39eecf843b2189f213f9bb82c5a9483e3aac"
paymentParamForPassing.hashes.vasForMobileSDKHash = "5c0314c2781876f7e0a53676b0d08e1457dafe904d2d15d948626b57409538d51093eef4f15c792b1b9651be7b5659efdd45926e43a1145d68cea094687011ca"
paymentParamForPassing.hashes.deleteUserCardHash = "03e10e892005755f91061121036fb1b10f46202b4138d182f153c5de5c7fd44930ed94b32fac230e59bac1e4ca123aca3297e4b9d25024bf13237db9721fec1a"
paymentParamForPassing.hashes.offerHash = "1e99fdb59bd91c1a85624104c0fcfae34d7fcb850dd17a0b75e7efe49857d15fdefc47dd0d86ca34cbc3a8b580839aea6341a573e4e60dc1ddcf7ecc32bf9cae"
```
{% endtab %}
{% endtabs %}

## **Generating URLRequest (and post parameters) for Payment**

To get request, create an object of class `PayUCreateRequest` as below. The callbacks give your URLRequest as well as post parameters (NSString format). You can use these post parameters to initialize [Custom Browser Instance](https://github.com/payu-intrepos/Documentations/wiki/9.-iOS-Custom-Browser#initiating-payment).

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
@property (nonatomic, strong) PayUCreateRequest *createRequest;
```
{% endtab %}

{% tab title="Swift" %}
```swift
let createRequest = PayUCreateRequest()
```
{% endtab %}
{% endtabs %}

### **CC/DC**

To Pay using CCDC, we need to set CCDC parameter as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
        self.paymentParamForPassing.cardNumber = @"5123456789012346";//cardNumber
        self.paymentParamForPassing.nameOnCard = @"name";//Name on card
        self.paymentParamForPassing.expYear = @"2018";//Expiry year
        self.paymentParamForPassing.expMonth = @"11";//ExpiryMonth
        self.paymentParamForPassing.CVV = @"123";//CVV
        self.paymentParamForPassing.storeCardName = @"My TestCard";//If you want to save card then pass StoreCardName otherwise it will not save & make sure userCredentials are provided
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.cardNumber = "5123456789012346" //cardNumber
paymentParamForPassing.nameOnCard = "name" //Name on card
paymentParamForPassing.expYear = "2018" //Expiry year
paymentParamForPassing.expMonth = "11" //ExpiryMonth
paymentParamForPassing.cvv = "123" //CVV
paymentParamForPassing.storeCardName = "My TestCard" //If you want to save card then pass StoreCardName otherwise it will not save & make sure userCredentials are provided
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
        self.createRequest = [PayUCreateRequest new];
        [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_CCDC withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
        if (error == nil) {
        //It is good to go state. You can use request parameter in webview to open Payment Page
        }
        else{
        //Something went wrong with Parameter, error contains the error Message string
        }
    }];
```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest().createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_CCDC, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

### **StoredCard**

To Pay using StoredCard, we need to set StoredCard parameter as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    PayUModelStoredCard *modelStoredCard = [self.paymentRelatedDetail.storedCardArray objectAtIndex:indexPath.row];

    self.paymentParamForPassing.cardToken = modelStoredCard.cardToken;
    self.paymentParamForPassing.cardBin = modelStoredCard.cardBin;
    self.paymentParamForPassing.CVV = @"123";//CVV
```
{% endtab %}

{% tab title="Swift" %}
```swift
let modelStoredCard = paymentRelatedDetail.storedCardArray[indexPath.row] as? PayUModelStoredCard

paymentParamForPassing.cardToken = modelStoredCard?.cardToken
paymentParamForPassing.cardBin = modelStoredCard?.cardBin
paymentParamForPassing.cvv = "123" //CVV
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using `createRequestWithPaymentParam` method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.createRequest = [PayUCreateRequest new];
    [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_STOREDCARD withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
    //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
    //Something went wrong with Parameter, error contains the error Message string
    }
}];
```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_STOREDCARD, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

###

### Tokenisation

For cards tokenised outside PayU platform merchant needs to pass below parameters.



{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParam.cardTokenType = @"1";
    self.paymentParam.additionalInfo = [[AdditionalInfo alloc] initWithLast4Digits:@"1234" tavv:@"1234" trid:@"1234" tokenRefNo:@"1234"];
    
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParam.cardTokenType = "1"
paymentParam.additionalInfo = AdditionalInfo(last4Digits: "1234", tavv: "1234", trid: "1234", tokenRefNo: "1234")

```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using `createRequestWithPaymentParam.`

### **NetBanking**

To Pay using NetBanking, we need to set NetBanking parameter as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.bankCode = @"AXIB";//BankCode
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.bankCode = "AXIB" //BankCode
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.createRequest = [PayUCreateRequest new];
    [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_NET_BANKING withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
    //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
    //Something went wrong with Parameter, error contains the error Message string
    }
}];
```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_NET_BANKING, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

### **CashCard**

To Pay using CashCard, we need to set cashcard parameter as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.bankCode = @"AXIB";//BankCode
```
{% endtab %}

{% tab title="Swift" %}
```
paymentParamForPassing.bankCode = "AXIB" //BankCode
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using `createRequestWithPaymentParam` method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.createRequest = [PayUCreateRequest new];
    [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing
     forPaymentType:PAYMENT_PG_CASHCARD withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
       if (error == nil) {
          //It is good to go state. You can use request parameter in webview to open Payment Page
       }
       else{
         //Something went wrong with Parameter, error contains the error Message string
       }
    }];
```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_CASHCARD, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

### **EMI**

To Pay using EMI, you need to set EMI parameter as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.bankCode = @"EMI03";//BankCode
    self.paymentParamForPassing.expiryYear = @"2019";
    self.paymentParamForPassing.expiryMonth = @"12";
    self.paymentParamForPassing.nameOnCard = @"test";
    self.paymentParamForPassing.cardNumber = @"5123456789012346";
    self.paymentParamForPassing.CVV = @"123";
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.bankCode = "EMI03" //BankCode
paymentParamForPassing.expiryYear = "2019"
paymentParamForPassing.expiryMonth = "12"
paymentParamForPassing.nameOnCard = "test"
paymentParamForPassing.cardNumber = "5123456789012346"
paymentParamForPassing.cvv = "123"
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using `createRequestWithPaymentParam` method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
self.createRequest = [PayUCreateRequest new];
[self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_EMI withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
            //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
     //Something went wrong with Parameter, error contains the error Message string

    }
}];
```


{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_EMI, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

**Cardless EMI**

To Pay using **Cardless** EMI, you need to set parameter as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.bankCode = @"ZESTMON";//BankID
    self.paymentParamForPassing.isCardlessEMI = true;
    self.paymentParamForPassing.phoneNumber = @"9999999999";
    
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.bankCode = "ZESTMON" //BankID
paymentParamForPassing.isCardlessEMI = true
paymentParamForPassing.phoneNumber = "99999999"
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using `createRequestWithPaymentParam`

### **PayUMoney**

To Pay using PayUMoney, we need to set only the mandatory payment param and we can get the request by using `createRequestWithPaymentParam` method as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    PayUCreateRequest *createRequest = [PayUCreateRequest new];
    [createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_PAYU_MONEY withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
            //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
     //Something went wrong with Parameter, error contains the error Message string

    }
}];
```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.init(paymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_PAYU_MONEY, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

### **Subvention EMI**

#### **Pay via Subvention EMI**

To Pay using Subvention EMI, we need to set subventionAmount parameter of paymentParams

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.bankCode = @"EMI03";//BankCode
    self.paymentParamForPassing.expiryYear = @"2019";
    self.paymentParamForPassing.expiryMonth = @"12";
    self.paymentParamForPassing.nameOnCard = @"test";
    self.paymentParamForPassing.cardNumber = @"5123456789012346";
    self.paymentParamForPassing.CVV = @"123";

    self.paymentParamForPassing.subventionAmount = @"3000";
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.bankCode = "EMI03" //BankCode
paymentParamForPassing.expiryYear = "2019"
paymentParamForPassing.expiryMonth = "12"
paymentParamForPassing.nameOnCard = "test"
paymentParamForPassing.cardNumber = "5123456789012346"
paymentParamForPassing.cvv = "123"

paymentParamForPassing.subventionAmount = "3000"
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below:

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.createRequest = [PayUCreateRequest new];
    [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing  forPaymentType:PAYMENT_PG_EMI withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
    //Something went wrong with Parameter, error contains the error Message string
    }
    }];
```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_EMI, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

#### **Hash Calculation**

If subventionAmount is passed than hash formula for payment hash will be

```
    sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||SALT|SubventionAmount)
```

Otherwise it will remain same as earlier.

#### **Fetch List**&#x20;

To get list of No Cost EMI supporting banks, pass `subventionEligibility` as "all" in [Fetch Payment Option WebService](../web-services#1-fetch-payment-option).

### **LazyPay**

To Pay using LazyPay, we need to set the below parameters :

Notify Url – Callback URL of merchant where a notification of transaction status will be sent on completion of transaction. It should be HTTPS.

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.notifyURL= @"https://notifyURL.com";
```
{% endtab %}

{% tab title="Swift" %}
```swift
paymentParamForPassing.notifyURL = "https://notifyURL.com"
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.createRequest = [PayUCreateRequest new];

    [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_LAZYPAY withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
      if (error == nil) {
        //It is good to go. You can use request parameter in webview to open Payment Page
      }
      else{
        //Something went wrong with Parameter, error contains the error Message string
      }
    }];

```
{% endtab %}

{% tab title="Swift" %}
```swift
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_LAZYPAY, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}



### TwidPay

To Pay using TwidPay, create the post data with CASH\_CARD\_TWID :

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.bankCode = CASH_CARD_TWID;//BankCode
```
{% endtab %}

{% tab title="Swift" %}
```
paymentParamForPassing.bankCode = CASH_CARD_TWID //BankCode
```
{% endtab %}
{% endtabs %}

After a successful payment, you would get the Twid customer hash in the **field5** param of PayuResponse, which can be used in next transactions to skip authentication.

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.twidCustomerHash = @"Twid customer hash";
    
```
{% endtab %}

{% tab title="Swift" %}
```swift
self.paymentParamForPassing.twidCustomerHash = "Twid customer hash"
```
{% endtab %}
{% endtabs %}



### Sodexo

To Pay using Sodexo, create the post data with PAYMENT\_PG\_SODEXO :

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.cardNumber = @"<Sodexo card number>";//cardNumber
    self.paymentParamForPassing.nameOnCard = @"name";//Name on card
    self.paymentParamForPassing.expYear = @"2018";//Expiry year
    self.paymentParamForPassing.expMonth = @"11";//ExpiryMonth
    self.paymentParamForPassing.CVV = @"123";//CVV
    self.paymentParamForPassing.shouldSaveCard = YES;//If you want to save card then pass it otherwise it will not save 
```
{% endtab %}

{% tab title="Swift" %}
```
self.paymentParamForPassing.cardNumber = "<Sodexo card number>";//cardNumber
self.paymentParamForPassing.nameOnCard = "name";//Name on card
self.paymentParamForPassing.expYear = "2018";//Expiry year
self.paymentParamForPassing.expMonth = "11";//ExpiryMonth
self.paymentParamForPassing.CVV = "123";//CVV
self.paymentParamForPassing.shouldSaveCard = true;//If you want to save card then pass it otherwise it will not save 
```
{% endtab %}
{% endtabs %}

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
        self.createRequest = [PayUCreateRequest new];
        [self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_SODEXO withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
        if (error == nil) {
        //It is good to go state. You can use request parameter in webview to open Payment Page
        }
        else{
        //Something went wrong with Parameter, error contains the error Message string
        }
    }];
```
{% endtab %}

{% tab title="Swift" %}
```
createRequest().createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_SODEXO, withCompletionBlock: { request, postParam, error in
    if error == nil {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    } else {
        //Something went wrong with Parameter, error contains the error Message string
    }
})
```
{% endtab %}
{% endtabs %}

After a successful payment, you would get the Sodexo source id in the **field3** param of PayuResponse, which can be used to show and get stored Sodexo card details and also can be used for initiate payment.

{% tabs %}
{% tab title="Objective-C" %}
```objectivec
    self.paymentParamForPassing.sodexoSourceId = @"<Sodexo source id>";
    
```
{% endtab %}

{% tab title="Swift" %}
```
    self.paymentParamForPassing.sodexoSourceId = "<Sodexo source id>"
```
{% endtab %}
{% endtabs %}
