1. Trade Details
Infinia API
  • Infinia E-commerce API
    • Introduction
    • API overview
    • Request and Response parameters
    • Encryption and Decryption
    • Account Binding
      • Account Binding
      • Account Binding Status Query
    • Trade Details
      • Trade details upload
      • Trade Details Upload Status Query
        POST
    • Query
      • Platform Account Balance Query
      • Seller's Available Revenue Share Query
      • Daily Revenue Sharing Download
    • Revenue Sharing
      • V2 FX Revenue Sharing
      • V2 FX Revenue Sharing Status Query
      • V1 Revenue Sharing
      • V1 Revenue Sharing Status Query
    • FX
      • Real-time rate
    • Webhook
      • Seller status notification
    • Appendix
      • System Code
      • Product types
      • CipherRsaUtil.java
      • Templates: Trade_details.csv
      • Templates: Trade_details_error_file.csv
      • Templates: Revenue _sharing_statement.csv
      • Log
    • Schemas
      • Schemas
        • ErrorBody
        • AccountBindingRequestData
        • AccountBindingResponseData
        • AccountBindingQueryRequestData
        • AccountBindingQueryResponseData
        • TradeDetailsUploadStatusRequestData
        • TradeDetailsUploadStatusResponseData
        • AccountBalanceQueryRequestData
        • AccountBalanceQueryResponseData
        • AvailableRevenueQueryRequestData
        • AvailableRevenueQueryResponseData
        • RevenueSharingRequestData
        • RevenueSharingResponseData
        • RevenueSharingStatusQueryRequestData
        • RevenueSharingStatusQueryResponseData
  • Infinia Payment API
    • Merchant
      • Merchant SignUp
      • Merchant Query
      • Merchant Webhook
    • Beneficiary
      • Beneficiary Create
      • Beneficiary Update
      • Beneficiary Query
      • Beneficiary Delete
      • Beneficiary Webhook
    • Payment
      • Payment Quote
      • Payment Fund
      • Payment Query
      • Payment Webhook
    • Account
      • Account Balance
  • Infinia 结汇付款 API
    • 客户实名认证
      • 客户实名认证
      • 客户实名认证状态查询
    • 结汇入账
      • 制单请求
    • 提现
      • 提现
    • 资金查询
      • 资金状态查询
    • 商户回调(示例路径)
      • 实名认证状态异步通知
      • 入账异步通知
      • 结汇成功/失败异步通知
      • 提现到账异步通知
    • Schemas
      • 统一加密请求公共字段
      • 统一加密响应公共字段
      • RSA 加密传输值
      • 实名认证申请请求报文
      • 实名认证申请响应报文
      • 实名认证状态查询请求报文
      • 实名认证状态查询响应报文
      • 制单请求报文
      • 制单响应报文
      • 提现请求报文
      • 提现响应报文
      • 资金状态查询请求报文
      • 资金状态查询响应报文
      • 实名认证状态回调请求报文
      • 入账状态回调请求报文
      • 结汇状态回调请求报文
      • 提现状态回调请求报文
      • 实名认证申请明文请求(中国大陆企业)
      • 日期或长期
      • 最终受益人
      • 实名认证申请明文响应
      • 实名认证状态查询明文请求
      • 实名认证状态查询明文响应
      • 实名认证状态回调明文请求
      • SFTP 交易明细 CSV 行
      • 制单明文请求
      • 制单明文响应
      • 入账状态回调明文请求
      • 结汇状态回调明文请求
      • 提现明文请求
      • 提现明文响应
      • 提现状态回调明文请求
      • 资金状态查询明文请求
      • 资金状态查询明文响应
  1. Trade Details

Trade details upload

Description:#

The trade details upload process involves securely transferring transaction data from the e-commerce platform to the Infinia system using the SFTP (Secure File Transfer Protocol). This method is essential for ensuring that all sales, returns, and exchanges are accurately recorded and transmitted securely. The use of SFTP allows for the safe transfer of large datasets, maintaining data integrity during the upload process. Use this process to ensure your trade data is correctly and securely uploaded to Infinia.
SFTP account and address provided by Infinia

Trade details:#

