vexor.portal()
Billing Portal Creation
The vexor.portal()
method allows you to create billing portal sessions for various platforms. It supports both a generic method and platform-specific shortcuts.
The vexor.portal()
method and its platform-specific shortcuts (vexor.portal.mercadopago()
, vexor.portal.stripe()
, vexor.portal.paypal()
) can be used after instantiating Vexor with the project ID and publishable key.
Methodvexor.portal(params)
vexor.portal()
Create a billing portal session for a specified platform.
Parameters
Returns
Returns a Promise that resolves to a VexorPortalResponse object.
Usage Examples
Here are some examples of how to use the vexor.portal()
method:
Generic Usage
- Generic usage:
vexor.portal.stripe()
- Platform-specific shortcut for Stripe:
vexor.portal.mercadopago()
- Platform-specific shortcut for MercadoPago:
vexor.portal.paypal()
- Platform-specific shortcut for PayPal:
Choose the method that best fits your application's needs and the payment platform you're using.
The vexor.portal()
method and its platform-specific shortcuts (vexor.portal.mercadopago()
, vexor.portal.stripe()
, vexor.portal.paypal()
) all return a Promise that resolves to a VexorPortalResponse object. This object contains the portal URL and potentially raw data from the payment platform.