Display the Hosted Payment Page
After obtaining the transaction ID, present the Hosted Payment Page to your user.
There are several methods to display the Hosted Payment Page:
Redirect within the existing page
Open in a new tab
Embed within an iFrame
Display within a webview
You can redirect the customer to the URL returned in the payment request initiation response. Alternatively, use the Base URL provided below with appropriate parameters to open the Hosted Payment Page.
Pre-requisite
You have received a success response from the payment request initiation.
Method 1 (Preferred): Using redirectUrl returned from payment request initiation to open the Hosted Payment Page
You can use the redirectUrl returned in the Successful response of the payment request initiation to open the Hosted Payment Page.
{
"initResult": {
...
"redirectUrl": "https://airtime.codapayments.com/airtime/begin?txn_id=7144594637002072212",
...
}
}Optional: Append optional query parameters to the redirectUrl before opening
Refer to Query parameters for a list of supported query parameters
Method 2: Using the Base URL & attaching all query parameters to construct the Hosted Payment Page URL
Query parameters
txn_id
Mandatory
Mandatory The transaction ID you've collected after initiating the payment
browser_type
Optional
Optional
If your user is on a mobile device, browser_type=mobile-web needs to be passed to make sure that the payment page is optimised to the device.
If any other value or none is passed, the payment page will be optimised for a desktop view.
utm_souce
Optional
utm_source as it is detected in your page URL.
For example, utm_souce=google, utm_source=coda
utm_medium
Optional
utm_medium as it is detected in your page URL.
For example, utm_medium=banner, utm_medium=email
utm_campaign
Optional
utm_campaign as it is detected in your page URL.
For example, utm_campaign=spring_sale, utm_campaign=new_season_launch
utm_content
Optional
utm_content as it is detected in your page URL.
For example, utm_content=, utm_content=email
Samples
Unlocking Marketing analytics on payment page
Our payment page supports marketing analytics out-of-the-box. You can pass along UTM parameters from your store's page to the Codapay page. The UTMs will then be available in your payment funnel data analysis & marketing channel attribution analysis.
* We recommend that you pass along UTM parameters without any modifications, so that analytics data collected on the hosted payment page can be used together with other analytics data captured on your web page (for instance, data captured using Google Analytics) without any discrepancies.
Example:
The user landed on your page with this UTM tracked URL:
Then, when the user makes a purchase, you can pass along the UTMs to the Codapay page URL along with other mandatory URL parameters:
Special Considerations for Webviews
Handling redirection
Some channels may redirect users to their wallet app. To handle the redirections properly when using Webviews, you will need to use WebViewClient.shouldOverrideUrlLoading using the intents below:
Brazil
PicPay
picpay://
Brazil
AmeDigital
amedigital://
Indonesia
GO-PAY
gojek://
Indonesia
Shopee Pay
shopeeid:// & shopeepayid://
Indonesia
Dana
danaid:// & market://details?id=id.dana
Malaysia
GrabPay
grab://
Malaysia
Shopee Pay
shopeepaymy://
Malaysia
Maxis
sms:32083
Malaysia
-
-
U Mobile
Singapore
GrabPay
grab://
Philippines
GrabPay
grab://
Philippines
GCash
gcash://
Thailand
Shopee Pay
intent://
Taiwan
Line Pay
intent://
Myanmar
KBZPay
intent://
United States
Cash App
cashme://
Vietnam
MoMo
momo://
All countries
-
-
Google Pay/Apple Pay
Common Webview Pitfalls and Tips
Last updated
Was this helpful?