SFTP File Naming Rules: YYYYMMDD_SellerID_E-CommercePlatformFileId.csv
Example: 20240815_123456_1q2w3e4r5t6y.CSV (template in Appendix)

📌 Order Upload & Payout Allocation Logic#

1️⃣ SFTP Upload → Split into Individual Orders#

Each SFTP file uploaded by the client may contain multiple order records.
Our system automatically parses the file and splits it into individual orders, where each order represents its own available payout credit.
The total withdrawable balance of a seller = the sum of all uploaded order credits.

2️⃣ Rules for Allocating Order Credits During Payout#

When a payout is initiated, the system allocates credits based on the following rules:

✦ Rule 1: Oldest Order First#

Orders are sorted chronologically by their credit availability timestamp.
The system always consumes credits from the oldest valid order first,
even if that order was uploaded more recently.

✦ Rule 2: Full Order Consumption (No Partial Usage)#

If the payout amount is larger than the credit of the current order:
→ The system will fully consume that order
→ Then automatically continue with the next oldest order
→ Until the payout request is fully covered

3️⃣ Example#

Available order credits in the system:
OrderAvailable CreditAge Priority
A10Oldest (transaction date)
B20Middle (transaction date)
C30Newest (transaction date)
If the seller requests a payout of 15:
Usage ResultExplanation
Use Order A’s 10 entirelyOrder A becomes 0
Then fully consume Order B’s 20Order B becomes 0
✔ Total consumed = 10 + 20 = 30
✔ Remaining available credit = 30 (Order C only)

4️⃣ Summary for Client#

All SFTP-uploaded order credits are aggregated as the seller’s available payout balance.
During payout, credits are allocated strictly using the oldest-first and full-order-consumption rules.
Therefore, in some cases, a relatively small payout may exhaust the entire credit of a much larger order.

Note:#

Please upload the file in CSV format.
SFTP files are scanned every 30 min in prod and 10 min in uat.
Ensure no values contain ,'"\r\n#
Support: ( ) & * - _ / :
Use N/A for any blank fields.
Separate multiple product details within the same orderId using $.
Upload the file to the SFTP directory that matches the SFTP account name using the SFTP address, account, and password provided by Infinia.
The file name and orderId must be unique.
If there are any errors in the file, it will not be processed. You can later obtain the error file download link via the query interface.
The error file will be based on the original uploaded file, with an additional column named status at the far right, marking each row as success or failed.
The error file download link will be valid for 10 minutes.
File names must not be duplicated, even for previously incorrect or unprocessed files.
The SFTP directory is automatically scanned every 30 minutes. To avoid errors caused by scanning incomplete uploads, prefix the file name with a period (.), e.g., .YYYYMMDD_SellerID_E-CommercePlatformFileId.csv. Remove the . after the upload is complete to make the file visible.
The transactionTime must be within 360 days.
ParameterDatatypeLengthRequiredDescription
sellerIdString64MGlobally unique ID for each seller on E-commerce platform
orderIdString64MThe PI/CI number
skuString32MStock Keeping Unit
transactionTimeTimestampMTransaction Time
transactionCurrencyString3M“CNH”, “USD”
transactionAmountString64MThe amount corresponding to the goods. 2 decimals
productTypeString3MRefer to appendix
productNameString128MThe specific name of the product
productQuantityString16MThe specific quantity of the product.
productUnitPriceString16MThe unit price corresponding to a single product. 2 decimals
shippingStatusString16M“Not Shipped”, “Shipped”.
estimatedShippingTimeTimestampCMust be filled in when the status is "Not Shipped." Not required if already shipped.
logisticsTrackingNoString64CMust be filled in if the status is "Shipped." Not required if not shipped.
logisticsCompanyString512CMust be filled in if the status is "Shipped." Not required if not shipped.
shippingTimeTimestampMThe actual shipping time.
countryString3MTrade Country
storeUrlString2048MThe product display website of the company.
buyerNameString512OBuyer’s Name
buyerAddressString2048OBuyer’s Address
Modified at 2026-06-25 08:27:58
Previous
Account Binding Status Query
Next
Trade Details Upload Status Query
Built with