postCommerceWebhooksByProvider method

Future<void> postCommerceWebhooksByProvider(
  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.

Parameters:

Implementation

Future<void> postCommerceWebhooksByProvider(String provider,) async {
  final response = await postCommerceWebhooksByProviderWithHttpInfo(provider,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
}