Sample Code for Checkout Pages

Knowledge Center > Billing and Payments > Hosted Payment Pages > Hosted Checkout Pages > Create Checkout Pages on Your Website > Sample Code for Checkout Pages

Sample Code for Checkout Pages

Zuora Hosted Checkout Pages are no longer under active development. Customers should use Payment Pages 2.0 for their secure payment acceptance requirements.


This section contains sample code for implementing Checkout pages. 

Zuora Global Support does not troubleshoot content from GitHub. The sample code is as an example of code that has worked for previous implementations and was created by both Zuora and non-Zuora authors. You must customize the sample code for use with your system. Send any comments and feedback to

Sample Demo Project

The sample code attached in this article produces a simple demo projects of the Checkout page. The project embeds a Checkout page iFrame on a webpage and handles the callback response to show a successful transaction or any transaction error messages. 

You will need to modify two inputs in each of the project to make it display your Checkout page:

  1. URL of your hosted page
  2. API Security Key

If you properly modify the above two inputs, then your demo webpage should look like this:

zcheckout demo.png

Below are the languages for which sample code for this demo project is available.


  1. Open the PHP demo project.
  2. Modify the subscription.php file by including your Checkout page URL.
  3. Modify the callback.php file by including your API Security Key.


  1. Open the Java demo project.
  2. Modify the subscription.jsp file by including your Checkout page URL.
  3. Modify the callback.jsp file by including your API Security Key.
Last modified



(not set)