Documentation / Payment Flow

Paano gumagana ang Payment API

Tingnan ang buong payment flow: mula paggawa ng deposit at payment confirmation hanggang crediting, withdrawal, refund at financial reconciliation.

Buksan ang payment integration
Deposit
paglikha at crediting
Payout
verification at sending
Statuses
operation confirmation
Reconciliation
financial control
Payment flow

Mula request hanggang final result

01
Gumawa ng operation

I-record ang player, amount, currency, payment method at unique operation number.

02
Kumpirmahin ang payment

I-redirect ang player sa payment page, humingi ng bank confirmation o direktang i-process ang payment.

03
Kunin ang final status

Suriin ang response ng payment provider at kumpirmahin ang final operation result.

04
I-update ang balance at accounting

I-credit o i-debit ang funds nang isang beses, isama ang fee at i-record ang operation para sa reconciliation.

Overview

Ang bawat payment ay dumadaan sa controlled stages

Binibigyan ng platform ang operation ng sariling number, iniuugnay ito sa response ng payment provider at binabago lamang ang financial state pagkatapos ng confirmed result. Hindi dapat gumawa ng pangalawang debit o credit ang repeated request.

Iisang operation number

Iniuugnay nito ang player, amount, currency, payment method, payment provider at buong processing history.

Malinaw na statuses

Dumadaan lamang ang operation sa allowed stages at hindi binabago ang completed result nang walang hiwalay na correction.

Hiwalay na financial accounting

Magkakaugnay ang payment status, balance change, fee at accounting entry, pero hiwalay na vine-verify ang mga ito.

Deposit flow

Typical deposit flow

Nagsisimula ang deposit sa paggawa ng internal operation at nagtatapos sa one-time credit pagkatapos ng confirmation mula sa payment provider.

01

Suriin ang request at gumawa ng operation

Sinusuri ng platform ang player, KYC, limits, currency, amount at payment method, pagkatapos ay nagbibigay ng internal operation number.

02

Ipadala ang payment sa provider

Natatanggap ng provider ang amount, currency, player data, return URL, notification URL at kinakailangang payment details.

03

Kumpirmahin ang payment

Kinukumpirma ng player ang payment sa external page, sa pamamagitan ng 3-D Secure o sa banking app.

04

Kunin ang confirmation at i-credit ang funds

Pagkatapos ma-verify ang signature at final status, isang beses lang dinadagdagan ng platform ang player balance at kino-complete ang operation.

Withdrawal at refund

Withdrawal, cancellation at refund

Nangangailangan ang outgoing operations ng player verification, available balance check, risk checks, payment details at final response ng payment provider.

Player verification

KYC, age, account status, limits, self-exclusion at allowed withdrawal methods.

Risk checks

AML, fraud indicators, wagering requirements, source of funds at operator approval.

Amount reservation

Naka-block ang amount sa balance hanggang makuha ang final payout result.

Pagpapadala sa payment provider

Gumagawa ng hiwalay na payout request na may unique number at verified recipient details.

Paghihintay ng result

Tumatanggap ang platform ng intermediate statuses at hindi muling dini-debit ang amount.

Refund

Ginagawa ang refund bilang hiwalay na operation na naka-link sa original payment at may sariling amount.

Cancellation

Pinapayagan lamang ang cancellation bago ang irreversible stage at hindi nito pinapalitan ang refund ng completed operation.

Final reconciliation

Dapat magpakita ng parehong result ang provider report, payout data, fees at balance changes.

Operation statuses

Inirerekomendang status model

Pinag-iisa ng internal statuses ang magkakaibang responses ng payment providers sa iisang model na malinaw para sa platform.

Created

Nagawa na ang operation sa platform ngunit hindi pa naipapadala o natatanggap ng provider.

Action required

Kailangang kumpirmahin ng player ang payment, maglagay ng details o gumawa ng action sa bank.

Processing

Tinanggap ng provider ang operation ngunit hindi pa confirmed ang final result.

Completed

Matagumpay na nakumpleto ang operation, pagkatapos ay isang beses lang ina-apply ang balance change.

Declined

Natapos ang operation bilang declined na may naka-save na dahilan at walang duplicate debit o credit.

Unconfirmed

Unknown ang final result dahil sa connection failure, delayed response o conflicting data.

Hindi dapat ituring na decline ang unknown result

Maaaring natanggap ng provider ang payment kahit walang napapanahong response. Kunin muna ang current status o hintayin ang confirmation bago magdesisyon kung kailangan ng repeat operation.

Reliability at reconciliation

Duplicate protection at financial reconciliation

Ang reliability ng Payment API ay nakadepende sa safe behavior sa repeated requests, delayed confirmations at partial failures.

Protection laban sa duplicate operation

Bawat deposit, withdrawal at refund ay may unique number.
Ibinabalik ng repeated request ang existing result at hindi gumagawa ng bagong financial operation.
Sinusuri ang repeated notification gamit ang event number at current payment state.
Naka-link ang balance change sa payment number at isang beses lang ina-apply.

Financial accounting at reconciliation

Hiwalay na i-store ang amount, fee, net credit amount, currency at provider number.
Huwag baguhin nang retroactive ang completed record; gumawa ng hiwalay na correction.
I-reconcile ang API operations, provider reports, balance changes at payouts.
I-record ang discrepancy, dahilan nito, owner at result ng correction.
Testing

Ano ang dapat i-check bago mag-launch

I-test ang successful payment, decline, connection loss, repeated confirmation, unknown result, refund at financial reconciliation.

Successful deposit at withdrawal

Lahat ng intermediate statuses, confirmation, balance change at final reporting.

Operation declined

Insufficient funds, invalid details, exceeded limit, bank decline, risk check at unavailable payment method.

Connection loss

Naputol ang connection pagkatapos maipadala ang request at dumating ang confirmation kalaunan o kailangang kunin nang hiwalay.

Repeated requests

Dumarating muli ang parehong operation o confirmation pagkatapos matapos ang processing.

Refund at cancellation

Full at partial refund, cancellation bago processing at pagbabawal sa cancellation ng completed operation.

Reconciliation

Dapat magtugma ang amount, fee, final status, balance at provider report pagkatapos ng lahat ng scenarios.

Pre-launch checklist

Ini-enable ang production payments pagkatapos ma-verify ang statuses, confirmations, duplicate protection, balance at financial reporting.

Gumagamit ang test at production environments ng magkaibang access, notification endpoints at accounts.
Hindi ginagamit ang pagbalik ng user sa website bilang patunay ng successful payment.
Vine-verify ang signature at event number bago baguhin ang balance.
Protektado laban sa duplicate execution ang deposit, withdrawal at refund.
Kinukumpirma sa provider ang unknown status at vine-verify sa reconciliation.
Naka-configure ang error alerts, PSP reports at discrepancy investigation process.

Kailangang mag-design ng payment flow?

Ipadala ang listahan ng PSPs, payment methods, currencies, markets, balance rules at statuses. Tutulungan ng APIACE na ayusin ang deposit, withdrawal, refund, confirmation at financial reconciliation.