diff --git a/docs/checkout-api.html b/docs/checkout-api.html index dfae39ecf..8cbc9c4ec 100755 --- a/docs/checkout-api.html +++ b/docs/checkout-api.html @@ -79,8 +79,17 @@
"IDEMPOTENCY
+ KEY FOR THIS REQUEST" is a unique identifer for the message with a maximum 64 characters (we recommend a
+ UUID).
+
+ RequestOptions requestOptions = new RequestOptions();
requestOptions.setIdempotencyKey("IDEMPOTENCY KEY FOR THIS REQUEST");
PaymentsResponse paymentResponse = checkout.payments(paymentsRequest, requestOptions);
+ If you don't want to use idempotencyKey, simply send paymentRequest as shown in following example:
+
+ PaymentsResponse paymentResponse = checkout.payments(paymentsRequest);
Provides the data object that can be used to start the Checkout SDK. To set up the payment, pass its amount, currency, and other required parameters. We use this to optimise the payment flow and perform better risk assessment of the transaction.
+Provides the data object that can be used to start the Checkout SDK. To set up the payment, pass its amount, + currency, and other required parameters. We use this to optimise the payment flow and perform better risk + assessment of the transaction.
Checkout checkout = new Checkout(client);
PaymentSessionRequest paymentSessionRequest = new PaymentSessionRequest();
paymentSessionRequest.setAmount(createAmountObject("EUR", 17408L));
@@ -46,9 +48,19 @@ paymentSession
paymentSessionRequest.returnUrl("https://www.yourshop.com/checkout/result");
paymentSessionRequest.merchantAccount("YOUR_MERCHANT_ACCOUNT");
paymentSessionRequest.setCountryCode("NL");
-paymentSessionRequest.setSdkVersion("1.3.0");
-PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest);
+paymentSessionRequest.setSdkVersion("1.3.0");
+ This Adyen API supports idempotency. To enable idempotent behavior on this request call, you need
+ to supply a RequestOptions object with idempotencyKey. In following example, "IDEMPOTENCY
+ KEY FOR THIS REQUEST" is a unique identifer for the message with a maximum 64 characters (we recommend a
+ UUID).
+
+ RequestOptions requestOptions = new RequestOptions();
requestOptions.setIdempotencyKey("IDEMPOTENCY KEY FOR THIS REQUEST");
PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest, requestOptions);
+ If you don't want to use idempotencyKey, simply send paymentRequest as shown in following example:
+
+ PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest);
+
Verifies the payment result using the payload returned from the Checkout SDK.
Checkout checkout = new Checkout(client);