Stripe card authentication passed from iPhone, failed on server - ios

The card was validated by Stripe's iPhone code, where I create a card, send to their server and receive a stripe token.
When I charge that token, the server receives an error from Stripe saying invalid CVC.
I checked Zip code & CVC verification required in my account settings.
Is there a way to authenticate the credit card prior to charging it?

You can pre-validate any or all of the card data beforehand—check out the Validation section of the documentation.
To deal with ZIP code mismatches or incorrect CVV data, you'll have to implement appropriate error handling on both your server and client.
If you haven't worked with other payment processors before, this is not specific to Stripe. CVV is generated with private encryption keys and can only be verified by trusted parties (i.e. the issuing banks). The payment card industry's not in the habit of enabling brute force attacks, so you must actually post a charge to determine whether card validation data is correct.
There is no way to know the data is correct until you attempt a charge—if that charge is rejected for reasons of incorrect data, that's how you know it's incorrect. It's how the payment network functions, and it's how your application must function.

Related

Check status after verification - Twilio Verify

I have a web app with following 3-step flow using Twilio Verify for email verification:
Creating verification code with Verify
Checking verification code with Verify
Create user account in my web api
After a successful Twilio Verify verification code check (step 2), I need to be able to do another Twilio Verfy call to ensure that the email was verified before a user account is actually created in my web api (step 3). But since the SID is deleted after successful email verification, I get following answer for a GET request to:
https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications/{Sid}
{
"code": 20404,
"message": "The requested resource /Services/VAxxx/Verifications/VExxx was not found",
"more_info": "https://www.twilio.com/docs/errors/20404",
"status": 404
}
Now, for the Frontend, it's easy: I move to the final account creation step only if the email was verified successfully.
But, for a true stateless Backend, after accepting the Frontend request I first need to double-check with Twilio if the email was actually already verified.
True stateless in the sense that I do not want to store in a DB if an email was already verified or not. (This is already done by Twilio)
How can I do that? I didn't find the right API in the Twilio documetaion.
Twilio developer evangelist here.
I understand that you would like to get the information that appears available in the logs, however that is not available through the API. Once a verification has succeeded (or timed out after 10 minutes, or reached the maximum number of incorrect attempts) it is deleted and you can no longer access it through the API. I assume this is to prevent replay attacks, but I’m not on that team, so don’t know all the reasons behind it.
The result of this is that you cannot call on the verification check more than once from your code.
You will have to store the state within your own system because the API will not store that state for you. Much like during login with 2FA you would need to store the state that a password had been successfully entered.

Generating token in Stripe on server Side

I want to create some tests to check my subscription failed processus.
At first I use a good working card (42...) and subscribe then I want to update the card of the Stripe Customer with the bad working card (40...4) to check the code of my webhook in case of failed subscription.
The problem I encounter, is to update a customer card, I should have a token, but my tests are written only server side (no javascript).
Is there any way to generate a token from server-side with Stripe?
Thanks in advance

BalancedPayments : Credit card Authorization failure or Card has become invalid?

I am writing a web application where the buyer can pay with a card she has previously used to purchase.
I need to know at a level of granularity:
when the card has authorization failure (usually due to insufficient funds or line of credit) or
when the card has become invalid (for example, the card is already closed) .
Is there a response.status in BalancedPayments response indicating such response? I seem to dig in the API reference and could not find anything.
BalancedPayments : Credit card authorization failure or card has become invalid?
https://docs.balancedpayments.com/current/api.html?language=bash#create-a-new-debit
1) You will receive notice of an authorization failure as soon as you attempt to debit the card and will be returned one of the following error codes: https://github.com/balanced/balanced-api/blob/master/errors.rst
2) Unfortunately, there is no way to determine if a card has suddenly become invalid. You will only know if a card has been closed or is now invalid by attempting to debit it and receiving a failure notification.

Paymill pre-create card payment

Is there a way to pre-create a card payment for Paymill? When creating a Paymill Payment object we need a token, this token is got by provide card info and amount/currency. With the first transaction of this payment object, Paymill require the same ammount/currency as the value we use to get the token. So the user can't create a payment for future transaction because they don't know how much they pay for the first transaction?
Thanks
you could do it in the following way. Create a token with an amount/currency for example 100 Euro (but not smaller than 1 Euro!). Afterwards make directly with this token a preauth transaction. You get an paymentobjectid as response and the creditcard is checked if it is valid and has at this time the wanted amount (limit is not exceeded). This preauth is valid for 7 days and afterwards it is deleted automatically or your make a reversal of the preauth. With the paymentobjectid you can than make another recurring payment with a different amount.
Best,
Christian

PayPal Sandbox - CreateBillingAgreement call returns Internal Error (10001)

I'd appreciate any help with this, I've run around in circles trying all sorts of combinations with the PayPal Api - but I'm hitting a brick wall on this one.
I'm looking to call the CreateBillingAgreement method but each time I do it fails and reports a 10001 'internal error' from paypal in the response.
I have a valid token and I'm using version 84.0. I've successfully called SetupExpressCheckout and DoExpressCheckout, both of which succeed and the payment goes through. I'm setting up a future payment / pre-authorisation on the SetupExpressCheckout and the user agrees to that no problems.
​Do I need to change settings on the merchant in the sandbox? Am I calling things in the wrong order maybe? (SetExpress, GetExpress, DoExpress, CreateBilling)?
​I'm looking to use this billing agreement to allow a reference transaction in the future. I'm having a test account 'pay' using paypal and not forwarding any credit card details, the payment is for a digital service with no delivery (no shipping is set, no addresses or delivery costs are involved). The overall goal is to provide a one-click re-order button, whereby no details need to be entered by the customer.
I'm using the C# api in asp.net 4, or more specifically I've created Service References from the paypal sandbox wsdl and I'm using those in asp.net.
​Any and all help is appreciated - thanks.
​Russell.
You don't need to call CreateBillingAgreement if you're specifying billingtype MerchantInitiatedBilling in your SetExpressCheckout and DoExpressCheckoutPayment API call. CreateBillingAgreement is only necessary if you don't want to call DoExpressCheckoutPayment.
If MerchantInitiatedBilling is set, DoExpressCheckoutPayment will already return a billing agreement ID, which you can use in DoReferenceTransaction.
I don't have access to an example at hand, but will update this post as soon as I've found one for you.

Resources