stripe / stripe-terminal-react-native

React Native SDK for Stripe Terminal
https://stripe.com/docs/terminal/payments/setup-integration?terminal-sdk-platform=react-native
MIT License
110 stars 50 forks source link

PaymentIntent is missing stripeId #327

Closed TheRusskiy closed 2 years ago

TheRusskiy commented 2 years ago

PaymentIntent is missing stripeId field on iOS:

// console.log
{
  "amount": 400, 
  "charges": [{"amount": 400, "currency": "usd", "description": "redacted", "id": "ch_3L3mAkCkW3uklGHp0IM3IByd", "status": null}], 
  "created": "1653592598000", 
  "currency": "USD", 
  "id": "pi_3L3mAkCkW3uklGHp0CjOMzGH", 
  "status": "requiresCapture"
}

According to types it should be present there. So either types are incorrect or this field is falsely missing.

https://github.com/stripe/stripe-terminal-react-native/blob/6202674b4b5b35c3a2101a98ca248705047765d3/src/types/PaymentIntent.ts#L4-L12

jdivock-stripe commented 2 years ago

ah, this is an internal concept to get around id being reserved word in iOS and shouldn't be in the public interface, let me remove it, thanks!