postCommerceStoreByStoreidChargeWithHttpInfo method
Authorize and capture a new order in one call
Runs authorization and capture back to back against a freshly created order — the one-step flow for callers with no reason to hold funds. It takes the authorize body and inherits every authorize rule: the store's currency wins over the body, the items are reserved before the processor is called, and the amount bounds the processor enforces still apply. There is no order id on this address, so it can never continue an existing order. Either half failing answers 400, and the capture side effects — confirmation email, redemptions, stats, the paid and completed events — run only when both halves succeed.
Note: This method returns the HTTP Response.
Parameters:
- String storeid (required):
Implementation
Future<Response> postCommerceStoreByStoreidChargeWithHttpInfo(String storeid,) async {
// ignore: prefer_const_declarations
final path = r'/v1/commerce/store/{storeid}/charge'
.replaceAll('{storeid}', storeid);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}