adyen-java-api-library from an earlier version (such as v4.1.0) to the latest version (v40.0.0 or later) to support Checkout API v72.
This is a major upgrade because of significant changes to products, features, and architecture.
Requirements
Review API changes
Use the API Diff Tool to understand the changes between your current Checkout API version and v72. This tool shows:- New parameters and endpoints
- Deprecated or removed fields
- Changes to existing functionality
Identify your use cases
There is no linear upgrade path. Identify the specific use cases in your integration. Common use cases include:- Make payments (Sessions flow or Advanced flow)
- Process webhooks
- Handle authorization adjustments
- Manage subscriptions and subscription payments
- Accept gift card payments
Update your integration
Update your server-side code to use the latest version of the Java API library.Set up the client
The workflow for API requests follows this pattern:- Set up the client.
- Initialize the corresponding API handler.
- Send the request.
Get payment methods
For the Advanced flow, to get the list of available payment methods: Get payment methodsMake a card payment
For the Advanced flow, to make a card payment: Make a card paymentProcess payment webhooks
To process payment webhooks and verify the HMAC signature: Process payment webhooksProcess other webhooks
For Balance Platform or Management webhooks, use the built-in webhook handlers: Process Balance Platform webhooksUse idempotency keys
To send a request that uses API idempotency, include theidempotency-key in the HTTP header for each request:
Use idempotency keys
Handle errors
Catch theApiException to inspect the response and handle specific errors:
Handle errors
Test your integration
After you upgrade your library:- Test all your use cases in your test environment.
- Verify that webhook processing works correctly.
- Check that your integration can handle errors for all possible scenarios.
- Validate that your integration can handle all the payment flows that you support.