Skip to content

What the best way to use webhook for subscription ? #24

@lwillems

Description

@lwillems

Hi

Currently using stripe and this package (symfony bundle) to build as subscription on stripe :
According stripe documentation
Webhooks should be used to provision and renewal (checkout.session.completed and invoice.paid), invoice.paid is not implement but i can register an extra action.
I have implemented webhook with dedicated (unsafe) route provided, i am new to payum and i am a bit confused on how to hook my own logical.
As far as i understand, when webhook is received, payment is retrieved and detail is updated (stored in doctrine in my case), but i need to perform extra steps on my customer account (another entity linked to payment), such as update subscription date.

  1. Should i need to listen on payum event (execute/postExecute ?) if so on which action can i retrieve needed info and rely on ?
  2. Should i extend an action ?

Thanks for your help
Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions