Skip to content

Commit 36fa156

Browse files
committed
fix: use simulated flag instead of fake invoice_id in subscription simulation
The webhook_deliveries table has a FK constraint on invoice_id, causing inserts to fail silently when invoice_id="simulated" (non-existent). Changed to simulated:true field which doesn't trigger the FK check.
1 parent 799617c commit 36fa156

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/api/subscriptions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub async fn simulate_period_end(
166166
let http = reqwest::Client::new();
167167
let payload = serde_json::json!({
168168
"subscription_id": new_sub.id,
169-
"invoice_id": "simulated",
169+
"simulated": true,
170170
"new_period_start": new_sub.current_period_start,
171171
"new_period_end": new_sub.current_period_end,
172172
});

0 commit comments

Comments
 (0)