苹果内购丢单问题

2022-11-09  本文已影响0人  欧大帅Allen

问题描述:

在苹果内购财务报表里,10月13日有4笔订单,但是CRM里只看到了3笔。

问题分析:

用户付款后,网络不好,或者退出应用,导致没调支付接口。后台没有查到用户请求接口的记录。

内购流程设计有问题,应该在服务校验的时候生成订单号,接着,用户付款后,再把订单号和票据传给后台。这样就不会出现苹果内购付款了,但是后台完全查不到这个订单的情况。

解决方案:

iOS Invoice lookup API

Look Up Order ID

Get a customer’s in-app purchases from a receipt using the order ID.

URL

GET https://api.storekit.itunes.apple.com/inApps/v1/lookup/{orderId}

Sandbox URL

GET https://api.storekit-sandbox.itunes.apple.com/inApps/v1/lookup/{orderId}

orderId

The customer’s order ID from an App Store receipt for in-app purchases.

Discussion

Important

This endpoint isn’t available in the sandbox environment.

Call this endpoint to identify and validate a customer’s in-app purchases, based on their order ID.

When a customer contacts you for support, ask for their order ID and use that value to call this endpoint. Customers can retrieve their order ID’s from their purchase history on the App Store; for more information, see See your purchase history for the App Store, iTunes store, and more. The App Store also sends customers an email receipt with an order ID each time they make in-app purchases.

A successful response with an OrderLookupStatus value of 0 contains an array of one or more signed transactions for the in-app purchase based on the order ID. Use the decoded transaction, JWSTransactionDecodedPayload, to identify information such as the productId and purchaseDate that you can use to provide customer support.

A response with an OrderLookupStatus value of 1 has an empty signed transactions array.

The App Store Server API returns information based on the customer’s in-app purchase history regardless of whether the customer installed, removed, or reinstalled the app on their devices.

参考文章:

iOS StoreKit 2 新特性解析

苹果 iOS 内购三步曲:App 内退款、历史订单查询、绑定用户防掉单!--- WWDC21

苹果 AppStore 财年和账单那些趣事

上一篇 下一篇

猜你喜欢

热点阅读