Target audience: Developers Release version: 4.11.7
Keep the previous Adyen Web version¶
Introduction¶
When Tulo moves a payment configuration to a new version of Adyen Web, every Adyen call uses the new version straight away. A purchase page you built yourself may not support the new version yet. With the optional sdk_major_version parameter it can keep using the previous version for a while.
The parameter only works if it is sent on every call that talks to Adyen during the purchase. The script your page loads and the Adyen Checkout API that Payway calls must be the same version. Adyen does not support mixing them.
Note
sdk_major_version exists on the v2 Adyen API only. The payment configuration must have a previous version set up in PAP. Ask Tulo support if you are unsure.
How it works¶
sequenceDiagram
participant Page as Your purchase page
participant PW as Payway API (v2)
participant Adyen
Page->>PW: GET settings?sdk_major_version=5
PW-->>Page: Script + CSS for version 5,<br/>javascript_major_version: 5
Page->>PW: GET payment_methods (sdk_major_version=5)
PW->>Adyen: Checkout API of version 5
Page->>PW: POST place_order (sdk_major_version=5)
PW->>Adyen: Checkout API of version 5
opt Adyen asks for an action (3DS, redirect)
Page->>PW: POST perform_additional_action (sdk_major_version=5)
PW->>Adyen: Checkout API of version 5
end
Endpoints that need sdk_major_version¶
Send the same value on all of these:
| Flow | Endpoint | What the parameter does |
|---|---|---|
| All | GET /v2/adyen/settings | Returns the script and stylesheet of that version. javascript_major_version in the response tells which version you got. |
| Purchase | GET /v2/adyen/payment_methods | Fetches payment methods from that version's Checkout API. Applies to all three variants (period id, product code, order id). |
| Purchase | POST /v2/adyen/place_order | Places the payment through that version's Checkout API. |
| Purchase | POST /v2/adyen/me/place_order | Same, for a logged-in user. |
| Gift purchase | POST /v2/adyen/me/place_gift_order | Same, for a gift order. |
| Purchase | POST /v2/adyen/perform_additional_action | Sends the action details (3DS, redirect) to that version's Checkout API. |
| Purchase | POST /v2/adyen/me/perform_additional_action | Same, for a logged-in user. |
| Card change | POST /v2/adyen/me/place_card_verification | Runs the 0 amount verification through that version's Checkout API. |
| Card change | POST /v2/adyen/me/perform_card_verification | Same, when verification is split into initialize and perform. |
Endpoints that do not take it¶
These calls do not talk to Adyen for your page, so they need no version:
| Endpoint | Why |
|---|---|
| GET /v2/adyen/product_purchase_info | Reads product data from Payway only. |
| POST /v2/adyen/me/initialize_purchase, POST /v2/adyen/me/initialize_verification | Only creates the purchase session in Payway. |
| GET /v2/adyen/me/purchase_session, POST /v2/adyen/me/update_purchase_session | Only reads or updates the purchase session. |
| All v1 Adyen endpoints | Not supported on v1. Move to v2 to use the previous version. |
Renewals, credits and other calls that Payway makes on its own always use the current version.
Rules¶
| Situation | Result |
|---|---|
sdk_major_version left out |
The current version is used. |
sdk_major_version is the current version |
The current version is used. |
sdk_major_version is the previous version |
The previous version is used. |
| No such version in the payment configuration | 400 invalid_parameter for sdk_major_version, listing the available versions. |
| Sent on settings but not on later calls | The page runs the previous script while the payment goes through the current Checkout API. This mix is not supported by Adyen and payments may fail. |
When to add and remove it¶
- Add
sdk_major_versionwith your current version (e.g.5) on all endpoints above before Tulo moves your payment configuration to the new version. - Update your purchase page to the new Adyen Web version.
- Send the new version, or leave the parameter out.