在 Stripe API 文档中,你可以找到WebhookEndpoint ,而在 Stripe Docs 的交互式 webhook 端点构建器一章中,它使用 Webhook 来验证事件:
try:
event = stripe.Webhook.construct_event(
payload, sig_header, endpoint_secret
)
except stripe.error.SignatureVerificationError as e:
print('⚠️ Webhook signature verification failed.' + str(e))
return jsonify(success=False)
但 API 文档中没有引用 Webhook。
您知道在哪里可以找到它吗,或者它是否属于旧的 API 版本?