Question: difference between mock_webhook_payload and mock_webhook_event
exocode opened this issue · comments
Jan commented
Hi there,
sorry for that - maybe stupid - question. I am quite new to Stripe, but as the title suggests:
What is the main difference between mock_webhook_payload
and mock_webhook_event
?
My assumption is, that the payload is something what comes into my controller action,
while event is something which mocks the Stripe gem behaviour, right?
is that use case correct?
@payload = StripeMock.mock_webhook_payload('invoice.paid', { customer: @user.stripe_id })
@event = StripeMock.mock_webhook_event('invoice.paid', @payload)
is that usage also correct?
@event = StripeMock.mock_webhook_event('invoice.paid', {customer: @user.stripe_id} )
Thank you in advance