question

joehot200 avatar image
joehot200 asked

What happens if the purchase is never confirmed?

Hi,

I was wondering, what happens if I make all of the purchasing API calls, except for ConfirmPurchase on the client?

This scenario could occur if, for example, a players' client crashed (or they just closed the client) however had already opened a payment link and then purchased the item.

Would the item still appear in the players' inventory?

Edit: To clarify, I'm referring to purchasing with RM, not ingame currency.

Player Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andy avatar image
Andy answered

In that case, any items and virtual currency that had been purchased would not be granted to the player. The ConfirmPurchase call is what triggers the transfer of virtual goods into the player's account. Without that call, nothing will ever trigger the transfer.

This is explained in more detail here: https://api.playfab.com/docs/tutorials/landing-commerce/non-receipt-payment-processing

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

joehot200 avatar image joehot200 commented ·

How then, do I ensure that a player receives items they paid for, if their client crashed?

0 Likes 0 ·
brendan avatar image brendan joehot200 commented ·

Which payment system do you have in mind? If it's any receipt validation system (iOS, Android, Amazon, Windows) or entitlement system (PlayStation, Xbox), what you're doing is passing the receipt/entitlement to us, and we put it through a number of validation steps, then put the item in the player inventory. If the client crashes, you'd just retrieve the receipt/entitlement from the payment provider and send it to us.

If you're using one of the non-receipt payment systems, like Facebook, PayPal, Steam, or Xsolla, they're designed to use a cart-like model. When the player is charged for their purchase, either (varies between payment providers) the items are already in their cart, or there's a final confirmation stage where you tell us to check with the payment provider if the purchase is complete, and then we add the item to the player inventory. If the client crashes in that case, you would simply call the ConfirmPurchase API endpoint for the transaction the next time the player is online.

1 Like 1 ·
joehot200 avatar image joehot200 brendan commented ·

Cheers, Brendan. I'm using PayPal.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.