— CARD (USD) · DEX V2 FIAT LEDGER · ON-CHAIN PAYOUT PROOF —
How a credit card payment for your app is processed off-chain, how it is recorded on-chain as a USD ledger, how the platform pays you, and how you can verify every step yourself. 내 앱의 신용카드 결제가 오프체인에서 어떻게 처리되고, 온체인 달러 원장에 어떻게 기록되며, 플랫폼이 어떻게 정산하고, 개발자가 각 단계를 어떻게 직접 확인하는지 설명합니다.
A card payment moves no coins. The money stays in the card network and the platform's bank account. The blockchain is used only as a USD settlement ledger: every sale, refund and payout is written to the dex v2 contract so that neither side can change the numbers later. 카드 결제는 코인을 송금하지 않습니다. 돈은 카드망과 플랫폼 은행 계좌에서만 움직입니다. 블록체인은 달러 정산 원장으로만 쓰입니다. 판매·환불·정산이 모두 dex v2 컨트랙트에 기록되므로 어느 쪽도 나중에 숫자를 바꿀 수 없습니다.
1000.
통화는 USD 센트(정수)로 고정입니다. $10.00 은 1000 으로 저장됩니다.
FREE, XOTN, CARD or BOTH. A free app has no ledger entries, so there is nothing to settle.
앱마다 수익화 방식이 있습니다. FREE·XOTN·CARD·BOTH 중 하나입니다. 무료 앱은 원장 기록이 없으므로 정산할 것도 없습니다.
CARD or BOTH in Register App or in My Applications.
Register App 또는 My Applications 에서 수익화 방식을 CARD 또는 BOTH 로 지정합니다.
If the app is not registered on-chain, a sale cannot be recorded. The contract reverts with Provider not registered (code PROVIDER_NOT_REGISTERED).
온체인 등록을 하지 않은 앱은 판매를 기록할 수 없습니다. 컨트랙트가 Provider not registered(코드 PROVIDER_NOT_REGISTERED)로 revert 합니다.
record_fiat_sale updates the ledger and emits FiatSale.
record_fiat_sale 가 원장을 갱신하고 FiatSale 이벤트를 남깁니다.
keccak256(utf8(PG transaction number)). The same PG number always gives the same key, so one payment can be recorded only once (FIAT_ORDER_EXISTS).
온체인 주문 키는 keccak256(utf8(PG 거래번호)) 입니다. 같은 PG 거래번호는 항상 같은 키가 되므로 결제 1건은 한 번만 기록됩니다(FIAT_ORDER_EXISTS).
Refund and payout timing. Refunds are accepted for 15 days after payment. Payouts are made 30 days after payment. So a refund always happens before the payout. The contract does not count days. It enforces the rule by rejecting a refund when the remaining pending balance is smaller than that order's share (FIAT_ALREADY_SETTLED). Such a case is handled manually by the platform.
환불과 정산 시점. 환불은 결제 후 15일 안에만 받습니다. 정산은 결제 30일 후에 합니다. 그래서 환불은 항상 정산 전에 일어납니다. 컨트랙트가 날짜를 세지는 않습니다. 대신 남은 미지급액이 그 주문의 개발자 몫보다 작으면 환불을 거부(FIAT_ALREADY_SETTLED)하는 방식으로 이 규칙을 강제합니다. 이런 경우는 플랫폼이 수동으로 처리합니다.
The dex v2 contract keeps one FiatLedger per app (keyed by the app's on-chain cuid). All values are cumulative USD cents.
dex v2 컨트랙트는 앱마다(온체인 cuid 기준) FiatLedger 하나를 둡니다. 모든 값은 누적 USD 센트입니다.
| Field필드 | Settlements label정산 화면 표시 | Meaning의미 |
|---|---|---|
| grossCents | Gross sales | Total amount paid by card카드 결제 총액 |
| pgFeeCents | PG fees | Total PG feesPG 수수료 합계 |
| shareCents | Developer share | Your share of every recorded sale기록된 판매 전체의 개발자 몫 |
| refundedShareCents | Refunded | Share cancelled by refunds환불로 취소된 몫 |
| settledCents | Settled | Amount already paid out to you이미 지급된 금액 |
| pending | Pending payout | share − refundedShare − settled. Never negative.share − refundedShare − settled. 음수가 될 수 없습니다. |
share = floor( (gross − pgFee) × rateBps / 10000 ) // rateBps default 8500 = 85%
set_share_rate_bps). Each order keeps a snapshot of the rate at the time it was recorded, so a rate change applies only to later orders.
비율은 컨트랙트에 저장되며 플랫폼만 바꿀 수 있습니다(set_share_rate_bps). 주문마다 기록 시점의 비율을 스냅샷으로 저장하므로, 비율을 바꿔도 이후 주문에만 적용됩니다.
gross = 1000 cents ($10.00)
pgFee = 30 cents ($0.30)
net = 1000 − 30 = 970 cents
share = floor(970 × 8500 / 10000)
= floor(824.5) = 824 cents
pending = 824 − 0 − 0 → Pending payout shows $8.24
| Event이벤트 | Fields필드 |
|---|---|
| FiatSale | cuid, orderId, slot, grossCents, pgFeeCents, shareCents, rateBps, tokenAmount |
| FiatRefund | cuid, orderId, shareCents, tokenReturned |
| FiatSettled | cuid, amountCents, settlementRef, receiptHash, periodStart, periodEnd |
| ShareRateChanged | oldBps, newBps |
The platform operator pays you by bank transfer outside the chain, then records the payout on-chain with proof of the transfer. 플랫폼 운영자가 체인 밖에서 은행 송금으로 지급한 뒤, 송금 증빙과 함께 정산을 온체인에 기록합니다.
settle_fiat adds to Settled and emits FiatSettled with a tx_hash.
settle_fiat 이 정산 완료액을 늘리고 FiatSettled 를 남깁니다(tx_hash 발급).
| Input입력 | Rule규칙 |
|---|---|
| Amount | Greater than 0 and not more than Pending payout. The contract rejects anything else (INVALID_SETTLE_AMOUNT).0 보다 크고 미지급액 이하여야 합니다. 그 밖의 값은 컨트랙트가 거부합니다(INVALID_SETTLE_AMOUNT). |
| Settlement reference | UTF-8, 31 bytes or less, stored on-chain as bytes32. It cannot be reused for the same app (SETTLEMENT_REF_EXISTS).UTF-8 31바이트 이하이며 온체인에 bytes32 로 저장됩니다. 같은 앱에서 다시 쓸 수 없습니다(SETTLEMENT_REF_EXISTS). |
| Period from / to | The sales period this payout covers, entered by the operator.이번 정산이 다루는 판매 기간이며 운영자가 입력합니다. |
| Receipt | pdf, png or jpg, up to 10MB.pdf·png·jpg, 최대 10MB. |
The receipt file itself is kept on the A server. Only its sha256 hash goes on-chain. Anyone who has the file can prove it is the same file the operator recorded. 영수증 파일 자체는 A 서버에 보관하고, 체인에는 sha256 해시만 올라갑니다. 파일을 가진 사람은 누구나 운영자가 기록한 파일과 같은 파일인지 증명할 수 있습니다.
Open Settlements in the sidebar. You need to be signed in. 사이드바의 Settlements 를 엽니다. 로그인이 필요합니다.
FREE, XOTN, CARD, BOTH) and ⛓ ON-CHAIN or NOT ON-CHAIN.
앱마다 카드 1장이 있고, 수익화 배지(FREE·XOTN·CARD·BOTH)와 ⛓ ON-CHAIN 또는 NOT ON-CHAIN 배지가 붙습니다.
Filter by app, type (Sale, Refund, Settled) and date range, then click Apply. The timeline is built from the platform's index of contract events, so a new record can take a short moment to appear. 앱·종류(Sale·Refund·Settled)·기간을 고르고 Apply 를 누릅니다. 타임라인은 플랫폼이 컨트랙트 이벤트를 색인한 결과라서 새 기록이 보이기까지 잠시 걸릴 수 있습니다.
| Column열 | Content내용 |
|---|---|
| Date | Block time. Hover to see the block number.블록 시각. 마우스를 올리면 블록 번호가 보입니다. |
| Amount / Your share | Sale: gross and your share. Refund: your share as a negative value. Settled: the paid amount.Sale 은 결제액과 개발자 몫, Refund 는 음수로 표시한 개발자 몫, Settled 는 지급액입니다. |
| Order / Ref | Sale and Refund: the on-chain orderId. Settled: the settlement reference and period. Hover a Settled row to see the receipt hash.Sale·Refund 는 온체인 orderId, Settled 는 정산 참조번호와 기간입니다. Settled 행에 마우스를 올리면 영수증 해시가 보입니다. |
| Tx | Shortened tx_hash. Hover to see the full value.줄인 tx_hash. 마우스를 올리면 전체 값이 보입니다. |
| Receipt | Settled rows only. Download gets the transfer receipt. Its tooltip shows sha256 0x….Settled 행에만 있습니다. Download 로 송금 영수증을 받습니다. 툴팁에 sha256 0x… 가 표시됩니다. |
0x prefix. If they match, the file is exactly the one recorded on-chain.
툴팁의 온체인 영수증 해시와 비교합니다. 0x 접두어는 빼고 비교합니다. 같으면 체인에 기록된 바로 그 파일입니다.
# macOS / Linux
shasum -a 256 receipt.pdf
# Windows (PowerShell)
Get-FileHash receipt.pdf -Algorithm SHA256
Every Sale, Refund and Settled row has a tx_hash. Look it up on the XOTN chain with a block explorer or with JSON-RPC eth_getTransactionReceipt, and read the event fields directly. Contact the platform with the tx_hash.
Sale·Refund·Settled 행마다 tx_hash 가 있습니다. XOTN 체인에서 블록 탐색기나 JSON-RPC eth_getTransactionReceipt 로 조회해 이벤트 필드를 직접 확인하세요. 문의할 때는 tx_hash 를 함께 보내 주세요.