All URIs are relative to https://checkout-test.adyen.com/v71
Method | HTTP request | Description |
---|---|---|
postOrders | POST /orders | Create an order |
postOrdersCancel | POST /orders/cancel | Cancel an order |
postPaymentMethodsBalance | POST /paymentMethods/balance | Get the balance of a gift card |
CreateOrderResponse postOrders(idempotencyKey, createOrderRequest)
Create an order
Creates an order to be used for partial payments. Make a POST `/orders` call before making a `/payments` call when processing payments with different payment methods.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.checkout.*
val apiInstance = OrdersApi()
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 createOrderRequest : CreateOrderRequest = // CreateOrderRequest |
try {
val result : CreateOrderResponse = apiInstance.postOrders(idempotencyKey, createOrderRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrdersApi#postOrders")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrdersApi#postOrders")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
idempotencyKey | kotlin.String | A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). | [optional] |
createOrderRequest | CreateOrderRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
CancelOrderResponse postOrdersCancel(idempotencyKey, cancelOrderRequest)
Cancel an order
Cancels an order. Cancellation of an order results in an automatic rollback of all payments made in the order, either by canceling or refunding the payment, depending on the type of payment method.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.checkout.*
val apiInstance = OrdersApi()
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 cancelOrderRequest : CancelOrderRequest = // CancelOrderRequest |
try {
val result : CancelOrderResponse = apiInstance.postOrdersCancel(idempotencyKey, cancelOrderRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrdersApi#postOrdersCancel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrdersApi#postOrdersCancel")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
idempotencyKey | kotlin.String | A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). | [optional] |
cancelOrderRequest | CancelOrderRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
BalanceCheckResponse postPaymentMethodsBalance(idempotencyKey, balanceCheckRequest)
Get the balance of a gift card
Retrieves the balance remaining on a shopper's gift card. To check a gift card's balance, make a POST `/paymentMethods/balance` call and include the gift card's details inside a `paymentMethod` object.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.checkout.*
val apiInstance = OrdersApi()
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 balanceCheckRequest : BalanceCheckRequest = // BalanceCheckRequest |
try {
val result : BalanceCheckResponse = apiInstance.postPaymentMethodsBalance(idempotencyKey, balanceCheckRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling OrdersApi#postPaymentMethodsBalance")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling OrdersApi#postPaymentMethodsBalance")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
idempotencyKey | kotlin.String | A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). | [optional] |
balanceCheckRequest | BalanceCheckRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json