How a Trustly payment works
Trustly is a bank redirect payment method:- The customer selects Trustly at checkout.
- Payrails returns a redirect URL from Worldpay, and the customer goes to Trustly.
- The customer confirms the payment with their bank.
- Trustly sends the customer back to your
returnInfoURL. - Payrails receives the final result from Worldpay and updates the payment.
Supported currencies and countries
Payrails sends the currency and billing country you provide to Worldpay without checking them first. Worldpay rejects a pairing that Trustly doesn’t support.Supported workflows
Before you begin
Complete these steps before you send your first Trustly payment through Worldpay:- Set up a Worldpay integration in your workspace. Contact your Payrails account team if Worldpay isn’t listed in your Payrails Portal yet.
- Ask Worldpay to enable Trustly on your Worldpay entity.
- In the Payrails Portal, go to Settings → Integrations, open your Worldpay integration, select Trustly under Payment methods, and save.
- Add Trustly as a payment option in your workflow.
Request fields for Worldpay
Send these fields in the authorize request, in addition to the standard authorize fields. Payrails checks Required fields and returns an error when one is missing. Fields required by the PSP pass the Payrails checks but the PSP can decline the payment without them.Authorize a Trustly payment
Call authorize a payment withtrustly as the paymentMethodCode. The response includes the redirect to Trustly.
Authorize request
success or error URL. Confirm the result through webhook notifications or the execution status before you fulfill the order.
How Worldpay handles Trustly
- Payrails reads the customer’s email from
meta.order.billingAddress.email, not frommeta.customer.email. - When Worldpay reports the payment as pending after the redirect, Payrails waits for the Worldpay webhook to set the final status.
- Save Instruments and merchant-initiated transactions (MIT) aren’t available for Trustly through Worldpay.