postCommerceWebhooksByProviderWithHttpInfo method

Future<Response> postCommerceWebhooksByProviderWithHttpInfo(
  1. String provider
)

Payment-provider webhook intake for settlement and subscription lifecycle events

Accepts a payment provider's event, verifies it, records it for audit, and applies subscription lifecycle changes to the matching local row. There is no bearer here and there cannot be: the provider's SIGNATURE over the body IS the authentication, so a request with no recognized signature header is 400 and one whose signature does not verify is 401. The provider path segment is only a hint for dashboard configuration — verification picks the processor regardless of what the URL says. Redelivery is safe: an event id already recorded is acknowledged as a duplicate without re-applying any side effect, which matters because providers retry for days until they see a 2xx.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postCommerceWebhooksByProviderWithHttpInfo(String provider,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/commerce/webhooks/{provider}'
    .replaceAll('{provider}', provider);

  // 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,
  );
}