Stripe Webhook

Jens Neuhaus

New Member
I am trying to work with Stripe Abo.

Everything looked good. Billed, Invoice created, ...

BUT only for the first time. The second billed month creates Errors in stripe protocoll:

[2018/01/23 06:12 to http://.../stripe/webhooks]: (500) ERR
[2018/01/23 07:20 to http://.../stripe/webhooks]: (500) ERR
[2018/01/23 08:36 to http://.../stripe/webhooks]: (500) ERR
[2018/01/23 10:00 to http://.../stripe/webhooks]: (500) ERR

No invoices are created.

Tried different settings to Group and Plan. No Effect.

Any clue what else could be done? Using Version 1.5.1 with Stripe Payment Gateway 1.2
PHP Version 7.0.22
 
@Jens Neuhaus - Any info related to this in the application log from backend > misc > application log ?
How about in stripe, when you look at whebhook logs, any info there ?
 
No entry in application log (only old entries, not related.

On stripe the response to the call is displayed as:

<!DOCTYPE html> <html dir="ltr"> <head> <meta charset="utf-8"> <meta name="csrf-token-name" content="csrf_token" /> <meta name="csrf-token-value" content="UmYyM3hETUh1d0lJa1BISkc3R3VPb0JuUHRvSTVUa0y3WJoRzCQ2pB1my16jDYwJzw1B4pjFH83wGeE0aeyYwg==" /> <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css?av=567b76ae" /> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css?av=567b76ae" /> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css?av=567b76ae" /> <link rel="stylesheet" type="text/css" href="/assets/css/adminlte.css?av=567b76ae" /> <link rel="stylesheet" type="text/css" href="/frontend/assets/css/style.css?av=567b76ae" /> <link rel="stylesheet" type="text/css" href="/assets/css/skin-blue.css?av=567b76ae" /> <script type="text/javascript" src="/frontend/assets/cache/576e6042/jquery.min.js"></script> <script type="text/javascript" src="/as...
 
the request sent is:

{

"id": "evt_1BmJ6ZD456x6ga4vIdpc4lWr",

"object": "event",

"api_version": "2017-08-15",

"created": 1516442263,

"data": {

"object": {

"id": "in_1BmIAQD456x6ga4vi9yOVfuK",

"object": "invoice",

"amount_due": 23800,

"application_fee": null,

"attempt_count": 1,

"attempted": true,

"billing": "charge_automatically",

"charge": "ch_1BmJ6WD456x6ga4vpiPxyo0y",

"closed": true,

"currency": "eur",

"customer": "cus_BnmfSqSuByBxFy",

"date": 1516438658,

"description": null,

"discount": null,

"due_date": null,

"ending_balance": 0,

"forgiven": false,

"lines": {

"object": "list",

"data": [

{

"id": "sub_BnmffmVYXhxMp2",

"object": "line_item",

"amount": 20000,

"currency": "eur",

"description": null,

"discountable": true,

"livemode": true,

"metadata": {

"subtotal": "200.0000",

"tax_percent": "19.00",

"tax_value": "38",

"discount": "0.0000",

"total": "238",

"status": "complete",

"currency_id": "2",

"customer_id": "2",

"plan_id": "1",

"tax_id": "1",

"date_added": "2017-11-20 08:57:27",

"last_updated": "2017-11-20 08:57:27",

"order_uid": "zd455y51vm832",

"order_id": "3"

},

"period": {

"start": 1516438647,

"end": 1519117047

},

"plan": {

"id": "dv185bkz9lc57",

"object": "plan",

"amount": 20000,

"created": 1511168242,

"currency": "eur",

"interval": "month",

"interval_count": 1,

"livemode": true,

"metadata": {

},

"name": "40.000",

"statement_descriptor": null,

"trial_period_days": null

},

"proration": false,

"quantity": 1,

"subscription": null,

"subscription_item": "si_Bnmf8aXjlSlVe1",

"type": "subscription"

}

],

"has_more": false,

"total_count": 1,

"url": "/v1/invoices/in_1BmIAQD456x6ga4vi9yOVfuK/lines"

},

"livemode": true,

"metadata": {

},

"next_payment_attempt": null,

"number": "0c76db4b9e-0003",

"paid": true,

"period_end": 1516438647,

"period_start": 1513760247,

"receipt_number": null,

"starting_balance": 0,

"statement_descriptor": null,

"subscription": "sub_BnmffmVYXhxMp2",

"subtotal": 20000,

"tax": 3800,

"tax_percent": 19,

"total": 23800,

"webhooks_delivered_at": 1516438659

}

},

"livemode": true,

"pending_webhooks": 1,

"request": {

"id": null,

"idempotency_key": null

},

"type": "invoice.payment_succeeded"

}
 
Tell me the url to the stripe webhook so that i can reply the above request with the data you have posted.
 
@Jens Neuhaus - After running the above data against the url you provided, i got this:
Screenshot 2018-01-23 13.14.42.png
What this means is that, most likely, the plan which the subscription has been created for, doesn't exist anymore and because of this you get the error, which is expected.
You now either create the plan again using phpmyadmin and give it the right ID (seems 1) or you delete all the subscriptions targeting it.
 
Gotcha, then open a support ticket with backend login and url and also ftp access so that i can look into this closer ;)
 
Back
Top