apikey. The plugin loads available services, displays the payment interface, collects customer information, submits the transaction, and returns the result.
v4 plugins are separate from the server-to-server API gateway. For Checkout v4 and Button v4, the integration uses an API key, not an OAuth access token.
Choose the right plugin
Use Checkout v4 when you want to redirect the customer to a complete payment page. Use Button v4 when you want to keep the payment button inside your product page, cart, invoice, or customer area.
Requirements
You need:- a SoleasPay merchant
apikey; - an amount and currency;
- a unique order reference;
- a success URL;
- a failure URL.
apikey identifies the merchant and lets the plugin load authorized payment methods. Do not publish a key that grants access to sensitive actions outside the plugin context.
Checkout v4
Checkout v4 displays a hosted payment page. Your application submits payment data to:successUrl or failureUrl.
HTML example
You can create a standard HTML form.Server JSON example
If your backend initiates the checkout, send the same payload.Checkout v4 fields
Plugin fees
Plugins can indicate who pays the fees for each payment. The backend normalizes this value and recalculates fees server-side duringcollect.
Resolution priority:
feeBearerin the collect payload.feeBearerin the query string.- Historical fallback when no value is provided.
The boolean aliases
customerPaysFees and customer_pays_fees are temporarily accepted at the HTTP boundary, then normalized to CUSTOMER or MERCHANT.
In Checkout v4, the fee quote is calculated by the plugin during the payment session. Your integration still uses
apiKey; it does not need to manage a JWT for this calculation.origin: "PLUGIN", the selected service, the amount, the currency, and the feeBearer context.
POST /transactions/fees/quote with x-sp-auth-token.
Return after payment
After payment, Checkout v4 redirects the customer to the appropriate URL with payment data insoleaspay_data.
soleaspay_data contains transaction information.
transaction_reference, status, amount, currency, and invoice_reference.
Checkout with split settlement
Checkout v4 can receive a split context.rate values must not exceed 100.
Button v4
Button v4 adds a SoleasPay button to your page. It opens the payment interface, loads payment methods, and returns the result to your JavaScript.Script installation
Add a container for the button, then load the script.data-lang controls the interface language. Use fr or en.
Initialize the payment
initButton() again in finally.
Button v4 options
Button v4 modes
Keep the spelling
TIPING if your integration uses this mode, because it is the value expected by the plugin.
JavaScript response
SopayButton.pay(options) returns a promise. On success, you receive an object you can use in your interface.
Best practices
- Use a unique
orderIdper payment. - Load Button v4 only once per page.
- Do not mix Checkout v4 and Button v4 in the same user journey.
- Make sure
successUrlandfailureUrlare available over HTTPS. - Store
transaction_referenceas soon as the plugin returns it. - Treat a payment as successful only when
statusisCOMPLETEDorSUCCESS.
