-
-
Notifications
You must be signed in to change notification settings - Fork 288
Description
Hello again,
First of all, I truly appreciate the work put into this project. ;-)
However, I found the documentation usually a bit unclear in several topics, for example regarding webhook requirements. Specifically, on the Webhooks page, it states:
Webhooks are a crucial component in connecting your Django Payments application with external payment gateways like Stripe, PayPal, or Braintree. They enable real-time notifications or events from the payment gateway to be sent to your application, eliminating the need for continuous polling or manual API requests. With webhooks, your application can stay in sync with payment gateway updates, such as successful payments, subscription changes, or refunds.
and bellow, it mentions:
The webhook URL structure in django-payments follows this pattern:
{protocol}://{host}/payments/process/{variant}/
This could lead users to believe that ALL payment variants require a webhook setup, such as:
https://your-app.com/payments/process/stripe/
https://your-app.com/payments/process/paypal/
https://your-app.com/payments/process/mercadopago/
Nevertheless, after reviewing the static_callback code
, I noticed that it calls:
token = provider.get_token_from_request(request=request, payment=None)
And as far as I can tell, only the Stripe provider implements get_token_from_request
. Other providers (I tested PayPal) raise a NotImplementedError
.
If webhooks are only required for Stripe today, it might be helpful to clarify this in the documentation. Perhaps a table listing which official providers require webhooks and which do not would prevent confusion for new users.
Just a small suggestion that I believe could improve the onboarding experience.