Context
Here, the customer does not choose an offer. They are directly redirected to a predefined offer. Therefore, there is no need to present an offer grid.
An API call needs to be made, specifying the reference of the only available offer.
This allows you to retrieve the link called Hosted-Subscribe to redirect the customer to the subscription process.
Procedure
1/ Retrieve the subscription link during customer creation
It is possible to redirect the customer to the subscription process of a specific offer through a simple API call.
Note: If the customer does not exist in ProAbono, the call will create the customer and provide you with the redirection link to use to navigate them to the subscription tunnel. If the customer already exists, the API call will simply update the customer, and the POST will be interpreted as a PATCH.
Example:
POST https://api-2.proabono.com/v1/Customer?ReferenceOffer=Offertest { "ReferenceCustomer": "123456", "Name": "John Doe", "Email": "john@doe.com", "Language": "en" }
Response:
{ "Id": 72461, "IdSegment": 3, "ReferenceCustomer": "123456", "ReferenceSegment": "sandbox-eur", "Name": "John Doe", "Email": "john@doe.com", "Language": "en", "Links": [ { "rel": "hosted-collection-offers", "href": "https://sandbox-eur.proabono.com/pricing/{Unique-Encrypted-URL1}" }, { "rel": "hosted-home", "href": "https://sandbox-eur.proabono.com/portal/{Unique-Encrypted-URL2}" }, { "rel": "hosted-register", "href": "https://sandbox-eur.proabono.com/register/{Unique-Encrypted-URL3}" }, { "rel": "hosted-subscribe", "href": "https://sandbox-eur.proabono.com/subscribe-offer/{Unique-Encrypted-URL4}" } ] }
2/ Redirect the customer to the subscription link
Simply use the Hosted-Subscribe link as the source of the iframe that will allow the customer to access the subscription tunnel.