If we using upi://pay?pa=upiid#sbi&pn=JOHN BRITAS AK &cu=INR" class="upi-pay1" then App showing unsafe - payment

IF I am using upi://pay?pa=upiid#sbi&pn=JOHN BRITAS AK &cu=INR" class="upi-pay1" to invoke Upi App for Payment, then Payment supported App Showing unsafe Payment and decline that payment.
What should I do about this?
Hey, IF I am using upi://pay?pa=upiid#sbi&pn=JOHN BRITAS AK &cu=INR" class="upi-pay1" to invoke Upi App for Payment, then Payment supported App Showing unsafe Payment and decline that payment.
What should I do about this?

Related

how to receive Issuer field from payment method of Stripe API

When I visit show page of Payment Method (pm_1MZe3SEoS7yEEpyZtE8jW9JC) from dashboard.stripe .com then I can see the "Issuer" field that equal "Stripe Payments UK Limited", but CAN NOT receive this data from Stripe API.
use stripe-ruby client
use last api version: 2022-11-15
screenshots:
show page of Payment Method
require 'stripe'
Stripe.api_key = "api_key"
payment_method = Stripe::PaymentMethod.retrieve('pm_1MZe3SEoS7yEEpyZtE8jW9JC')
payment_method.?
could you please insert documentation API are you reading?
generally, it is not obvious that this information is exposed by API, so you have to read documentation before.

Creating a subscription using bank account number using stripe js in node js

I have created subscription by accespting credit/debit card number, exp month, exp year and cvc from front end angular app and creating
Customer
Product
Product Price
Payment Method
Subscription
In payment method i provide following details:
async function createPaymentMethod(data) {
let body = {
type: 'card',
card: {
number: data.card?.number,
exp_month: data.card?.exp_month,
exp_year: data.card?.exp_year,
cvc: data.card?.cvc
}
};
return await stripe.paymentMethods.create(body);
}
Now i want to create payment method but want to use customer's bank account number but i am unable to find a way to do it. I want to add "type: bank_account"
Note: I am using Strip JS and Node JS. All of this I want to do on server side i.e node js
Collecting Credit Card server-side is a bad idea, since you will expose yourself to the burden on PCI-Compliance. You would want to review Stripe's Integration Security Guide. Generally you would want to use client-side SDK to collect credit card information instead.
To the question of a bank account, it depends on which specific PaymentMethod you're gonna use (which country's bank transfer?) Ie. If you are talking about ACH in the US, you should follow the ACH Guide. Similarly it will collect bank account information client-side in exchange of a token, then passing it up to your back end.

Add Stripe Credit Card without Payment in SwiftUI

