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 @@

payments

paymentsRequest.putPaymentMethodItem("holderName", "John Smith"); paymentsRequest.putPaymentMethodItem("cvc", "737"); paymentsRequest.setReturnUrl("https://your-company.com/..."); -paymentsRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT"); -PaymentsResponse paymentResponse = checkout.payments(paymentsRequest); +paymentsRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT"); + 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");
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);
 

payments/details

diff --git a/docs/checkout-sdk.html b/docs/checkout-sdk.html index 4e1cbae2d..828f2e6b8 100755 --- a/docs/checkout-sdk.html +++ b/docs/checkout-sdk.html @@ -38,7 +38,9 @@

Checkout SDK integration

The Checkout SDK service has the following methods:

paymentSession

-

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);
 
+

payments/result

Verifies the payment result using the payload returned from the Checkout SDK.

Checkout checkout = new Checkout(client);