#juan_givestar
1 messages · Page 1 of 1 (latest)
👋 happy to help
so basically you want to test this out?
Hello, I've tested adding ,02 to the final amount to charge, in order to trigger the specific offlie_pin_code
but when I get the API response, I only get a generic DeclineByStripeAPI which is not helpfull, as I need to know speifically when is an offline_pin_codeerror
would you mind sharing the request ID?
Hey, I work with Juan as well.
This flow is still in development so we do not have a request ID
We could trigger one in staging (test mode)? Would that help?
As it is a physical card test we have been using the .02 issue as Juan has said.
But the error that generate is DeclineByStripeAPI which i am not sure will work in production?
This flow is still in development so we do not have a request ID
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
each request to the Stripe API has a request ID
where did you get that error from? from the Android SDK?
This is what is returned by stripe whilst we are working on this feature
where exactly?
We're using the SDK from the react native
tap to pay is only available with our Android and iOS SDKs
you're refering to this https://stripe.com/docs/terminal/payments/setup-reader/tap-to-pay right?
on the iOS side is using the native sdk 2.23.1'
we are focusing now on the iOS side of it as we need to sort out this specific offline_pin_code flow with Apple ASAP.
ok I'm having trouble understanding though where are you getting the error from
sure that error will come after the app process the tap to pay payment
when the payment is successful or not
would you mind sharing your code?
sure, give me 2 secs
const { paymentIntent, error } = await processPayment(paymentIntentId);
if (error) {
recordError(error, 'useStripeToPay:::_processPayment');
console.log({ error });
if (
error.code === 'DeclinedByStripeAPI' &&
error.message.includes('This transaction requires chip and PIN')
) {
setAlertTitle('Offline PIN code error');
onFailedPaymentCallback(error);
return;
}
setAlertTitle('Transaction Failed');
if (setConfirmationText) {
setConfirmationText('Try Again');
}
extraInfo.current = error;
setShowAlert(true);
onFailedPaymentCallback(error);
return;
}
if (!paymentIntent) {
setAlertTitle('Something went wrong');
setAlertMessage('Tap on Phone error');
if (setConfirmationText) {
setConfirmationText('Okay');
}
extraInfo.current = {
code: CommonError.Failed,
message: 'No paymentIntent',
};
setShowAlert(true);
return;
}
if (paymentIntent?.status === 'succeeded') {
setAlertTitle('Payment Success');
setAlertMessage('');
extraInfo.current = {
code: CommonError.Unknown,
message: '',
};
setShowAlert(true);
onSuccessPaymentCallback();
}
};
the method processPayment come from the oficial Stripe hook useStripeTerminal
rigth now we're filtring the error when is an offline_pin_code scenario with the specific message This transaction requires chip and PIN which I dont think is ideal one
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
Could you print the whole error object for me please?
sure give me 2 sec
"message": "This transaction requires chip and PIN. In testmode, using a physical test card with designated amount ending values produce specific decline responses. See https://stripe.com/docs/terminal/references/testing#physical-test-cards for details.",
"code": "DeclinedByStripeAPI"
}```
I see what you mean. It might be a bug, or just a test mode issue. I will report this to the responsible team, but for now that's what seems to be a limitation.
Thanks to understand.
In anyways, do you know which error throws same scenario. on production?>
Test mode is supposed to work the same way as Live, so I think it's the same.
ok thanks
Happy to help.