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
102 stars 49 forks source link

Get Stripe commission when payment attempt is processed and response status is correct #566

Closed xalec30 closed 3 months ago

xalec30 commented 9 months ago

Is your feature request related to a problem? Please describe. hi how are you, I am implementing a point of sale with the sdk, and I need to reduce the amount of calls to stripe to make the payment flow as fast as possible, and I need to get additional information regarding the payment made.

Describe the solution you'd like be able to implement a response with additional information at the time of the payment process or in the case of implementing a manual capture, be able to obtain it in the capture.

nazli-stripe commented 9 months ago

hey @xalec30 what additional information do you need exactly? most of the calls to Stripe are managed by the SDK, what calls are you making and trying to avoid?

xalec30 commented 9 months ago

hello, I need additional information corresponding to the charge (transaction information) made when the payment has been made successfully by card, at this moment it only returns basic information, (amount, description, payment attempt, status).

I try to avoid making a call to stripe on the server side just to get extended information of the payment attempt and speed up the payment flow.

nazli-stripe commented 9 months ago

@xalec30 can you give a list of exact fields as documented on the Stripe API docs? https://stripe.com/docs/api/payment_intents

xalec30 commented 8 months ago

{ "id": "pi_1Gt0RG2eZvKYlo2CtxkQK2rm", "object": "payment_intent", "amount": 1000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_1Gt0RG2eZvKYlo2CtxkQK2rm_secret_NwTJsElj83lkl9ZDjSIHPdtDB", "confirmation_method": "automatic", "created": 1591920486, "currency": "usd", "customer": null, "description": "Created by stripe.com/docs demo", "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_configuration_details": null, "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, "redaction": null, "review": null, "setup_future_usage": null, "shipping": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null }

nazli-stripe commented 3 months ago

We added the missing fields RN SDK missing in this PR: https://github.com/stripe/stripe-terminal-react-native/pull/665 The list is limited to what is available by the Terminal iOS SDK [0] and RN SDK will continue to get updated as we add new fields to native SDKs.

[0] https://stripe.dev/stripe-terminal-ios/docs/Classes/SCPPaymentIntent.html