Skip to main content
SoleasPay v4 plugins are designed to integrate payments into a third-party application without managing OAuth, JWT, intent, execute, or status on the merchant side. You only use your SoleasPay merchant 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.
Your 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:
The customer chooses a country and payment method, confirms the operation, then returns 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 during collect. Resolution priority:
  1. feeBearer in the collect payload.
  2. feeBearer in the query string.
  3. Historical fallback when no value is provided.
Canonical values: 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.
The plugin forwards the calculation to the gateway with origin: "PLUGIN", the selected service, the amount, the currency, and the feeBearer context.
If you build your own server-to-server backend outside the plugin, use the gateway route 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 in soleaspay_data.
Once decoded, soleaspay_data contains transaction information.
Your backend should update the order with transaction_reference, status, amount, currency, and invoice_reference.

Checkout with split settlement

Checkout v4 can receive a split context.
The sum of 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

If you want to recreate the button automatically after each payment attempt, you can call 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.
Use this response to show a message to the customer. For a sensitive order, your backend should also verify the transaction before delivering the service.

Best practices

  • Use a unique orderId per payment.
  • Load Button v4 only once per page.
  • Do not mix Checkout v4 and Button v4 in the same user journey.
  • Make sure successUrl and failureUrl are available over HTTPS.
  • Store transaction_reference as soon as the plugin returns it.
  • Treat a payment as successful only when status is COMPLETED or SUCCESS.