Skip to content
API documentationP2P EasyPay

Payin upload slip ​

Slip upload: accepted evidence to verified result
  1. Use this order’s returned capability
    SlipUploadCapability
    CREATE 201: use nested slip_upload. After CREATE 202 becomes payable: backend sends empty-body slip-token + required Idempotency-Key before revealing instructions; use the top-level 200 response. Check max_bytes and content_types.
  2. Upload to the exact returned URL
    POST upload_url
    Use upload_url and token from that capability, plus a saved Idempotency-Key. Do not send the merchant key or PG-* headers; do not construct the upload host.
  3. 202 · accepted + receipt_id
    Evidence received; verification follows
    202 confirms durable intake, not a credit or a successful bank verification.
  4. Read status with backoff
    GET /v1/pay/deposits/{id}
    Respect Retry-After/retry_after_seconds and the current expires_at. Stop polling on completion or expiry; elapsed time does not prove payment.
  5. Current snapshot
    status = settled
    Apply the accepted amount once
    amount_received_minor
    Verify webhooks and use a version guard.
    OR
    Other statuses
    Show the actual state
    No credit from accepted, slip_processing or under_review. Follow current status and is_terminal.
LIVE only. Sandbox uses the simulator. Never ask the payer to transfer again because verification is still pending.

Use the upload capability for this order: nested slip_upload from CREATE 201, or the top-level SlipUploadCapability from slip-token 200 after CREATE 202 becomes payable. Send the image to its upload_url using its token. Do not send your Merchant API key or PG-* headers here.

js
import { readFile } from 'node:fs/promises';
import { clientFromEnv } from './client.mjs';
const client = clientFromEnv();
// upload is order.slip_upload (CREATE 201) or tokenResult.data (slip-token 200).
const file = new Blob([await readFile('/secure-upload/slip.png')], { type: 'image/png' });
const request = client.uploadSlip(upload, file, 'order-1001-slip-1');
const result = await request.send();
// Retry the same prepared request, image, and key.

Use JPEG/PNG/WebP listed in content_types, within the returned max_bytes. The server checks the real file type and evidence. Upload only for the order whose instructions the payer actually used.

Result ​

202 with a receipt_id means evidence was accepted. On LIVE, poll GET /v1/pay/deposits/{id} with backoff until the current expires_at: 3 → 5 → 10 → 30 seconds between reads, never sooner than Retry-After/retry_after_seconds. Stop on a terminal result or the deadline. Confirm funds only at settled. A passed deadline does not prove payment; pending verification is not a reason to ask the payer to transfer again.

An initial LIVE 202 awaiting_liquidity has no upload token. Poll GET as described in Payin. Once it reports awaiting_payment, your backend requests POST /v1/pay/deposits/{id}/slip-token with an empty body and required Idempotency-Key before revealing payment instructions. PayPage obtains this capability for you.

LIVE emits only deposit.settled, deposit.canceled, withdrawal.created, withdrawal.partial_fill, and withdrawal.terminal. There is no webhook for matching, under_review, rejected, or expired; see the Live P2P profile.

Sandbox 201 has no real transfer instructions, upload capability, or slip-token. Use POST /v1/pay/sandbox/deposits/{id}/simulate and whole baht from THB 1 to 10,000,000 (100–1000000000 minor units). See Sandbox payments for amount ranges and outcomes. Do not send real funds or slips.

ProblemNext step
503 or network timeoutHonor Retry-After; retry the original evidence and key.
409 idempotency_key_reusedThe key was used with different evidence. Check the request; do not use new keys to resubmit the same slip as a new order.
410Follow the response's support path, or contact support with the order ID and real slip.
PHP and additional requirements
php
$prepared = $client->uploadSlip($upload, '/secure-upload/slip.png', $persistedSlipKey);
$result = $client->send($prepared);
// Retry with the same prepared request and unchanged file.

Never log the token/image or put the token in a URL. Use the returned upload URL exactly; do not construct a host yourself. This capability is separate from your Merchant API key. Do not set multipart Content-Type yourself: the client supplies its boundary.

See JSON/base64 and upload details or status handling.

เอกสารชุดนี้อิงสัญญา API เวอร์ชัน 2026-08-01