Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Hosted Pages

Hosted Pages

The hostedpages call returns the Payment Pages configuration metadata, specifically, page ID, page version, payment method type.

Request

  • Production: GET https://api.zuora.com/rest/v1/hostedpages?version={versionNumber}
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/hostedpages?version=(versionNumber)

Request Parameter

version Optional Version of the Payment Pages for which you want to retrieve the configuration information. Specify 1 for Payment Pages 1.0 or 2 for Payment Pages 2.0. If omitted, information for all versions of Payment Pages are returned.

The response also depends on your tenant settings for Payment Pages 1.0 and Payment Pages 2.0. For example, if only the tenant setting for Payment Pages 2.0 is enabled, the response will only contain information for Payment Pages 2.0 forms even when this parameter is omitted.

The following are the version-specific and general REST requests for Payment Pages:

  • The request for Payment Pages 1.0 configuration information: GET <BaseURL>/hostedpages?version=1
  • The request for Payment Pages 2.0 configuration information: GET <BaseURL>/hostedpages?version=2
  • The request for all versions of Payment Pages configuration information: GET <BaseURL>/hostedpages

Response

If you do not have the corresponding tenant setting enabled, e.g., the request version parameter set to 2 with the Payment Pages 2.0 setting disabled, you will receive an error.

The following information is returned in a response:

success Contains true if successful; otherwise false
pageId Page ID of the Payment Page that Zuora assigns when it is created.
pageName Name of the Payment Page that specified during the page configuration.
pageType Payment method type of this Payment Page, e.g. Credit Card, ACH, or Bank Transfer.
pageVersion Version of the Payment Page. 1 for Payment Pages 1.0 or 2 for Payment Pages 2.0.

Examples

CURL request for Payment Pages 2.0:

curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Content-Type:application/json" -H "Accept:application/json" -X POST https://api.zuora.com/rest/v1/hostedpages?version=2  

JSON response:

{   
    "hostedpages" : 
    [ 
        {
            "pageId" : "8a85858f49a3f2230149abccaa2e004a",     
            "pageType" : "ACH",     
            "pageVersion" : 2.0   
        }, 
        {
            "pageId" : "8a85858f49a3f2230149abcd99090057",     
            "pageType" : "Bank Transfer",     
            "pageVersion" : 2.0   
         }, 
         {     
            "pageId" : "8a85858f49a3f2230149a71083d40019",     
            "pageType" : "Credit Card",     
            "pageVersion" : 2.0   
         }
    ],
    "success" : true 
}

CURL request for all versions of Payment Pages:

curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Content-Type:application/json" -H "Accept:application/json" -X POST https://api.zuora.com/rest/v1/hostedpages

 JSON Response:

{ 
    "hostedpages" : 
    [ 
        { 
            "pageId" : "8a85858f49a3f2230149adbb4a6d007d", 
            "pageType" : "Credit Card", 
            "pageVersion" : 2.0 
        },
        { 
            "pageId" : "8a85858f49a3f2230149abace8d60034", 
            "pageType" : "Credit Card", 
            "pageVersion" : 1.0 
        }, 
        { 
            "pageId" : "8a85858f49a3f2230149abccaa2e004a", 
            "pageType" : "ACH", "pageVersion" : 2.0 
        }, 
        { 
            "pageId" : "8a85858f49a3f2230149abcd99090057", 
            "pageType" : "Bank Transfer", "pageVersion" : 2.0 
        }
    ], 
    "success" : true 
}

 

Last modified
19:48, 16 Nov 2015

Tags

Classifications

(not set)