#Randomuser2022

1 messages · Page 1 of 1 (latest)

solid idolBOT
upper remnant
#

Hi there, what do you mean call back log?

loud elm
#

when the payment is completed, it'll write back to our database

#

/alipay/v1/payment/event

upper remnant
#

OK, so you want to listen to payment_intent.succeeded events?

loud elm
#

yes

#

{
"id": "evt_3N1mUAEydrSRkIrF1KOnzWuE",
"object": "event",
"api_version": "2022-11-15",
"created": 1682669927,
"data": {
"object": {
"id": "pi_3N1mUAEydrSRkIrF1mUzFUK8",
"object": "payment_intent",
"amount": 14660,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 14660,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3N1mUAEydrSRkIrF1mUzFUK8_secret_4BjDWpwHQJnzJmMVwqbjDslpi",
"confirmation_method": "automatic",
"created": 1682669818,
"currency": "usd",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3N1mUAEydrSRkIrF1StgMJNK",
"livemode": false,
"metadata": {
"sfid": "a237h000000ZTOtAAO"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1N1mVuEydrSRkIrF7mMFxGz5",
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": "req_54OGLzwbPBFupb",
"idempotency_key": "0491345f-e469-4bc0-8976-495baca94bdd"
},
"type": "payment_intent.succeeded"
}

#

here's the request

#

the event we want to check for the payment intent has expired

upper remnant
#

There's no expiration date for a PaymentIntent? Perhaps you mean a checkout session?

loud elm
#

can't view the detail

upper remnant
#

You are right, because this event is more than 30 days old.

upper remnant
loud elm
#

ooh thanks! and i'd like to know why this is pending?

#

i see that it's 400

upper remnant
#

Is it a different event? can you share with me the ID?

loud elm
#

pi_3NDML5EydrSRkIrF14Ui0sch

#

yes, it's a diff

#

because the previous one has expired

upper remnant
#

OK, the webhook event is pending because your webhook endpoint returns 400 instead of 200.

#

The response from your webhook endpoint is

#

I'd suggest you to check your webhook endpoint and make sure it returns 200 immediately upon receiving a webhook event

loud elm
#

ok we figured it out

#

thanks!

upper remnant
#

No problem!

loud elm
#

we found that it's due to the automatic payment method we have in our code. now we remove it so it return 200.

#

have no other questions, thanks