#Subscription webhook not triggering for test mode

1 messages · Page 1 of 1 (latest)

bleak venture
#

I have this bit of code to create a subscription that should occur the next day

$subscription = $this->mollie->subscriptions->createForId(
    $transaction->mollie_customer_id,
    [
        "startDate" => Carbon::now()->format("Y-m-d"), //! on prod Carbon::now()->addMonth()->format("Y-m-d"),
        "amount" => [
            "currency" => "EUR",
            "value" => $transaction->amount
        ],
        "interval" => "1 day", //! on prod "1 month",
        "description" => "Maandelijkse donatie",
        "webhookUrl"  => "{$baseUrl}mollie-payments/payment/subscriptionWebhook"
    ]
);

$transaction->mollie_subscription_id = $subscription->id;

but for some reason i have not received a webhook back yet or been able to spot a payment in the dashboard for this payment.
Is this an expected result or am i doing something wrong here?

The creation call still succeeds as we do get a subscription id in the database but we dont get a webhook the next day for the payment.

wild kettle
#

Hi @bleak venture ,

We only send a webhook if the status of the payment becomes:

  • paid
  • expired
  • failed
  • canceled

In testmode this does not happen automatically. You can do a GET Payment API call to find the changePaymentState URL. There you can change the end state to the one you would like to test, including the webhook call 🙂

bleak venture
#

how do i find the payment from the subscription though, since i cant find any new payments in the dashboard either the next day?

wild kettle
#

If you can still not find it there, then I can take a look with you if you pass the Subscription ID (starting with sub_)