Pico offers webhooks to notify your application when an event happens in your Pico community account.

There are two main Event Types that can trigger a Pico Webhooks event.

Contact - These occur whenever a contact signs up on your community or updates their profile.

Payment - These occur for payment or membership events associated to a given contact, including payment renewal, new payment, payment failure, or plan cancellation.

Each of these two main events have a distinct payload, with a subtype value indicating creation, update, or deletion based on the following scenarios

New Contact Created (contact.created) - A free user has signed up.

Contact Updated (contact.updated) - A user made a change to their account, including changing selections on items like newsletter preferences.

Payment Created (payment.created) - A user has made a purchase through Pico, which could be a subscription purchase, a donation, a gift, etc.

Payment Failed (payment.updated) - Pico attempted to charge the card on file for a contact but was unable to. This is most common for recurring subscriptions where a credit card may have expired. This also captures refunds initiated through the Pico Dashboard, where the total amount a contact has paid changes.

Payment Deleted (payment.deleted) - A user cancels a subscription. Note: This also fires when users switch plans, because they are cancelling one plan to join another. If a plan price is changed in the Pico Dashboard, the payment deleted webhook will fire, and a payment created will be triggered when the plan renews for the contact at the adjusted price.

To create a Webhooks integration, reach out to Pico support ([email protected]) with the event types you would like to subscribe to and the endpoint(s) that should be receiving them.

Payment Payload Example

{
"id": "00001234-4444-4f1e-8c6c-4adb7652a75c",
"publisher_id": "000p1234-5555-422c-9d39-d1df0fa3c673",
"email": "[email protected]",
"name": "Support User",
"type": "payment.created",
"source": "dashboard",
"data": {
"discount_code": null,
"membership": "Individual Subscriber",
"whitelisted": false,
"tier": "Golden Supporter",
"billing_interval": "Annual",
"billing_end": 1596664831,
"recurring": 100,
"total": 100,
"first_payment": 1594850393,
"final_payment": 1594850393,
"trial_end": null,
"acquisition": {
"audience": "Default Global",
"region": "United States",
"source": "Other",
"device": "Desktop",
"adblock": true
}
},
"version": "1.1.0",
"timestamp": 1596224512
}

Contacts

{
"id": "00001234-4444-4f1e-8c6c-4adb7652a75c",
"publisher_id": "000p1234-5555-422c-9d39-d1df0fa3c673",
"email": "[email protected]",
"name": "Support User",
"type": "contact.created",
"source": "user",
"data": {
"registration_date": 1596652582,
"verified": false,
"last_login": 1596652582,
"newsletters": ["Default News", "Free News", "Other Newsletter", "Paid Newsletter" ],
"social_accounts": [],
"acquisition": {
"audience": "Everyone - except Instagram",
"region": "United States",
"source": "Other",
"device": "Desktop",
"adblock": true
},
"referral": null,
"meta": {}
},
"version": "1.1.0",
"timestamp": 1596224512
}

As a note, webhooks are sent asynchronously, so it's possible in some cases for events to be sent as webhooks in a different order than the generating events occurred.

Webhooks Source

To identify the person generating the event that triggered the webhook, Pico indicates user, Dashboard, and System.

User actions are taken from individual contacts. Dashboard indicates that a community administrator made a change in the Pico Dashboard, including granting free access or refunding a user. System indicates an automatic event within Pico, including removing premium newsletters from a user contact if their billing fails.

Whenever a charge renews, Pico will automatically include a value of "user". In some cases, this could include migration of data from other membership platforms to Pico initiated by the Pico platform, but based on previous user status.

For subscription deleted events, which indicate that a subscription was stopped immediately, these will be labeled as Dashboard sourced events. Users do not have the ability to immediately end their subscription, and can only choose not to renew.

For more information on canceling, review how to cancel a user's recurring subscription:

https://help.trypico.com/en/articles/3027838-user-wants-to-cancel-subscription-auto-renewal

For more information on potential values of the payload:

https://help.trypico.com/en/articles/2906336-pico-crm-merge-fields

Did this answer your question?