chevron_left Terug naar overzicht

Webhooks

Webhooks

Peggy Pay biedt de volgende webhooks:

Eventnaam Eventomschrijving
newSubmission Nieuwe aanmelding.
newUpsell Nieuwe 1-click-upsell aangeschaft.
orderStatusChanged De order-status is aangepast.
installmentNew Nieuwe gespreid betalen gestart.
installmentPayment Een nieuwe incasso voor een order met gespreid betalen.
installmentPaymentFailed Als een incasso voor gespreid betalen gefaald is.
subscriptionNew Nieuw abonnement gestart.
subscriptionPayment Een nieuwe incasso voor een abonnement.
subscriptionPaymentFailed Een gefaalde incasso voor een abonnement.
subscriptionCancelledByCustomer Een abonnement wordt gestopt door de klant via de afmeldpagina.
subscriptionCancelledByOwner Een abonnement wordt gestopt door de beheerder.
subscriptionReactivated Een abonnement is opnieuw gestart.
subscriptionChanged Een abonnement is aangepast.

De ingestelde url wordt aangeroepen met een dataset. Hieronder kan je lezen welke dataset bij welk event wordt meegestuurd.

Datasets

Nieuwe aanmelding

{
    "Id": string,
    "event": string,
    "naw-firstName": string,
    "naw-lastName": string,
    "naw-email": string,
    "payment-paymentStatus": "complete",
    "payment-paymentAmount": decimal (10, in euros),
    "payment-paymentAmountEx": decimal (8.26, in euros),
    "payment-paymentAmountVat": decimal (1.74, in euros),
    "dateAdded": string (YYYY-MM-DD HH:SS:ii),
    "orderNumber": string,
    "submissionStatus": "Nieuw",
    "formName": string,
    "formKey": string,
    "paymentType": string (subscription/installment/default),
    "paymentId": string (mollie payment Id)
    "submissionHash": string     
    "event": "newSubmission"
-- for subscription
    "subscriptionHash": string,
    "subscriptionInterval": string (daily/weekly/monthly etc),
    "subscriptionAmount": int (5000, in cents),
    "subscriptionAmountEx": int,
    "subscriptionCustomerId": string,
-- for installment
    "totalTerms": int,
}

Orderstatus gewijzigd

{
    "event": string,
    "status": {
        "name": string (new, incomplete, complete, reviewed, archived, pending, cancelled, shipped, authorized, refunded, processing, readyForShipment, cashback, refundedPartially)
        "title": string,
        "isActive": 1 or 0,
        "isComplete": 1 or 0,
        "isReviewed": 1 or 0
    },
    "submissions": [
        {
            "orderNr": string,
            "orderNrFormatted": string,
            "submissionHash": string,
        },
        ..
    ]
}

Gespreid betalen

Geldt voor zowel installmentPayment als voor installmentPaymentFailed.

{
    "event": string,
    "paymentId": string,
    "term": int,
    "submissionHash": string,
    "amount": int (5000, in cents),
    "amountEx": int,

    "installmentCustomerId": string (mollie customer id),
    "installmentSubscriptionId": string (mollie subscription id),

    "paymentType": string (installent / installentRetry),
-- in case of failed
    "reason": string
}

Abonnement incasso

Geldt voor subscriptionPayment en subscriptionPaymentFailed.

{
    "event": string,
    "formKey": string,
    "paymentId": string (mollie payment id),

    "userName": string,
    "userEmail": string,

    "subscriptionTrialAmount": int (5000, in cents),
    "subscriptionTrialPeriod": string (days, weeks etc),
    "subscriptionTrialInterval": int,

    "submissionHash": string,
    "dateAdded": string (YYYY-MM-DD HH:SS:ii),

    "subscriptionAmount": int (5000, in cents),
    "subscriptionAmountEx": int,
    "subscriptionCustomerId": string (mollie customer id),
    "subscriptionSubscriptionId": string (mollie subscription id),
    "subscriptionRecurringInterval": string (weekly, monthly etc),
    "subscriptionHash": string,

    "incVat": 1 or 0,
    "vatAmount": int (5000, in cents)

    "amount": int,
    "amountEx": int,
-- for failed
    "reason": string
}

Abonnement geannuleerd

Geldt voor subscriptionCancelledByCustomer en subscriptionCancelledByOwner

{
    "event": string,
    "formKey": string,

    "userName": string,
    "userEmail": string,

    "subscriptionTrialAmount": int (5000, in cents),
    "subscriptionTrialPeriod": string (days, weeks etc),
    "subscriptionTrialInterval": int,

    "submissionHash": string,
    "dateAdded": string (YYYY-MM-DD HH:SS:ii),

    "subscriptionAmount": int (5000, in cents),
    "subscriptionAmountEx": int,
    "subscriptionCustomerId": string (mollie customer id),
    "subscriptionSubscriptionId": string (mollie subscription id),
    "subscriptionRecurringInterval": string (weekly, monthly etc),
    "subscriptionHash": string,

    "incVat": 1 or 0,
    "vatAmount": int (5000, in cents)

    "cancelledBy": string (customer, owner)
}
arrow_forward Verder lezen - Response