#garv8772
1 messages · Page 1 of 1 (latest)
What sort of transaction ID you're looking for? What APIs are you using for your integration?
I'm using mobile payment element with test keys https://api.stripe.com/
Are you creating PaymentIntents? If so you can just retrieve the PaymentIntent using pi_xxxx ID
I have integrated android sdk with prebuilt Ui and it is working fine in test mode, Now I want transaction id which is unique for every transaction
Sorry, having a hard time understanding the ask. There's no object called transaction ID when it comes to mobile integrations.
Can you clarify your question? Are you referring to any docs? If so, where exactly are you seeing "transaction id"
Is there any thing which is unique for every transaction ?
That would be the PaymentIntent ID
as I mentioned earlier
They should be unique in test mode too
fun onPaymentSheetResult(paymentSheetResult: PaymentSheetResult) {
if (paymentSheetResult is PaymentSheetResult.Completed){
Toast.makeText(this, "Payment Done", Toast.LENGTH_SHORT)
.show()
}
} How I can get PaymentIntent ID in this function ?
The PaymentIntent would be the same one that you pass to PaymentSheet earlier in your code
https://stripe.com/docs/payments/accept-a-payment?platform=android&ui=payment-sheet#android-collect-payment-details
can you please send me that line of code which you have mentioned
In the section that hanzo linked to, it shows retriving a PaymentIntent ID from your backend and using it
if (result is Success) {
val responseJson = result.get().obj()
paymentIntentClientSecret = responseJson.getString("paymentIntent")
customerConfig = PaymentSheet.CustomerConfiguration(
responseJson.getString("customer"),
responseJson.getString("ephemeralKey")
)
val publishableKey = responseJson.getString("publishableKey")
PaymentConfiguration.init(this, publishableKey)
}
}```