This article assumes you have already installed the hosted pages using the In-site installation.
Here are described all the available settings you can use when opening the hosted pages.
ProAbonoPortal.open({
business_id: 42,
segment_ref: 'demo-eur',
customer_ref: 'cust_42',
customer_lang: 'en',
customer_name: 'Doe inc',
customer_meta: { key1: 'value1', key2: 'value2' },
offer_ref: 'offer_1',
query: 'OBmj2AvkFGZfrsD60tPJWoICRuc9nCUhMRpRqI0JU8Y',
hash: '29d8b6e5edab22dccac0d60bd3377a2349331e314e752d6bf0731e7c3c22bc29'
});
| Paramaters | Descriptions |
| business_id | This parameter is mandatory.
This is the identifier of your environment that you can find in the Integration section of the ProAbono backoffice. Note that you have both a sandbox environment and a production environment; you will have two different business_id. |
| segment_ref | This parameter is optional and highly recommended.
This is the shared identifier of the customer between your web application and ProAbono. It must be inferred from web application user’s identifiers, to have each user match a single customer. If there is a Customer with that reference, the hosted pages will open authenticated as that customer. If there is no Customer with that reference, then a new Customer will be created. Opening the hosted pages without a customer_ref will open the portal as an anonymous user, which is not recommended as it means:
|
| customer_ref |
This parameter is optional and highly recommended.
This is the shared identifier of the customer between your web application and ProAbono. It must be inferred from web application user’s identifiers, to have each user match a single customer. If there is a Customer with that reference, the hosted pages will open authenticated as that customer. If there is no Customer with that reference, then a new Customer will be created. Opening the hosted pages without a customer_ref will open the portal as an anonymous user, which is not recommended as it means:
|
| customer_lang |
This parameter is optional and recommended.
It’s the language of the customer using the ISO 639 codes. Setting this language will save the language in the Customer object, overwriting it if the Customer already exists. It’s recommended as you want the language of your page to match the language of the hosted pages. |
| customer_name |
This parameter is optional.
It’s the internal name of the customer that you will retrieve in the ProAbono backoffice. Setting this parameter will save it in the Customer object and overwrite it if the Customer already exists. |
| customer_meta |
This parameter is optional.
It’s a key-value table that you can use freely to store metadata. It’s limited to 4 keys and 450 characters. Note that setting this parameter will save it in the Customer object and overwrite it if the Customer already exists. |
| offer_ref |
This parameter is optional and is ignored if the customer has an active subscription.
Use this parameter when you want the customer (or the anonymous customer if customer_ref is not specified) to subscribe to a given offer, without showing the catalog. It’s very handy if the offer is a private offer, not part of your public catalog. |
| query |
This parameter is optional.
It’s used when you need the portal to open on a specific page. The content of the query is encrypted to avoid malicious operations or sensitive data exposition. The query parameter is generated by the API Live when creating or retrieving a Customer, Subscription, Invoice or Offer. |
| hash |
This parameter is mandatory in production and optional in sandbox.
Malicious users could alter the customer_ref parameter before opening in an attempt to access the personal information of another of your customer. This is called identity theft. To prevent identity theft, you have to add a security hash to the opening call. The way to compute that hash is described in the Integration section of the ProAbono backoffice. |