SDK Integration

This guide covers how to integrate Google Pay™ with Yuno using the SDK. With this approach, Yuno's SDK manages the complete Google Pay experience: displaying the Google Pay button, presenting the payment sheet, and handling the payment token. You don't need to integrate directly with the Google Pay API.

📘

Before implementing, review the Google Pay requirements and ensure Google Pay is available in your operating countries.

Overview

  1. Create a checkout session with Yuno.
  2. Initialize Yuno's SDK in your app (Web, Android, or iOS).
  3. The SDK displays the Google Pay button and handles the payment sheet.
  4. The customer authorizes the payment through Google Pay.
  5. Yuno receives the payment token and processes the transaction with your configured provider.
  6. Monitor the payment status via webhooks.

Requirements

  • A Yuno account with API credentials (Dashboard)
  • A payment provider connection configured in the Yuno dashboard that supports Google Pay
  • A routing rule that includes the Google Pay payment method
  • Yuno SDK integrated in your application (Web, Android, or iOS)

Integration steps

Step 1: Create a checkout session

Use the create checkout session endpoint to start a payment session:

{
  "country": "US",
  "customer_id": "customer-uuid",
  "merchant_order_id": "order-123",
  "payment_description": "Google Pay payment",
  "amount": {
    "currency": "USD",
    "value": 5000
  }
}

The response returns a checkout_session ID to initialize the SDK.

Step 2: Initialize the SDK

Initialize Yuno's SDK with the checkout session. The SDK automatically detects available payment methods, including Google Pay, based on your dashboard configuration.

Refer to the SDK documentation for your platform:

Step 3: Customer completes payment

The SDK handles the rest. When the customer selects Google Pay:

  1. The Google Pay payment sheet appears with the customer's saved cards.
  2. The customer selects a card and authorizes the payment.
  3. The SDK sends the encrypted payment token to Yuno.
  4. Yuno processes the payment through your configured provider.

Step 4: Handle the response

The SDK returns the payment result. You can also monitor payment status through webhooks for asynchronous confirmation.

Create a payment with the SDK workflow

If you need to call the payment API directly while using the SDK checkout flow, set the workflow to SDK_CHECKOUT and include the checkout session:

{
  "account_id": "your-account-id",
  "description": "Google Pay via SDK",
  "merchant_order_id": "order-123",
  "country": "US",
  "amount": {
    "currency": "USD",
    "value": 5000
  },
  "checkout": {
    "session": "checkout-session-id"
  },
  "customer_payer": {
    "id": "customer-uuid",
    "email": "[email protected]"
  },
  "payment_method": {
    "type": "GOOGLE_PAY"
  },
  "workflow": "SDK_CHECKOUT"
}
⚠️

When integrating wallets like Google Pay, the payment_method.type field is required even when using the SDK workflow. Set it to GOOGLE_PAY.

Enable and test Google Pay

To test Google Pay in sandbox:

  1. Integrate Yuno's SDK into your app.
  2. Create a Google test account and sign in to the Google Pay Business Console.
  3. In the Google Wallet business console, navigate to the API section and select Create a Pass to enable Demo mode.
  1. Download the Google Wallet App on your test device.
  2. Run through the payment flow to verify the integration works.

Go live

After testing, request Google Production Access and contact your Technical Account Manager. The Yuno team will verify your configuration before going live.

Related documentation