#johnpitchko-source-customer
1 messages · Page 1 of 1 (latest)
I've just been sending test events in Stripe dashboard
{
"created": 1326853478,
"livemode": false,
"id": "evt_00000000000000",
"type": "customer.source.expiring",
"object": "event",
"request": null,
"pending_webhooks": 1,
"api_version": "2012-02-23",
"data": {
"object": {
"id": "src_00000000000000",
"object": "source",
"ach_credit_transfer": {
"account_number": "test_52796e3294dc",
"routing_number": "110000000",
"fingerprint": "ecpwEzmBOSMOqQTL",
"bank_name": "TEST BANK",
"swift_code": "TSTEZ122"
},
"amount": null,
"client_secret": "src_client_secret_GPLhJebNSftSjxDKzoqGMtKk",
"created": 1634845851,
"currency": "usd",
"flow": "receiver",
"livemode": false,
"metadata": {
},
"owner": {
"address": null,
"email": "jenny.rosen@example.com",
"name": null,
"phone": null,
"verified_address": null,
"verified_email": null,
"verified_name": null,
"verified_phone": null
},
"receiver": {
"address": "121042882-38381234567890123",
"amount_charged": 0,
"amount_received": 0,
"amount_returned": 0,
"refund_attributes_method": "email",
"refund_attributes_status": "missing"
},
"statement_descriptor": null,
"status": "pending",
"type": "ach_credit_transfer",
"usage": "reusable"
}
}
}
evt_00000000000000
this is a test event generated in the webhooks configuration UI
With this payload, is it possible to look up the customer_id?
Unfortunately I do not
Are you saying that the payloads are different between real sources and test ones?
By test i mean this isnt even a "real" test mode event
its a purely artificial event used to test webhook endpoint delivery while setting it up
Ok is there a way to generate a 'real' test mode event? Stripe CLI doesn't support that event type.
It doesnt look like that event is supported in testing right now:
https://stripe.com/docs/sources/ach-credit-transfer#testing-ach-credit-transfer-payments
What about for cards?
No, that's not supported. For the dashboard generated events you could have your test hard code some reference test customer to retrieve when the src ID is all zeros
Sorry I am still confused.
I don't necessarily need the dashboard generated events, just a full-copy of the JSON payload that the webhook will generate when that event fires.
catching up here one sec
you should run through the entire payment flow to get the full fleshed out Event object
Sorry I do not understand.
You mean create a customer, add a card, create a subscription, then wait for the card to reach expiry at end of month?
Ah I think I found an event that I can use
From our Live log
Hello! I don't think there's a good way to test the customer.source.expired unfortunately. That said, that event will contain the Source in question, and Sources have a customer property when they're attached to a Customer: https://stripe.com/docs/api/sources/object#source_object-customer