Skip to content

Latest commit

 

History

History
120 lines (88 loc) · 4.35 KB

ClassicCheckoutSDKApi.md

File metadata and controls

120 lines (88 loc) · 4.35 KB

ClassicCheckoutSDKApi

All URIs are relative to https://checkout-test.adyen.com/v71

Method HTTP request Description
postPaymentSession POST /paymentSession Create a payment session
postPaymentsResult POST /payments/result Verify a payment result

postPaymentSession

PaymentSetupResponse postPaymentSession(idempotencyKey, paymentSetupRequest)

Create a payment session

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. For more information, refer to How it works.

Example

// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.checkout.*

val apiInstance = ClassicCheckoutSDKApi()
val idempotencyKey : kotlin.String = 37ca9c97-d1d1-4c62-89e8-706891a563ed // kotlin.String | A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).
val paymentSetupRequest : PaymentSetupRequest =  // PaymentSetupRequest | 
try {
    val result : PaymentSetupResponse = apiInstance.postPaymentSession(idempotencyKey, paymentSetupRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ClassicCheckoutSDKApi#postPaymentSession")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ClassicCheckoutSDKApi#postPaymentSession")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
idempotencyKey kotlin.String A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). [optional]
paymentSetupRequest PaymentSetupRequest [optional]

Return type

PaymentSetupResponse

Authorization

Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postPaymentsResult

PaymentVerificationResponse postPaymentsResult(idempotencyKey, paymentVerificationRequest)

Verify a payment result

Verifies the payment result using the payload returned from the Checkout SDK. For more information, refer to How it works.

Example

// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.checkout.*

val apiInstance = ClassicCheckoutSDKApi()
val idempotencyKey : kotlin.String = 37ca9c97-d1d1-4c62-89e8-706891a563ed // kotlin.String | A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).
val paymentVerificationRequest : PaymentVerificationRequest =  // PaymentVerificationRequest | 
try {
    val result : PaymentVerificationResponse = apiInstance.postPaymentsResult(idempotencyKey, paymentVerificationRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ClassicCheckoutSDKApi#postPaymentsResult")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ClassicCheckoutSDKApi#postPaymentsResult")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
idempotencyKey kotlin.String A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). [optional]
paymentVerificationRequest PaymentVerificationRequest [optional]

Return type

PaymentVerificationResponse

Authorization

Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json