Payment processor
await payments.create_payment(amount_cents, metadata) | Creates a payment. metadata is a dict of your own values |
Every event the webhook receives:
event["type"] | What happened: "payment.succeeded" or "payment.failed" (the card was declined) |
event["payment"] | The payment: id, amount_cents, status, and metadata |
Any 2xx response tells the processor the event was received.