Following article will explain the major changes between the Checkout 2.0 and Checkout 3.0 in order to give an overview for converting from the previous version. Additionally you are able to find links to all steps necessary for smooth transition.
Base API URLs are changed, all communication between our partners and the Checkout 3.0 should be done on our new API on following URLs:
Stage environment: https://avdonl-s-checkout.avarda.org
Production environment: https://avdonl-p-checkout.avarda.org
Authorization
“Site Code
” is replaced with “clientId
“.
“Site Password
” is replaced with “clientSecret
“.
Encoding Site Code and Site Password with Base64 is no longer needed. In order to obtain Partner
access token for using as Authorization headertoken, “clientId” and “clientSecret” is sent in a
POST request.
Endpoint for obtaining access token: {api_url}/api/partner/tokens.
# Obtain Partner access token GET {api_url}/api/partner/tokens Content-type: application/json { "clientId": "659e57c9-d970-4db8-b003-8ba04cc157f9", "clientSecret": "4~{x*6%gvBt(:aD" }
Authorization headertoken is changed from:
Authorization: Basic {base64_encoded_string}
to:
Authorization: Bearer {partner_access_token}
Endpoint forinit payment is changed from:
POST /CheckOut2Api/InitializePayment
to:
POST {api_url}/api/partner/payments
New init payment payload structure is introduced. Detailed information can be found in docs.avarda.com.
Return value for init payment changed from Checkout 2 “purchaseId” (“externalId”):
"19ac0d1ee909c302d212b4324d9194b5"
to Checkout 3 JSON containing following fields:
{ "purchaseId": "AVT3gn", "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJDaGVja291dCIsImp0aSI6IjljZGRhZWI4LWU1N2UtNGIwNC04ZDdjLTBjODc0YTA1MDY2MyIsIlB1cmNoYXNlSWQiOiJBVlQzZ24iLCJleHAiOjE1Nzg5MTE0OTh9.HMRidZgeOQtOQtXyHwanmfS0KwYXb73m5lkTeQ449co", "expiredUtc": "2020-01-01T09:02:03.2160375Z" }
Checkout 3 is no longer an IFRAME
inserted inside of a partners page, but instead a JS application directly
embedded into the page. For all benefits see docs.avarda.com.
Displaying Checkout form follows the same process:
All features supported for Delivery, Refunds and Returns. Simplified API calls – same functionality. Details can be found here: https://docs.avarda.com/convert-to-checkout-3/confirm-payment/.
TBD. More info here: https://docs.avarda.com/convert-to-checkout-3/additional-steps/