Infinia API
  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
    • Revenue Sharing
      • Revenue Sharing
      • 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)
      • 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
    • Schemas
      • com.gep.openapi.common.request.MerchantSignUpRequest.Legal
      • com.gep.openapi.common.response.MerchantSignUpResponse.Legal
      • com.gep.openapi.common.request.PaymentFundRequest.Beneficiary
      • com.gep.openapi.common.response.PaymentFundResponse.Beneficiary
      • com.gep.openapi.common.response.AccountQueryResponse.Balance
  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 commas.
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”
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 2025-12-09 10:19:50
Previous
Account Binding Status Query
Next
Trade Details Upload Status Query
Built with