For the complete documentation index, see llms.txt. This page is also available as Markdown.

Link to web payment on Android - US 🇺🇸

To successfully launch Coda Links on Android for users in the United States, developers must comply with Google's External Content Link (ECL) program. Standard hyperlinks are no longer permitted; developers must use Google's designated ECL APIs by the enforcement deadline of January 28, 2026.

Requirement summary

  • Mandatory API Integration: Developers cannot simply put a "naked" hyperlink in the app. They must integrate with Google's External Content Links APIs, through which Google enforces transaction tracking and controls the linkout UX.

  • Controlled User Experience: When a user clicks an external link, this API triggers a system-level information screen (a "warning" or "interstitial") that informs the user they are leaving Google Play and completing a transaction outside the Play billing system. The user must click to confirm in order to proceed.

  • Transaction Reporting: Google indicated that external transactions and downloads may be subject to reporting requirements once service fees are activated. Thus, implementation work related to Transaction Reporting is currently not required in the US.

Refer to this official page for the latest information on Google's requirements & fees: Play Console Help > Enrolling in the external content links program for users in the US

Below is the step-by-step integration guide for linking users to your Coda-hosted Payment Page, based on Google's ECL requirements:

Prerequisites

Ensure that you have followed the steps in Set up payments, and obtained a Codapay API Key.

This is the standard integration that allows you to call Codapay's Payment Init API, which returns a unique web checkout URL.

Step 1: Program Enrollment on Play Console

Before integrating the APIs, you must establish the necessary contractual ties and permissions with Google:

  1. Complete Google’s External Content Links Declaration Form and any required onboarding steps with Google's support team.

  2. In the Google Play Console, navigate to Settings > External content links to officially enroll the app(s) that will use Coda Links.

Next, let's explore the technical details for implementation

Flow Overview

  1. Update Play Billing Dependencies: Add or update the Play Billing Library to version 8.2.1 or higher in your Android app. If migrating from an older version, follow Google's official migration guide first.

  2. Check Availability: Programmatically call isBillingProgramAvailableAsync() to verify the External Content Links program is available on the device.

  3. Generate a Transaction Token: When the user clicks a link/button that should take them to out-of-app, before redirecting the user, call createBillingProgramReportingDetailsAsync(). This generates a unique externalTransactionToken.

    Note: You must generate a new externalTransactionToken every single time a user attempts to visit the external web store (i.e every click)

  4. Request the checkout URL via API: Your app should trigger an API request to Coda's server to obtain the URL for the payment page.

    1. You need to include the externalTransactionToken generated in Step 3 in the API request parameters.

    2. The details are as follows:

Environment
Endpoint URL

Sandbox

https://sandbox.codapayments.com/airtime/api/restful/v2.0/Payment

Production

https://airtime.codapayments.com/airtime/api/restful/v2.0/Payment

For the full list of supported request & response parameters, refer to Initiate a payment request

  1. Launch the Link: Pass the redirectUrl into the launchExternalLink method, with the externalTransactionToken and set the LaunchMode (which typically opens the URL in an external browser)

User Experience: Google will automatically intercept this call and display a mandatory system-level warning sheet (interstitial) informing the user they are leaving Google Play, which the user must confirm to proceed to checkout

Step 3: Receive a payment success notification from Coda

  1. Coda will send a notification to your Complete Notification URL (configured on Coda Portal during Set up payments). This notification is sent to you when the user has successfully completed their payment on Coda-hosted Payment Page.

  1. You need to respond to the notification from Coda with an acknowledgement, to confirm that it has been successfully received.

    1. If your application processes the notification successfully, respond with ResultCode=0

    2. Otherwise, return an error code.

If no response is received, the notification will be re-sent 3 times at 5-minute intervals. If all attempts fail, an email alert will be triggered. To subscribe to this email alert notifications, go to the Coda Portal > Team > Manage Access > Tick "Transaction Notification" > Save Changes

We highly recommend that you call the InquiryPaymentResult API after receiving the notification, to confirm the status of the payment once more. This will help reconcile the transaction status between your system and Coda's before releasing the purchased item to the user. The details are as follows:

Environment
Endpoint URL | Method: POST

Sandbox

https://sandbox.codapayments.com/airtime/api/restful/v2.0/Payment/inquiryPaymentResult.json

Production

https://airtime.codapayments.com/airtime/api/restful/v2.0/Payment//inquiryPaymentResult.json

For the full list of supported request & response parameters, refer to Check a transaction status

Step 5: Post-Purchase UX & Deep Linking

  1. Item Fulfillment: When the payment succeeds, Coda Webstore completes the payment and automatically sends a server-to-server item fulfillment request to your backend. This should already be covered in Steps to Launch your Web Store. No change is required here.

  1. User can click to go back to App via deep link: To ensure this redirection happens smoothly, you must provide Coda with a deep link that can redirect users back to your Android app upon a successful purchase.

    • Once the user is deep-linked back to your app, they should seamlessly receive their items. In addition, your app can display a purchase success screen with confetti animations!

    • Refer to Redirecting users from Coda Links back to your appto learn how to setup back-to-app redirection correctly for your Android App.

  2. User can explore Webstore's offers & LiveOps campaigns!

seedling

Step 6: Report external transactions to Google (not yet required)

exclamation

This is part of the Transaction Reporting requirement. They are not required at the time of writing this article.

These steps are only required when Google activates fees for the External Content Links Program for users in the US

Because developers remain the contracting party for external transactions, Google currently requires an infrastructure for transaction reporting, which will be activated only if/when Google implements service fees.

  1. Receive the Callback: When a user successfully completes a purchase on the Coda checkout page, Coda will send a server-to-server top-up request to your backend. This payload will contain the externalTransactionToken that you originally passed in the URL, along with the payment confirmation data.

  2. Report external transactions to Google (not yet mandatory): Upon receiving the top-up confirmation, your backend must call the Google Play Developer API (externalTransactions endpoint). You have 24 hours to report the transaction by passing both the final sale amount and the externalTransactionToken back to Google.

Last updated

Was this helpful?