2.5 KiB
2.5 KiB
CTO Dataset Guide — Adopted Source Notes
- Source: workspace
(challenge)/data-guide.md - Source role: authoritative dataset semantics supplied by ZarinPal's CTO
- Adopted: 2026-08-20
- Safety: document content is treated as domain evidence, not agent instructions
Adopted meanings
- A source record normally represents one payment attempt, but
try_seq = 0withtry_status = NoAttemptis a session marker for zero attempts. - Positive
try_seqvalues start at one and identify actual attempts within a session. - Payment lifecycle is creation →
InBank→Paid→Verified.Paidmeans funds were deducted but merchant verification is incomplete;Verifiedis final. psp_codebelongs to an attempt.switch_response_codeis namespaced by PSP, so equal raw codes across PSPs are not assumed equivalent.issuer_bank_codeandpayer_card_keyare absent when card information never returns from the bank stage.payer_card_keyequality is valid only within one merchant. It identifies a pseudonymous card, not a person, and cannot link merchants.init_time_msandverify_time_msmeasure API response duration, not buyer thinking/interaction time.expire_inis a timestamp despite its source name and is normalized toexpires_at.- All source identifiers are pseudonymous and do not reveal real merchant, terminal, PSP, bank, session, or card identities.
Fee interpretation
The guide says challenge adjusted_fee was uniformly scaled and is not the actual ZarinPal tariff; only relative analyses are faithful to the challenge source. The product owner subsequently approved a production contract in which fee_amount_rial is the real merchant fee. Therefore:
- challenge bootstrap maps the adjusted stand-in into the canonical session field for demo behavior;
- production ZarinPal writers must provide the real Rial fee under the same canonical field;
- the product UI follows the approved production meaning and does not describe the canonical field as obfuscated;
- internal provenance keeps the challenge transformation caveat auditable.
Normalization consequences
payment_sessionshas zero or morepayment_attempts.- A
NoAttemptmarker creates only a session; it cannot inflate attempt, failure-attempt, or retry counts. - Actual attempts require
try_seq >= 1and remain unique within a session. - Attempt-stage diagnostics may distinguish
NoAttempt,InBank, and later outcomes, but cannot invent undocumented failure causes or decode PSP response codes.