#luiz-romagnoli_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1374450630873321573
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! i am not super familiar with eventbridge - let me see if i can look into this / find someone on my team who knows a little more than me. gimme a bit to dig.
sure, thank you
do you want to provide you with some more context and code snippets?
that would be helpful!
{
"version": "0",
"id": "17e8dff5-d6cd-3770-ace9-aeac02b6ac3f",
"detail-type": "issuing_transactions.updated",
"source": "aws.partner/stripe.com/ed_61PgtRTG5aTCIz98516PLsRGLISQK0Otk6FWKjBrcDia",
"account": "506417113029",
"time": "2024-03-07T18:27:56Z",
"region": "us-west-2",
"resources": [
"arn:aws:events:us-west-2::event-source/aws.partner/stripe.com/ed_61PgtRTG5aTCIz98516PLsRGLISQK0Otk6FWKjBrcDia"
],
"detail": {
"id": "evt_1OrlfcFvFEcV7KhhYdemHC4q",
"object": "event",
"api_version": "2023-10-16",
"created": 1709836076,
"data": {
"object": {
"id": "txn_eb5d99ae-00b7-48c7-82da-b81875c066ca",
"object": "issuing.transaction",
"amount": -100,
"amount_details": {
"atm_fee": null
},
"authorization": "iauth_1MzFMzK8F4fqH0lBc9VdaZUp",
"balance_transaction": "txn_1MzFN1K8F4fqH0lBQPtqUmJN",
"card": "ic_1MzFMxK8F4fqH0lBjIUITRYi",
"cardholder": "ich_1MzFMxK8F4fqH0lBXnFW0ROG",
"created": 1682065867,
"currency": "usd",
"dispute": null,
"livemode": false,
"merchant_amount": -100,
"merchant_currency": "usd",
"merchant_data": {
"category": "computer_software_stores",
"category_code": "5734",
"city": "SAN FRANCISCO",
"country": "US",
"name": "fake-business",
"network_id": "1234567890",
"postal_code": "94103",
"state": "CA"
},
"metadata": {},
"type": "capture",
"wallet": null
}
},
"livemode": true,
"pending_webhooks": 0,
"request": {
"id": "req_id3MuDYoBgmN4d",
"idempotency_key": "6fbb7f75-0658-4989-989e-706fab3abe76"
},
"type": "issuing_transactions.updated"
}
}
I'm trying to map it to this class:
data class StripeEventEnvelope(
@SerializedName("id") val id: String,
@SerializedName("detail-type") @JsonProperty("detail-type") val detailType: String,
@SerializedName("time") val time: String,
@SerializedName("detail") val detail: Event, // Event class from Stripe SDK
)
I'm using Kotlin by the way
val stripeEventEnvelope = ApiResource.GSON.fromJson(event, StripeEventEnvelope::class.java)
Is it the correct way to deserialize the event payload?
sure
Unfortunately, I'm not familiar with EventBridge stuff either. I doubt anyone on our team is.
What exactly are you trying to do with the deserialized event payload?
I need to deserialize it to a class to be able to access values