4

I'm developing a kind of Car Booking iOS Application; and I want to develop following kind of process for payment :

Want to implement Consumption based payment for my App Users. Rather than pre-payment; User will do Post Payment based on his Usage.

In my Application, User will book a Car ---> He can use it for as many Hours as he wants to use. E.g. he used it for 10 Hours ---> And at the time of submitting car back ---> System automatically deducts the money from his credit card for his usage.

So, e.g. Hourly Rate is 2$/Hour and User used it for 20 hours; than system will deduct 40 $(2*20) From his credit card.

My Plan is to Use Apple Pay,I got below information : https://developer.apple.com/apple-pay/get-started/

Transaction type : Authorization unknown amount & capture
Description : Authorize a transaction with unknown amount, and charge
the amount for the service later
Example : Taxi ride

I have read apple pay document and see apple pay video from here :

https://developer.apple.com/videos/play/wwdc2015/702/
https://developer.apple.com/apple-pay/get-started/
https://dzone.com/articles/integrating-your-ios-app-apple
https://developer.apple.com/apple-pay/Getting-Started-with-Apple-Pay.pdf

I have also refer following demo:

I'm buildingn my iOS Application in Objective C.

https://developer.apple.com/library/content/samplecode/Emporium/Introduction/Intro.html
https://github.com/prolificinteractive/applepay-demo
https://www.raywenderlich.com/87300/apple-pay-tutorial

also refer :

Paypal - charge customer an unknown amount at a later date

Now I want to know is there any best option than apple pay? Or how can I achieve above requirement using Apple Pay.

My main goal is to take automatic payment from user after he/she used my services.

Please give me your opinion for the same and How can I use Transaction type?

Thanks in Advance.

Community
  • 1
  • 1
SAMIR RATHOD
  • 3,512
  • 1
  • 20
  • 45
  • If you pre-auth for a higher 'ceiling' value with Stripe, upon capture it will release the remaining pre-authed amount (denoted as a refund). This is how you'd get around it. You need to limit how much is authorised, you can't just say 'anything'. – G0dsquad Mar 21 '17 at 15:43
  • @G0dsquad you are right but if you check : https://developer.apple.com/apple-pay/get-started/ it says that you can make transaction for "Authorize a transaction with unknown amount, and charge the amount for the service later", my question is how can I do? – SAMIR RATHOD Mar 23 '17 at 05:56
  • @SAMIRRATHOD Did you ever solve this issue? – Brad Thiessen Dec 20 '17 at 20:28
  • @BradThiessen Yes, I used Braintree Vault API for the same. – SAMIR RATHOD Jan 04 '18 at 11:00
  • @SAMIRRATHOD Can you tell me how you achieved it? a bit more elaborate pls. – Gowtham Raj Nov 11 '18 at 17:42

1 Answers1

4

Here is an explanation from apple developer pages:

If you do not know the actual cost when the payment is authorized (for example, a taxi fare), make a subtotal summary item using the PKPaymentSummaryItemTypePending type and a 0.0 amount. For the grand total, use a positive non-zero amount and the PKPaymentSummaryItemTypePending type. The system then shows the cost as pending without a numeric amount.

https://developer.apple.com/library/archive/ApplePay_Guide/CreateRequest.html#//apple_ref/doc/uid/TP40014764-CH3-SW2

Triinu
  • 41
  • 2