Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
19 KiB
CheckoutApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| commerceAuthorizeOrder | POST /v1/commerce/order/{orderid}/authorize | Authorize payment for order |
| commerceAuthorizePayment | POST /v1/commerce/checkout/authorize | Authorize new payment |
| commerceAuthorizePaymentForOrder | POST /v1/commerce/checkout/authorize/{orderid} | Authorize payment for existing order |
| commerceCancelOrder | POST /v1/commerce/checkout/cancel/{orderid} | Cancel order |
| commerceCaptureOrder | POST /v1/commerce/order/{orderid}/capture | Capture authorized payment |
| commerceCapturePayment | POST /v1/commerce/checkout/capture/{orderid} | Capture authorized payment |
| commerceChargeOrder | POST /v1/commerce/order/{orderid}/charge | Authorize and capture payment (single step) |
| commerceChargePayment | POST /v1/commerce/checkout/charge | Authorize and capture in one step |
| commerceConfirmOrder | POST /v1/commerce/checkout/confirm/{orderid} | Confirm order |
| commerceLookupEthereumProxy | GET /v1/commerce/checkout/ethereum/lookup/{proxyaddress} | Lookup Ethereum proxy address |
| commerceRefundOrder | POST /v1/commerce/order/{orderid}/refund | Refund order |
| commerceStoreAuthorize | POST /v1/commerce/store/{storeid}/checkout/authorize | Authorize payment via store |
| commerceStoreCharge | POST /v1/commerce/store/{storeid}/checkout/charge | Charge payment via store |
commerceAuthorizeOrder
CommerceOrder commerceAuthorizeOrder(orderid, commercePaymentRequest)
Authorize payment for order
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
val commercePaymentRequest : CommercePaymentRequest = // CommercePaymentRequest |
try {
val result : CommerceOrder = apiInstance.commerceAuthorizeOrder(orderid, commercePaymentRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceAuthorizeOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceAuthorizeOrder")
e.printStackTrace()
}
Parameters
| orderid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commercePaymentRequest | CommercePaymentRequest | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceAuthorizePayment
CommerceOrder commerceAuthorizePayment(commerceCheckoutRequest)
Authorize new payment
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val commerceCheckoutRequest : CommerceCheckoutRequest = // CommerceCheckoutRequest |
try {
val result : CommerceOrder = apiInstance.commerceAuthorizePayment(commerceCheckoutRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceAuthorizePayment")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceAuthorizePayment")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceCheckoutRequest | CommerceCheckoutRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceAuthorizePaymentForOrder
CommerceOrder commerceAuthorizePaymentForOrder(orderid, commercePaymentRequest)
Authorize payment for existing order
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
val commercePaymentRequest : CommercePaymentRequest = // CommercePaymentRequest |
try {
val result : CommerceOrder = apiInstance.commerceAuthorizePaymentForOrder(orderid, commercePaymentRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceAuthorizePaymentForOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceAuthorizePaymentForOrder")
e.printStackTrace()
}
Parameters
| orderid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commercePaymentRequest | CommercePaymentRequest | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceCancelOrder
CommerceOrder commerceCancelOrder(orderid)
Cancel order
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
try {
val result : CommerceOrder = apiInstance.commerceCancelOrder(orderid)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceCancelOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceCancelOrder")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| orderid | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceCaptureOrder
CommerceOrder commerceCaptureOrder(orderid)
Capture authorized payment
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
try {
val result : CommerceOrder = apiInstance.commerceCaptureOrder(orderid)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceCaptureOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceCaptureOrder")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| orderid | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceCapturePayment
CommerceOrder commerceCapturePayment(orderid)
Capture authorized payment
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
try {
val result : CommerceOrder = apiInstance.commerceCapturePayment(orderid)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceCapturePayment")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceCapturePayment")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| orderid | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceChargeOrder
CommerceOrder commerceChargeOrder(orderid, commercePaymentRequest)
Authorize and capture payment (single step)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
val commercePaymentRequest : CommercePaymentRequest = // CommercePaymentRequest |
try {
val result : CommerceOrder = apiInstance.commerceChargeOrder(orderid, commercePaymentRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceChargeOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceChargeOrder")
e.printStackTrace()
}
Parameters
| orderid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commercePaymentRequest | CommercePaymentRequest | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceChargePayment
CommerceOrder commerceChargePayment(commerceCheckoutRequest)
Authorize and capture in one step
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val commerceCheckoutRequest : CommerceCheckoutRequest = // CommerceCheckoutRequest |
try {
val result : CommerceOrder = apiInstance.commerceChargePayment(commerceCheckoutRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceChargePayment")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceChargePayment")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceCheckoutRequest | CommerceCheckoutRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceConfirmOrder
CommerceOrder commerceConfirmOrder(orderid)
Confirm order
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
try {
val result : CommerceOrder = apiInstance.commerceConfirmOrder(orderid)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceConfirmOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceConfirmOrder")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| orderid | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceLookupEthereumProxy
CommerceLookupEthereumProxy200Response commerceLookupEthereumProxy(proxyaddress)
Lookup Ethereum proxy address
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val proxyaddress : kotlin.String = proxyaddress_example // kotlin.String |
try {
val result : CommerceLookupEthereumProxy200Response = apiInstance.commerceLookupEthereumProxy(proxyaddress)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceLookupEthereumProxy")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceLookupEthereumProxy")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| proxyaddress | kotlin.String |
Return type
CommerceLookupEthereumProxy200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceRefundOrder
CommerceOrder commerceRefundOrder(orderid, commerceRefundOrderRequest)
Refund order
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val orderid : kotlin.String = orderid_example // kotlin.String |
val commerceRefundOrderRequest : CommerceRefundOrderRequest = // CommerceRefundOrderRequest |
try {
val result : CommerceOrder = apiInstance.commerceRefundOrder(orderid, commerceRefundOrderRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceRefundOrder")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceRefundOrder")
e.printStackTrace()
}
Parameters
| orderid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceRefundOrderRequest | CommerceRefundOrderRequest | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceStoreAuthorize
CommerceOrder commerceStoreAuthorize(storeid, commerceCheckoutRequest)
Authorize payment via store
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val commerceCheckoutRequest : CommerceCheckoutRequest = // CommerceCheckoutRequest |
try {
val result : CommerceOrder = apiInstance.commerceStoreAuthorize(storeid, commerceCheckoutRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceStoreAuthorize")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceStoreAuthorize")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceCheckoutRequest | CommerceCheckoutRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceStoreCharge
CommerceOrder commerceStoreCharge(storeid, commerceCheckoutRequest)
Charge payment via store
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CheckoutApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val commerceCheckoutRequest : CommerceCheckoutRequest = // CommerceCheckoutRequest |
try {
val result : CommerceOrder = apiInstance.commerceStoreCharge(storeid, commerceCheckoutRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CheckoutApi#commerceStoreCharge")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CheckoutApi#commerceStoreCharge")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceCheckoutRequest | CommerceCheckoutRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json