3

On the getting started page for Apple Pay, it says that Apple Pay supports "partial shipments." How is this implemented in practice? I know how to get a token from a successful PKPayment. Once I get that token, how do I use it to implement multiple sub-order payments through my payment gateway?

For example, say the user validates a total $100 purchase through Apple Pay of two separate suborder shipments ($40 and $60 each) and I now have an associated token for the $100 order. Because of restrictions on some networks, we can't capture each payment until the associated item has been shipped, and they ship at different times.

Do I have the ability to authorize and capture payments of any amounts using that token?

What is the best approach to authorizing and capturing those sub orders?

Do I auth for the total ($100) and then auth for each sub total ($40, $60) at shipment and then capture for each sub total? If so, then I will be potentially authorizing more than the necessary total ($200), and that doesn't seem right. Is it valid to just skip auth for the total, auth for each sub total, and then capture the sub totals as they ship?

chasew
  • 8,438
  • 7
  • 41
  • 48

1 Answers1

2

You can't capture an authorization more than once. For stripe you would need to save the token to a customer, and charge the customer for each shipment separately. This isn't only the best way it is the only way to do it.

Once you have a token and attach it to the customer object in stripe, you have the ability to charge it at any time & any amount up until the expiration date or if they remove the card from their apple pay account, like you would any other card regardless of the initial authorization.

The rest of your questions will vary by opinion as there are different ways of doing it, but here is how I would charge this type of order. I think this method benefits both the business and the customer, in addition to keeping stripe/apple happy. This isn't apple pay specific, I would treat most orders with these requirements the same. Also keep in mind apple pay supports it, but it is not required. You can collect all up front regardless of shipment dates.

  1. Generate token from PKPayment for $100
  2. Create customer(if needed) & add token to customer
  3. Create charge against customer using that card for $100 without capture
  4. Within 7 days assess expected shipping dates.
  5. Once assessment is complete immediately capture only the amount expected to ship within a week on the initial charge. In your example this is where I would capture $40 for the first charge. If nothing is expected to be captured issue a complete refund.
  6. Any shipments beyond the 7 days, create individual charges for the shipments using the customer object, not the token. Again in your example this is when the $60 shipment goes out charge that here.

As long as the second shipment charge doesn't happen to go out earlier than the 7 days this would prevent any authorizations overlapping resulting in holds of more than the initial amount at any given moment. I would treat almost any transaction like this apple pay or not.

hybrdthry911
  • 1,259
  • 7
  • 12
  • My question is more about whether I can authorize and capture as many payments (at any payment amounts) as I want with the token Apple Pay gives me (totaling more that the original transaction value).. because that token has the amount of the purchase encoded into it so it seems counterintuitive for that to be the case – chasew Oct 24 '14 at 15:58
  • From my conversations with stripe the new processing starting next week will require that the initial auth must be of the amount of the PKPaymentRequest. You won't need to capture it, but this will make things smooth for the customer when they look at their account. Once this initial auth is done, you can charge the customer like any other credit card. – hybrdthry911 Oct 25 '14 at 01:45
  • If you are going to downvote someone please go on and provide the "correct" answer... – hybrdthry911 Oct 25 '14 at 01:49
  • Downvote is because it didn't provide an answer to my question at all. Your comment is slightly more helpful. Neither though really answer whether I can make whatever auths and captures I want using the token I get from apple pay, or valid timeframes for use, or supposing I make an initial auth for the total what happens when the second sub total auth fails because then I have authed for $160 before capturing anything.. I need a detailed answer describing the accepted best auth/capture pattern for my $100 scenario in the question, not a comment on how to use stripe. – chasew Oct 25 '14 at 15:44
  • Can't remove downvote until you edit the answer anyway. – chasew Oct 25 '14 at 15:45
  • Thanks, very helpful. just to confirm, when you say "create individual charges for the shipments" in step 6, you are talking about additional auths/captures using the token generated in step 1? – chasew Oct 27 '14 at 19:37
  • Indirectly...it would use that token. You would charge the customer object not a token in this case. You would not generate a new token. A token itself can only generate one charge. By attaching it to a customer, you can create multiple charges using only one token. – hybrdthry911 Oct 27 '14 at 20:02
  • @hybrdthry911, I wanna do this with Braintree API. Consider this, I captured amount $100 already. But , due to return or exchange , i wanted to capture only $60, via doSale! Do I need to use same Token? But, it isnt working for this case.... any link pls! – Femina Mar 16 '15 at 14:26
  • You charged the customer $100 and captured that amount, but now you want to refund them some of that portion? You would need to issue a refund against the $100 charge – hybrdthry911 Mar 16 '15 at 19:40