Unknown macro: {style}


Unknown macro: {display}

Page tree
Skip to end of metadata
Go to start of metadata


App2App payment support for Pay With Zeta (PWZ) eases the process of getting customer’s authorization on e-commerce mobile apps by overlaying a Swipe to Pay option, thereby avoiding the 2-step authentication process which consumes time in events of high frequency of payments.

Merchant partners can now seamlessly get customer’s consent for an intended payment directly within the mobile app ecosystem where the complexity of payment handling and user authentication are safely handled by the App2App payment support, allowing the merchants to only focus on accepting online payment from Zeta users.

Integration Method

PayWithZeta can be integrated using the checkout flowThe details of the flow are described below.

Checkout Flow

The details of the typical checkout flow of the App2App payment support is described below:

  1. User adds items to the cart on the merchant e-commerce app and goes to the checkout page.
  2. User clicks on PayWithZeta option, shown on merchant page, to complete the payment.

  3. The merchant app shares the payment details (as per the Request app2app authorization API contract mentioned below) with the Zeta app installed on the same device.
  4. The Zeta app gets the customer’s authorization by overlaying a Swipe to Pay option.

  5. When using Swipe to Pay,

    1. If the customer swipes to authorize the payment, Zeta app will respond back to the merchant to the callback URL shared by the merchant app in step 3.
    2. If the customer denies the authorization, Zeta app will return the Error payload mentioned below.
  6. Once the merchant app gets the user’s consent (when user authorizes payment in step 5(a)), merchant will get the payment charged by making a server to server API call (ref contract Charge a transaction with Auth API).

Mobile OS Integration

The App2App feature is available for Android and iOS platforms. The details of each method is described below.

Before You Begin

Take care of following before you integrate Android and iOS apps:

  • For Android integration, ensure that the Zeta app version is or greater, as this feature does not work on older versions (App version can be found in About Us screen).
  • For iOS integration, ensure that the Zeta app version is greater than 2.11.0, as this feature doesn't work on lesser versions.

Android Integration

Request and response for the Android version of app takes place through Intents (a messaging object used to request an action). Upon a request, intents start an activity for Swipe to Pay authorization and will emit a success/failure state of the authorization as activity result.

Please follow below steps for integration:

  1. When payment authorization is needed, create the following intent:

    Intent intent = new Intent(Intent.ACTION_VIEW, "zetapay://payAuth");
  2. Prepare the request payload. Convert it to JSON and pass it in the intent.
  3. Add the request payload to the intent, with the key as “data”.

    intent.putExtra("data", payload);
  4. Check if the intent can be handled. 

    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("zetapay://payAuth"));
    PackageManager packageManager = getPackageManager();
    if (intent.resolveActivity(packageManager) != null) {
       //Success - app is present and this version of Zeta app can handle the intent
       //Package name for staging - "in.zeta.android.debug"
       //Package name for production - "in.zeta.android"
       intent.putExtra("data", gson.toJson(paymentRequest));
       startActivityForResult(intent, REQUEST_CODE);
    } else {
       //Failure - Zeta app not found/Zeta app is not up to date

    The intent cannot be found in the older versions of the app. 

  5. Start the activity to see if the intent can be handled, as specified above.

    startActivityForResult(intent, REQUEST_CODE);

  6. On a valid request, swipe to pay screen is launched. On invalid request, the error callback intent is sent as result.

  7. If authorization is successful, activity result is Activity.RESULT_OK, along with the success response payload(JSON) as an intent extra with key “data”.

iOS Integration

Please follow below steps for integration:

  1. Zeta app should be invoked for user’s authorization by invoking a Zeta app URL of the following format:

    zetapay://payAuth?req=<json string>

    The above Zeta app URL is invoked by the openUrl method. 

    Before calling the openUrl method, you must ensure if the above URL can be handled by the user’s device with the help of canOpenUrl method

    If the canOpenUrl method returns NO, you must not attempt to invoke the URL and must instead use some other fallback mechanism to complete the payment flow.

  2. Generate <json string> which is an encoded string version of the request payload using the below code:

    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:NULL];
    NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
    jsonString = [string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet alphanumericCharacterSet]];
  3. You must define a custom URL scheme for the callBackUrl, which must be present in the request payload.


    For a merchant app named Starbucks, the custom URL scheme is starbucks:// and the callBackUrl sent in the request payload is starbucks://zetaAuth.

  4. You must handle callBackUrl invocation by the Zeta app through the App Delegate. Success or failure authorization will be depicted using query parameter in the callBackUrl as shown below:

    <callBackUrl>?resp=<json string><callBackUrl>?error=<json string>
  5. Convert <json string>, which is a string encoded version of the response payload, to a proper NSDictionary object using the below code:


Download and install Zeta Staging app through TestFlight to test out these features. We will send out invitations to apple ids of iOS developers, for accessing the TestFlight build.


 What are Intents?

Intents are messaging objects used to request an action, through which requests and responses take place for the Android app. Upon a request, intents will start an activity for swipe to pay authorization and will emit a success/failure state of the authorization as activity result.

 What happens when refunds are not honoured?

If immediate refunds are not honoured, a CRON (running every one hour) will reverse the transaction. If in rare cases, the refund cannot be honoured, then the refund will get dropped after n configurable number of attempts (currently 30) and the customer will be refunded in 3 days.

 Does App2App work in all versions of Zeta app?

For Android: Zeta app version must be or greater.

For iOS: Zeta app app version must be greater than 2.11.0

 Does the transaction terminate if a user declines the swipe to pay authentication?

The transaction will not be terminated. User will be redirected to web app for completing the transaction. 

 What is the timeout period when the user is redirected to Zeta app to verify app PIN for order payment?

Timeout period is 30 seconds.

 What happens when the user has not entered the Zeta app PIN, but App2App payment is attempted ?

The user is directly prompted to swipe2pay and then prompt for PIN if needed, without the need to go to Zeta app at all. 

 Why does the transaction request expire after receiving authorisation payload from user app ?

You should send the request to the server within 5 minutes of receiving the authorisation payload from user app.

Contact Support

On this page: