We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
Hey, you just need to expose and endpoint where your request payload is a Charge, something like below can help:
@app.post("/coinbase-payment") async def coinbase_payment(request: Request) -> dict: """Handle Webhook Events from Coinbase Commerce""" payload = await request.body() signature = request.headers.get('X-CC-Webhook-Signature') try: # Validate the webhook payload and signature event = Webhook.construct_event(payload.decode(), signature, COINBASE_SECRET) except Exception as e: raise HTTPException(status_code=400, detail=str(e)) # Handle specific event types if event.type == 'charge:confirmed': handle_charge_confirmed(event.data) elif event.type == 'charge:failed': handle_charge_failed(event.data) else: logging.info(f"Coinbase: Unhandled Event Type {event.type}") return JSONResponse(content={'status': 'success'})
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: