Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StripeTerminal.collectPaymentMethod erroring with "A required parameter was invalid or missing" #418

Closed
3 of 8 tasks
yasgreen93 opened this issue Jan 3, 2025 · 1 comment

Comments

@yasgreen93
Copy link

yasgreen93 commented Jan 3, 2025

Platform

  • Web
  • iOS
  • Android

Describe the bug
I have followed the instructions in the readme here and I consistently get the following error:

{"errorMessage":"A required parameter was invalid or missing.","message":"A required parameter was invalid or missing."}

My code is as follows:

const paymentIntentResponse: { response: HttpResponse; status: string } = await createTtpPaymentIntent({
  invoiceId: invoiceStore.invoice.id,
  amount: selectedPaymentAmount.value,
  tipAmount: selectedTipAmount.value,
});

// paymentIntent is in this format `pi_***_secret_***`
const { client_secret: paymentIntent } = (paymentIntentResponse.response as HttpResponse).data;
// Show the Stripe Tap-To-Pay screen
const paymentMethodRes = await StripeTerminal.collectPaymentMethod(paymentIntent);
// Error returned: {"errorMessage":"A required parameter was invalid or missing.","message":"A required parameter was invalid or missing."}

I have tried passing in pi_*** as well as pi_***_secret_*** and both give the same error: "A required parameter was invalid or missing."

What am I missing here?

Thank you in advance.

Additional context:
I have tried using v6.4.1 and v6.2.1, both are producing the same error on iOS and Android.

Expected behavior
The tap to pay screen appears allowing you to take payment.

Using Function:

  • Payment Sheet / Payment Flow
  • Apple Pay
  • Google Pay
  • Identity (@capacitor-community/stripe-identity)
  • Terminal(@capacitor-community/stripe-terminal)
@yasgreen93
Copy link
Author

Closing this as my issue was related to not passing in onBehalfOf param when connecting to a reader. Passing that in fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant