Request Schema

The Webhook implementation needs to support the following scheme

type WebhookRequest = {
  reason:
    | "SubscriptionCreated"
    | "SubscriptionCancelled"
    | "SubscriptionEnded"
    | "Payment"
    | "PaymentFailure"
    | "DynamicPaymentRequestRejected";
  link: string;
  version: "v1";
  home: "https://debitllama.com";
};

reason

You can receive a webhook request for the following reasons

  1. SubscriptionCreated - A new subscription was approved for one of your items

  2. SubscriptionCancelled - An existing subscription was cancelled

  3. Payment - A successful payment

  4. PaymentFailure - Payment failed, could be due to missing relayer or account balance!

  5. DynamicPaymentRequestRejected - The Request to make a direct debit with a custom amount was rejected during relaying. Payment can't be processed.

A link to the payment intent using APIV1

You can fetch the details of the payment intent using the link via GET request

/api/v1/payment_intents/[slug]

version and home

The version and home keys store meta data The API version and the URL of the service.

Example Webhook code

Last updated