I am struggling to find a solution that isn't UIKit, or one that requires you make a purchase.
My project is trying to integrate Stripe in SwiftUI, using node.js Firebase Functions for backend handling.
I built a STPPaymentCardTextField in UIViewRepresentable. Which allows me to obtain credit card details for the customer via State.
#State var params: STPPaymentMethodCardParams = STPPaymentMethodCardParams()
SwiftUI TextField
StripePaymentCardTextField(cardParams: $params, isValid: $isValid)
Then we can build paymentMethodParms like..
let paymentMethodParams = STPPaymentMethodParams(card: params, billingDetails: billingDetails, metadata: nil)
Now I could easily pass the credit card details to my backend and add the card manually using
Function for adding payment method
const createPaymentMethods = functions.https.onCall(async (data, context) => {
const paymentMethod = await stripe.paymentMethods.create({
customer: '{{CUSTOMER_ID}}',
payment_method: '{{PAYMENT_METHOD_ID}}',
}, {
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
}
but I am understanding this is bad practice.
I found this post which might be a "duplicate", but is the closest relevant answer. Adding customer's Credit card info in stripe. That user however is using reactjs and wanted to store credit card details in a database, where I only want to pass it to Stripe.
Is there not a way I can send the credit card data to Stripe, get a paymentMethod ID back, and pass that to my backend or something? I have already solved subscriptions, and purchase charging, I just can't get a credit card setup without going through the payment setup process. I want the user to add a credit card manually on creating a new account and/or in settings.
Can you call stripe-ios's createPaymentMethod() function [0]? That is a client-side function your SwiftUI app would call to tokenize the card details from paymentMethodParams into a PaymentMethod object. You can then pass that ID server-side to attach to a Customer.
[0] https://stripe.dev/stripe-ios/docs/Classes/STPAPIClient.html#/c:#CM#Stripe#objc(cs)STPAPIClient(im)createPaymentMethodWithPayment:completion:
To expand on #hmunoz's answer and the way I got this to work is as follows.
Create your user a Stripe account. https://stripe.com/docs/api/customers/create
Log the customers stripe id in your user's Firestore database for easy reference.
Create an "Add card" view to your frontend and call to the add payment method function. https://stripe.com/docs/api/cards/create
Upon checkout as long as the customer's stripe ID is passed in the payment intent it should populate with their saved payment methods.
In summary it is best to keep track of your user that is signed in so that you can do any CRUD needed throughout.

Stripe adding paymentMethod to trial subscription and later validate credit card

I'm working on stripe integration with react node.js
While creating a subscription without trial, I have no issues, and all use-cases are much simple.
But, I'm trying to create free trial without collecting credit card details, later when trial expired, I would like to collect credit card details
Server side: Creating Trial Subscription without payment method:
const subscription = await stripe.subscriptions.create({
customer: customer.id,
items: [{ price: priceId }],
trial_end: expiredAt.unix(),
expand: ['latest_invoice.payment_intent'],
});
ClientSide: Later when trial expired, I would like to collect credit card details(paymentMethod), check if user action is required due to failures or 3ds and update the subscription by updating the customer's default payment_method:
const updateCustomerDefaultPaymentMethod = await stripe.customers.update(
customerId,
{
invoice_settings: {
default_payment_method: req.body.paymentMethodId,
},
}
);
How can I update the subscription to perform paymentIntent or charge the user, and return to client same subscription object with status 'in_complete' same as when creating subscription without trial_period?
Currently when running my code, I keep getting status='active' because the first invoice is in status='paid' with price of '0$'.
In the case of a free trial, creating a subscription won't result in an initial payment, and Stripe will instead create a SetupIntent under the hood for you automatically. This SetupIntent is meant to be used when collecting the customer's payment method. So at any point during the trial, the customer would need to return to your app to enter their credit card details, which you would then save using the SetupIntent:
subscription.pending_setup_intent
Confirm the SetupIntent with the collected card details
Once the payment method is setup and saved to the customer (as the default payment method for invoices) it will be used to pay for the subscription's first invoice when the trial ends. The first payment after a trial is considered an off-session payment (last FAQ), so if that payment fails Stripe will attempt to recollect the payment using the usual smart retries and dunning functionality.
In a nutshell, you need to use the SetupIntent that's created (and attached to the subscription) to save the user's payment information.

why is the node paypal payer_id is not being returned

In my node app the paypal response is not sending me a payer_id param
[ { field: 'payer_id', issue: 'Required field missing' } ]
what am i missing?
thanks
Ian
#iancrowther If you would not mind elaborating more, what stage are you needing the payer_id?
1) If you were trying to accept a payment via paypal, you direct the user to the approval_url on PayPal so that user can approve the payment. After the user approves the payment, PayPal redirects the user back to the return_url you specified, and appends the payer ID in return url as PayerID. The documentation for the requests are at
https://developer.paypal.com/webapps/developer/docs/integration/web/accept-paypal-payment/#execute-the-payment
2) If you are storing a credit card in vault for secure storage and charging later, you can include a unique payer_id in the request. The docs are at
https://developer.paypal.com/webapps/developer/docs/integration/direct/store-a-credit-card/

Resources