Help for this page

Select Code to Download


  1. or download this
    my $stripe = Stripe::Webhook->new(
        'signing_secret'    => 'whsec_xxxxxxxxxx',
        'invoice-paid'      => \&paid,
        'all-webhooks'      => \&all,
    );
    
  2. or download this
    my $hook_type = $self->{'webhook'}->{'type'};
    $hook_type =~ s/\./-/g;
    ...
        $self->{'reply'}->{'status'} = 'success';
        &{$self->{$hook_type}}($self->{'webhook'});
    }