How to do payment using stripe - ios

I am using Stripe to make payment in my application. I got the token Successfully.
I want to know that how the charges will be done, as there is no changes reflected in my Stripe dashboard. I'm using my Stripe Account TestPublish Key.

Tokens only represent a card or payment method, not an actual transaction.
Once you've collected and tokenized a customer's payment information, you need to send the token to your backend server so you can use it in an API request, e.g. a charge creation request or customer creation request.
You can find more information in this tutorial: https://stripe.com/docs/charges

Common error - you need to test on a real device, not the simulator. Just one of the gotchas of the Stripe API.

Related

How to send payment to the customer from Stripe account using API in Rails?

One of my client Ruby on Rails project have a functionality of get payment from customer in his stripe account.
Now, He needs to pay that payment to the item owner after deducted commission. So, how we can pay from stripe account to particular customer account using API in Rails?
I have checked many API's but not clear which exactly use for it.
Any one have a idea or experience in it?
Thanks
See the Stripe guide on Using Checkout with Rails.
I am not positive if a customer token can be used to send funds to, but if so or not, the following still applies.
If the customer has a connected account (or customer token), you can then use "transfer" to transfer the funds to them.

Future payment with iOS Stripe SDK

Using the iOS SDK for Stripe, can we do the following
Create a customer profile where the customer id can be sent and stored to the backend
Add, edit, delete credit cards to the customer profile
Card can be charged automatically from the backend
Note that, once the user make a payment via stripe, we ask them to allow auto-payment next time the balance goes below a certain level. So, it is not periodic subscription. But it is a permission in advance, to charge later.
For a single payment, the SDK takes the card info and provides the token. Token passed to server where the payment is finally process. This looks very nice and secured.
I do not want to store the card info in the iOS app, also not in server. But does stripe take the responsibility to store it and allow the backend to charge it later? I need a way so that server can communicate with stripe with a unique id and amount, so that stripe accepts the request and make the payment.
You can ask for webservice to your webservice developer which can make APIs to create customers in stripe account and store its customer_id in database so for next all payment you can make payment using customer id. Stripe will store card details in its database so no need to store card details at our side.

How can I use PayPal's credit card vault in RoR without having the CC information hit my server?

I have a client who is dead-set on using PayPal for Credit Card processing. The application must be able to charge cards without the user entering the information every time. Digging around, I've found the Credit Card Vault feature, which would at least let me store credit card information for future use. Unfortunately, as far as I can tell, there's no JS based tokenization procedure in the RoR Paypal SDK gem -- in order to store data in the vault, the information first has to hit my server. Which means I have to provide PCI compliance.
Is there any way to tokenize a credit card for later use in Paypal that will let the token be valid indefinitely?
In the REST API they call it the vault and they have documentation specific to it.
In the Classic API it's called a reference transaction, in which case you would use Payments Pro (DoDirectPayment or PayFlow) to process an original authorization or sale transaction, and then pass that transaction ID into future calls to process payments with the card data PayPal has saved on their server.
If using DoDirectPayment you would use DoReferenceTransaction. If using PayFlow you would just change some of the parameters in the typical request to make it a reference transaction. The doc links above cover all of that.
As long as you aren't saving any card data on your server then the only thing you'll need to be compliant is an SSL certificate on your site, but that's becoming a recommended practice regardless of whether or not you're processing payments.
If you want to completely avoid hitting your server then you'll have to go with Payments Advanced, which embeds a PayPal hosted iframe into your site. I don't think it supports reference transactions, though, and it's a lot more limited than REST or Payments Pro.

Error in stripe payment using node js

i am using stripe payment in our application. Its working fine in development but gives error on live app with US card.Testing taking place in India using US card.
Below is error log in node js.
Thanks in advance.
This error happens when you try to take an application_fee but you don't provide the access_token from your connected user as the second parameter to the Create Charge API.
To take an application_fee you need to be using Stripe Connect which means you are creating a Charge on behalf of a connected user. To do this, you need to follow those steps:
On the front-end you need to use the publishable_key you got from the connected user when going through the Connect flow. You should not use your API key.
Once you get a card token you send it to your server where you will create a charge. There, you should not set your API key but you should pass the access_token of the connected user as a second parameter to the Create Charge API. You can see some example code in the documentation showing how to collect fees.

Active merchant and Paypal API for recurring payment

I have few questions on paypal's recurring payments, I went trough the paypal documentation to find some answers but, it didn't help me much.
Here are the stuffs that I need to know, hope someone can help me on these.
I'm using paypal's standard payment account. So far I managed to create recurring payments with paypal by posting NVP's to paypal from merchant website to paypal.
Now I need to show recurring payment profiles on merchant web site. So that customers can cancel, modify recurring payments from merchant website without redirecting to paypal.Is this possible?
Think I should use paypal's SOAP API for this as I can't get the job done with NVP API. So I installed active merchant as described in this post. But I always get an error
This transaction is invalid. Please
return to the recipient's website to
complete your transaction using their
regular checkout flow.
from paypal and it never send me the token back.
Also I got this on my log
Security header is not
valid
Is it because I use sandbox API credentials or is it because I can't use paypal's standard account with SOAP API?
Usually the "security header is not valid" response comes from using sandbox credentials in the live environment or vice-versa. AM will use the sandbox when your Rails app is in development mode, so be sure you are using the right set of credentials.
When I was integrating PayPal's recurring payment profiles into the SaaS Rails Kit (using ActiveMerchant) I ended up just canceling a user's current profile and creating a new one when they wanted to change their subscription.

Resources