Hinweis: Die folgenden Beispiele sollen einen exemplarischen Eindruck von den zu erwartenden Daten liefern. Der Umfang der Daten kann allerdings variieren. Vor der produktiven Inbetriebnahme sollten die Callbacks auf dem Stage-System geprüft werden. |
Allgemeiner Aufbau eines Callbacks:
{ "entityType": "CUSTOMER", -> die Entität für die der Callback erstellt wurde (Kunde/Rechnung/Abonnement/etc.) "callbackType": "CREATION", -> der entsprechende Callback-Typ (erstellen/ändern/löschen/etc.) "entityId": "29", -> entityId entspricht je nach entityType der Kundennummer/Rechnungs-ID/Abonummer/etc. "entity": { -> die Daten der Entität laut API Dokumentation xxxx }
}
Kunde erstellen:
{ "entityType": "CUSTOMER", "callbackType": "CREATION", "entityId": "29", "entity": { "ageVerificationPinEnabled": false, "birthday": null, "changedBy": "10001", "changedByType": "MERCHANT", "changedDate": "2024-08-27T11:49:41.389622Z", "createdBy": "10001", "createdByType": "MERCHANT", "createdDate": "2024-08-27T11:49:41.389622Z", "customerId": "29", "email": "plenigo+callback@plenigo.com", "externalSystemId": "", "firstName": "Test", "invoiceEmail": "", "language": "de", "lastName": "", "miscellaneousData": {}, "mobileNumber": "", "registrationDate": "2024-08-27T11:49:41.389622Z", "registrationSource": "Supporter", "salutation": "", "ssoLoginProviders": null, "status": "ACTIVATED", "twoFactorEnabled": false, "username": "Test" } }
Rechnung erstellen:
{ "entityType": "INVOICE", "callbackType": "CREATION", "entityId": "223", "entity": { "accumulatedPrice": 0.5, "analogInvoice": false, "cancellationInvoiceId": 0, "changedDate": "2024-08-28T00:08:51.914437Z", "currency": "EUR", "customerEmail": "plenigo@plenigo.com", "invoiceAddress": { "businessAddress": false, "city": "Kempten", "country": "DE", "firstName": "Test", "lastName": "User", "postbox": "48576525", "postcode": "87435", "salutation": "NONE", "type": "INVOICE" }, "invoiceCustomerId": "23", "invoiceDate": "2024-08-28T00:08:51.868510Z", "invoiceId": 223, "items": [ { "changedDate": "2024-08-28T00:08:51.916800Z", "createdDate": "2024-08-28T00:08:51.916800Z", "deliveryAddress": { "businessAddress": false, "country": "DE", "salutation": "NONE", "type": "DELIVERY" }, "deliveryCustomerId": "23", "discountPercentage": 0, "periodEndDate": "2024-08-29T23:59:59.000000Z", "periodStartDate": "2024-08-28T00:00:00.000000Z", "plenigoOfferId": "O_D0SO735QL1AXZH7FTG", "plenigoProductId": "P_DSQ20PV66PNWGK0LPV", "plenigoStepId": "S_O38DOOQI9ZE6DESDWC", "position": 1, "price": 0.5, "productId": "P_DSQ20PV66PNWGK0LPV", "purchasedAddonId": 0, "quantity": 1, "subscriptionItemId": 1230101, "tax": 7, "taxCountry": "DE", "taxType": "DIGITALNEWSPAPER", "title": "Angebot A kurzes Abo-Intervall Leistungszeitraum 28.08.2024 - 29.08.2024" } ], "orderId": 0, "paymentChangedToBilling": false, "paymentMethod": "BILLING", "paymentMethodId": 0, "precursorId": 0, "status": "NOT_PAID", "successorId": 0, "type": "INVOICE" } }
Abonnement ändern:
{ "entityType": "SUBSCRIPTION", "callbackType": "CHANGE", "entityId": "1230116", "entity": { "accessBlocked": false, "accountingPeriod": 0, "accountingPeriodTimeSpan": "NONE", "activePartners": null, "analogInvoice": false, "cancellationDate": null, "cancellationPeriod": 5, "cancellationPeriodTimeSpan": "DAY", "cancellationReasonUniqueId": "", "cancellationType": "ISSUE_BASED_REGULAR", "chainId": 1230116, "changedBy": "PLENIGO", "changedByType": "SYSTEM", "changedDate": "2024-08-28T00:00:07.717485Z", "chargeableDeliveries": 8, "connectedOffer": false, "connectedOfferInfo": null, "createdBy": "8", "createdByType": "CUSTOMER", "createdDate": "2024-08-02T09:43:13.41412Z", "currency": "EUR", "customerCancellationBlocked": false, "customerCancellationReasonId": 0, "deliveries": 8, "deliveryAddressId": 1230037, "deliveryCustomerId": "8", "deliveryPaused": null, "durationPeriod": 0, "durationPeriodTimeSpan": "NONE", "endDate": null, "externalBilling": false, "externalSystemId": "", "finishedDeliveries": 4, "firstBookingDate": "2024-08-02T09:43:13.348227Z", "invoiceAddressId": 1230038, "invoiceCustomerId": "8", "items": null, "lastBookingDate": "2024-08-02T09:43:13.348227Z", "managedBy": "PLENIGO", "managedExternal": false, "nextBookingDate": null, "openDeliveries": 4, "paused": null, "paymentMethod": "CREDIT_CARD", "paymentMethodDetails": { "brand": "AMERICAN_EXPRESS" }, "paymentMethodId": 1230005, "paymentPaused": null, "paymentTriesDone": 0, "plenigoOfferId": "O_628IU8F9CB7I6EH5ZG", "precursorId": 0, "precursorReason": "", "precursorReasonDetail": "", "purchaseOrderIndicator": "", "recurringDeliveries": false, "referenceStartDate": "2024-08-02T00:00:00Z", "startDate": "2024-08-02T09:43:13.348191Z", "status": "ACTIVE", "subscriptionId": 1230116, "subscriptionType": "ISSUE_BASED", "successorId": 0, "successorReason": "", "successorReasonDetail": "", "suppressInvoiceSending": false, "term": 0, "termTimeSpan": "NONE" } }
Kunde löschen:
{ "entityType": "CUSTOMER", "callbackType": "DELETION", "entityId": "33", "entity": null }
entityId ist die Kundennummer. Entity = bearbeitete Daten, hier null, da die betroffenen Daten gelöscht wurden.
In-App Abonnement erstellen:
{ "entityType": "APP_STORE_SUBSCRIPTION", "callbackType": "CREATION", "version": "3.0", "entityId": "1230306", "entity": { "accessRightUniqueId": "inappsub", "appStoreSubscriptionId": 1230206, "cancellationDate": "null", "chainId": 1230206, "changedBy": "2VYpOnyFbem8IWY9DyoVaLgOAuG", "changedByType": "API", "changedDate": 2023-12-29T15:02:05.353082Z", "customerId": "29", "endDate": "2023-12-29T15:06:32.364Z", "externalSystemId: "subscription_1_app_2", "startDate": "2023-12-29T15:01:34.393Z", "status": "ACTIVE" } }