Skip to content

Webhook not delivered after payment completion (both per-checkout and dashboard-configured URL) (Sandbox mode) #11

@Cinex10

Description

@Cinex10

Description

When creating a checkout via the PHP SDK, Chargily does not send any webhook upon payment completion — neither to a per-checkout webhook_endpoint specified in the creation payload, nor to the webhook URL configured in the
Chargily web dashboard.

Steps to Reproduce

  1. Configure the webhook URL in the Chargily web dashboard (Settings → Webhook URL) to point to a publicly accessible endpoint.

  2. Create a checkout using the SDK, also passing webhook_endpoint:

use Chargily\ChargilyPay\ChargilyPay;                                                                                                                                                                                          
use Chargily\ChargilyPay\Auth\Credentials;                                                                                                                                                                                     
                                                                                                                                                                                                                               
$chargily = new ChargilyPay(new Credentials([                                                                                                                                                                                  
    'mode' => 'test',                                                                                                                                                                                                          
    'public' => 'pk_test_xxx',                                                                                                                                                                                                 
    'secret' => 'sk_test_xxx',                                                                                                                                                                                                 
]));                                                                                                                                                                                                                           
                                                                                                                                                                                                                               
$checkout = $chargily->checkouts()->create([                                                                                                                                                                                   
    'amount' => 2999,                                                                                                                                                                                                          
    'currency' => 'dzd',                                                                                                                                                                                                       
    'payment_method' => 'edahabia',                                                                                                                                                                                            
    'success_url' => 'https://example.com/success',                                                                                                                                                                            
    'failure_url' => 'https://example.com/failure',                                                                                                                                                                            
    'webhook_endpoint' => 'https://my-app.example.com/api/v1/webhooks/payment/chargily',                                                                                                                                       
    'description' => 'Subscription: Basic Plan',                                                                                                                                                                               
    'metadata' => ['payment_id' => 1],                                                                                                                                                                                         
]);
  1. Open the returned checkout URL and complete the payment in sandbox mode.
  2. Observe that no webhook request is received at either URL.

Verification

The endpoint is confirmed reachable and functional:

curl -X POST https://my-app.example.com/api/v1/webhooks/payment/chargily \                                                                                                                                                     
  -H "Content-Type: application/json" \                                                                                                                                                                                        
  -H "signature: test" \                                                                                                                                                                                                       
  -d '{"type":"checkout.paid","data":{"id":"test"}}'                                                                                                                                                                           
# Returns: {"message":"ok"}                                                                                                                                                                                                    

Expected Behavior

A POST request with a signature header and checkout payload should be sent to the webhook URL upon payment completion, as described in the https://dev.chargily.com/pay-v2/webhook.

Actual Behavior

No webhook request is sent in any scenario:

  • ❌ Per-checkout webhook_endpoint parameter — no delivery
  • ❌ Dashboard-level webhook URL configuration — no delivery
  • ✅ Endpoint is publicly accessible and responds correctly

Environment

  • Package: chargily/chargily-pay v2.0.5
  • PHP: 8.4
  • Framework: Laravel 12
  • Mode: Sandbox (test)

Questions

  1. Is webhook delivery functional in sandbox/test mode?
  2. Is the per-checkout webhook_endpoint parameter supported, or is the dashboard URL the only option?
  3. If per-checkout webhooks are supported, is the parameter name correct (webhook_endpoint vs webhook_url)?
  4. Are there any known delays or conditions required for webhook delivery (e.g., does the checkout need to reach a specific status first)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions