Create 胖狐中转 Platform Top-Up Orders

Create pending payment orders for one or more Applications. Creation writes the order, but does not automatically complete payment; before payment, verify the price, package, and Application in the response.

Preparation

export PLATFORM_TOKEN='your account token'
export APPLICATION_ID='your Application ID'
export PACKAGE_ID='your Package ID'

API Overview

Item Content
Method POST
URL https://fox.platform.acedata.cloud/api/v1/orders/
Auth Account Token; OAuth token requires orders:write
Body JSON

Request Body

Single-Application orders use application_id + package_id; batch orders use corresponding-length application_ids + package_ids. Regular orders select a payment method in the subsequent /pay/ request. For iOS in-app purchase orders, pass pay_way: "AppleIAP" when creating them, and only one Usage package with metadata.apple_product_id and metadata.apple_price can be selected. Apple in-app purchases use independent preset USD prices and do not stack membership discounts, payment method discounts, or site markups; the amount charged in local currency in other regions is subject to the Apple payment confirmation page.

curl -X POST 'https://fox.platform.acedata.cloud/api/v1/orders/' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d "{\"application_id\":\"${APPLICATION_ID}\",\"package_id\":\"${PACKAGE_ID}\"}"

Response Description

On success, returns 201 and the newly created Order object. Key fields include id, price, discount, state, application_id/application_ids, package_id/package_ids, expired_at, and time fields. New orders are usually Pending, followed by calling Pay Order.

  • price is the payable amount calculated by the server based on the package, site markup, and discounts; do not calculate it on the client.
  • Returns 400 when the Package does not match the Application service or type.
  • Free and system-managed Packages cannot be claimed independently through the public order API.
  • Creating an order for an Application that does not belong to the current account will be rejected.