Payment through Wordline Saferpay

Configuration Options for our Worldline Saferpay Integration

Unchained payment plugin for Worldline Saferpay. The JSON API that is consumed by the plugin is documented here, a general integration documentation can be accessed here.


Worldline Saferpay

You can create multiple terminals in the backoffice. The terminal ID is passed in the configuration options, which allows you to instantiate multiple Saferpay plugins with the same credentials, but different terminal IDs.

Environment Variables

NAMEDefault ValueDescription
WORLDLINE_BASE_URLhttps://test.saferpay.com/apihttps://test.saferpay.com/api for the test system, https://www.saferpay.com/api for the production system
WORLDLINE_SUCCESS_URLURL that the user is forwarded to after a successful payment. ?order_id=<unchained id of the order> is automatically added
WORLDLINE_FAILED_URLURL that the user is forwarded to after a failed payment. ?order_id=<unchained id of the order> is automatically added

Instantiate a provider

When instantiating the provider, you have to provide the terminal ID:

updatePaymentProvider(paymentProviderId: "id of the provider", 
                      paymentProvider: {configuration: {key: "terminalId", value: "<id>"}}) {


To start a new Worldline Saferpay transaction, the mutation signPaymentProviderForCheckout is used. You can optionally specify the field description (text that is shown to the user on the payment page) in the transactionContext.

The mutation returns a stringified JSON object with the transaction ID and the location:

    "transactionId": "<id>",
    "location": "https://test.saferpay.com/vt2/api/PaymentPage/1/2/abc"

The user will be redirected to the success (or failure) URL after entering the payment credentials. To complete the order, you have to call checkoutCart and provide the previously retrieved transactionId

    orderId: "order id from query parameter",
    paymentContext: {transactionId: "retrieved transaction id"}) { 

Cancellation / Refunds

Cancellations via rejectOrder are supported by the plugin.

Edit on GitHub