Create Slip Payment

Create a P2P session for slip-only fiat payment. Returns a session token and redirect URL for the depositor to submit their slip.

POSTCreate Slip Payment
Endpoint URL
https://testnet.trustsig.xyz/v1/p2p/public/session/create

Authentication Status

API Key is required for all requests Webhook Secret

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)

role
enum Required

บทบาทของผู้ใช้ session (ใช้ DEPOSITOR สำหรับฝั่งผู้ฝากเงิน)

ttl_seconds
number Required

อายุของ session เป็นวินาที (เช่น 1200 = 20 นาที)

profile.depositor.sender_bank
string Required

รหัสธนาคารของผู้ฝาก (เช่น SCB, KBANK, BBL)

profile.depositor.sender_account
string Required

เลขบัญชีธนาคารของผู้ฝาก

amount_option
string Required

ตัวเลือกจำนวนเงินที่กำหนดไว้ล่วงหน้า (เช่น option_200 = 200 บาท)

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 กลับเมื่อทำรายการเสร็จสิ้น

Request Example

Terminal
curl --location 'https://testnet.trustsig.xyz/v1/p2p/public/session/create' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $SIGNATURE_API_KEY' \
--header 'X-Idempotency-Key: YOUR-UNIQUE-UUID' \
--data '{
    "role": "DEPOSITOR",
    "ttl_seconds": 1200,
    "profile": {
        "depositor": {
            "sender_bank": "SCB",
            "sender_account": "8142794131"
        }
    },
    "amount_option": "option_200",
    "order_id": "ODRW-1775940152729",
    "order_user_reference": "USER134",
    "return_url": "https://www.google.com/"
}'

Response Example

200 OK
JSON Response
{
    "data": {
        "session_token": "yUFSwamgJNkxcvWC_UY-okEzM3C9jOjSaqhMxWpEaAk",
        "session": {
            "sid": "ccb0978b-be76-49bb-a670-196705cbd0b5",
            "jti": "fb21e92a-73b9-47ba-942b-83ed197a4e3b",
            "agent_id": "23904656-59cd-44dc-a336-d36dd7bf7ee9",
            "flow_id": null,
            "role": "DEPOSITOR",
            "scopes": [
                "session:read",
                "flow:read",
                "available:read",
                "deposit:create",
                "slip:submit",
                "evidence:upload",
                "match:dispute",
                "queue:read",
                "queue:cancel"
            ],
            "issued_at": "2026-04-10T03:42:57.609Z",
            "expires_at": "2026-04-10T04:02:57.609Z",
            "revoked_at": null,
            "issuer": "agent:23904656-59cd-44dc-a336-d36dd7bf7ee9",
            "profile": {
                "depositor": {
                    "sender_bank": "SCB",
                    "sender_account": "8142794131",
                    "order_id": "ODRW-1775792572335",
                    "order_user_reference": "USER134"
                }
            },
            "amount_option": "option_200"
        },
        "redirect_url": "https://demo.sky777881.xyz/pay/slip/yUFSwamgJNkxcvWC_UY-okEzM3C9jOjSaqhMxWpEaAk?role=depositor&amount_option=option_200&return_url=https%3A%2F%2Fwww.google.com%2F"
    },
    "success": true,
    "code": 0
}