Create P2P Payment

Create a deposit on the P2P rail — the depositor pays a matched withdrawer directly (endpoint spec still to be filled in)

This page is a placeholder. The endpoint, parameters, and examples below are still being confirmed with the platform team — do not build against them yet.

How the P2P rail works

The short tour: what is different from a normal deposit, what falls back to the bank, and which webhook closes the order

Webhooks you will receive

Payload examples
PAYMENT_PAID

The only webhook on the deposit side. Slip accepted — matched to a withdrawer or sent straight to the bank, you get this one event either way; credit the order here

PAYMENT_FAILED

The one exception: the slip was already used (DUPLICATE_SIGNATURE)

Everything in between — matching, waiting for the transfer, slip check, expiry, dispute — is silent. Poll GET /v1/payment/info or GET /v1/p2p/public/flow/:flowId; never treat an order as finished just because nothing arrived.

POSTCreate P2P Payment
Endpoint URL
https://testnet.trustsig.xyz/v1/p2p/...

Headers

x-api-key
Required

API Key for authentication

x-signature
Required

HMAC-SHA256 signature for authentication

x-timestamp
Required

Timestamp (milliseconds) for signature

X-Idempotency-Key
Required

Unique key สำหรับป้องกันการทำรายการซ้ำ (เช่น UUID)

Parameters (Request Body)

amount
number Required

จำนวนเงินที่ต้องการฝาก (หน่วยเป็นบาท)

order_id
string Required

A unique order reference ID from your system (e.g., mystore_order_1234, uuid). Please use the same Order ID for the same transaction and do not generate a new one.

order_user_reference
string Required

Customer Name

return_url
string Optional

URL ที่จะ redirect กลับเมื่อทำรายการเสร็จสิ้น