All Collections
Webhooks
Fulfilment Pending (fulfilment_pending) webhook
Fulfilment Pending (fulfilment_pending) webhook
Harvey Gil avatar
Written by Harvey Gil
Updated over a week ago

By setting up the "fulfilment_pending" webhook in FirstPromoter, you'll receive notifications when non-monetary commissions are prepared for fulfilment. Non-monetary rewards like credits, free months, etc, rewards enter in fulfilment as soon as they are approved.

This is for FirstPromoter v2, if you are still using v1, please check this article


โ€‹
In case you have the "Auto-approve rewards" checked for the campaign, the webhook will be fired right after the reward is attributed.
โ€‹

To utilize the 'fulfilment_pending' webhook in FirstPromoter, follow these steps:

  1. How to respond to this webhook call:

  • Respond with status 200 if you fulfilled the reward on your end.

  • Respond with a 2xx status (except 200) to keep the fulfilment marked as pending on FirstPromoter's end.

  • Respond with any other status to indicate an error (FirstPromoter will retry for 7 times during the day).

  1. Data Sent with Webhook Event Payload:

    • EVENT OBJECT:

      • id: Webhook event ID.

      • type: Indicates the webhook event type, such as "fulfilment_pending."

      • created_at: Timestamp of when the event occurred.

    • DATA OBJECT:

      • id: Fulfilment object ID.

      • status: Current state of the fulfilment (e.g., "pending").

      • date_paid: Null since the fulfilment is pending.

      • amount: Amount of the reward fulfilled.

      • unit: The reward unit (e.g., "credits", "free_months", "cash").

      • campaign: JSON containing campaign information.

      • promoter: Contains information about the promoter who referred the lead.

        • id: Promoter's ID.

        • cust_id: ID to identify the promoter.

        • auth_token: Authentication token.

        • earnings_balance: JSON containing the total amount of rewards earned.

        • current_balance: JSON containing remaining amounts after payments.

        • paid_balance: JSON containing paid/fulfilled amounts.

        • email: Promoter's email.

        • temp_password: Temporary password generated.

        • profile: JSON containing additional promoter information.

To add a webhook in FirstPromoter, you will need to access your profile on the upper-right corner - "Settings" - "Integrations" tab - "Webhooks" - "Test webhook/Select event" - "+Add new webhook" - Add the desired webhook URL and test it by clicking on "Test webhook" - Save.

Did this answer your question?