Context
This is the standard case where a customer can subscribe directly to a paid offer.
When a potential customer clicks on their chosen offer from the offer presentation page, they are redirected to the subscription funnel.
This process allows for the creation of a customer and a subscription based on a paid offer presented in the offer presentation portal.
The account creation form on your application redirects to the ProAbono subscription funnel for the finalization of the subscription.
Prerequisites
To make it work, you must have completed the following actions beforehand:
- Model your offers in your ProAbono environment.
- Select the offers and position them in a visible offer grid.
- Create and configure a page in your application that integrates the customer portal iframe.
- Your application must have an authentication process.
Procedure
This process starts when one of your users clicks on the “Choose” button for their chosen offer.
1/ User Authentication
If the user is already authenticated at the time of the click, proceed directly to step 3.
Otherwise, redirect the user to your registration or login form to retrieve their information.
2/ Create a Customer in ProAbono
API Call #1 – Create a Customer
Request:
POST https://api-{IdBusiness}.proabono.com/v1/customer { "ReferenceCustomer": "123456", "Name": "John Doe", "Email": "john@doe.com", "ReferenceSegment": "{ReferenceSegment}" }
ReferenceSegment: It is necessary to create the customer in the appropriate segment based on their profile.
See the complete documentation
If no error code is returned, a customer has been successfully created in your ProAbono environment.
3/ (optional) Update Billing Address
If you have your customer’s billing address, you can provide it through the following API call:
Example request
POST https://api-{IdBusiness}proabono.com/v1/CustomerBillingAddress?ReferenceCustomer=123456 { "Company": "John DOE SARL", "FirstName": "John", "LastName": "Doe", "AddressLine1": "123 Avenue des Champs Elysées", "ZipCode": "75008", "City": "Paris", "Country": "FR", "TaxInformation": "FR12345678" }
See the complete documentation
If no error code is returned, the billing address has been successfully updated.
API Call #3 – Create a Subscription
Example request
POST https://api-{IdBusinessProd}.proabono.com/v1/Subscription { "ReferenceCustomer": "123456", "ReferenceOffer": "pro" }
Replace the reference “pro” with the reference of one of the previously created paid offers from the ProAbono back office.
Retrieve the “hosted-subscribe” link from the response and redirect the customer to that URL.
See the complete documentation
Note: You can customize the subscription during creation, such as:
- add or modify the trial period
- add or modify the upfront fee
- modify the price and/or billing frequency of the subscription
- add or modify the configuration of a feature in the subscription (price, quantity, property, etc.)
- set a past or future start date for the subscription
Going Further
Once your customer clicks on the button that triggers the entire workflow presented above, they should be redirected to a page.
From the ProAbono back office settings, you can choose the redirection URL for your “thank you page.” Click here to discover or configure this.