vexor.pay()
Payment Creation
The vexor.pay() method allows you to create payment checkouts for various platforms. It supports both a generic method and platform-specific shortcuts.
The vexor.pay() method and its platform-specific shortcuts (vexor.pay.mercadopago(), vexor.pay.stripe(), vexor.pay.paypal(), vexor.pay.talo()) can be used after instantiating Vexor with the project ID and publishable key. The secret key is not mandatory for this method.
Methodvexor.pay(params)
vexor.pay()
Create a payment checkout for a specified platform.
Parameters
Returns
Returns a Promise that resolves to a VexorPaymentResponse object.
Usage Examples
Here are some examples of how to use the vexor.pay() method:
Generic Usage
- Generic usage:
vexor.pay.stripe()
- Platform-specific shortcut for Stripe:
vexor.pay.mercadopago()
- Platform-specific shortcut for MercadoPago:
vexor.pay.paypal()
- Platform-specific shortcut for PayPal:
vexor.pay.talo()
- Platform-specific shortcut for Talo:
vexor.pay.square()
- Platform-specific shortcut for Square:
Choose the method that best fits your application's needs and the payment platform you're using.
OptionsPlatform-specific methods can also accept additional options
The vexor.pay() method and its platform-specific shortcuts (vexor.pay.mercadopago(), vexor.pay.stripe(), vexor.pay.paypal(), vexor.pay.square(), vexor.pay.talo()) all return a Promise that resolves to a VexorPaymentResponse object. This object contains the payment URL, a unique identifier, and the raw response from the payment platform.