Create Payment

Create a new payment request

POSTCreate Payment
Endpoint URL
https://testnet.trustsig.xyz/v1/payment/createInvoicePayment/fiat

⚙️Authentication Status

⚠️ API Key is required for all requests Webhook Secret

🔑

Headers

x-api-key
Required

API Key is required for all requests

Content-Type
Required

application/json

Accept-Language
Optional

Select Language

📖

Parameters (Request Body)

order_id
string Required

Reference ID

order_user_reference
string Required

Customer Name

payment_method_type
enum Required

Payment Method

amount
string Required

Amount

from_currency
string Required

Currency

to_currency
string Required

Currency

payer_bank_provider
string Required

Bank Transfer

payer_bank_account_number
string Required

Account Number

payer_bank_account_name
string Required

Account Name

payment_domain
string Required

โดเมนของระบบชำระเงิน (เช่น "https://app.wpayz.xyz" ห้ามเปลี่ยน)

url_return
string Required

Redirect URL

url_success
string Required

Redirect URL

url_failed
string Required

Redirect URL

webhook_url
string Optional

Webhook URL

additional_data
object Required

Metadata

📝

Request Example

Terminal
curl --location 'https://testnet.trustsig.xyz/v1/payment/createInvoicePayment/fiat' \
--header 'Content-Type: application/json' \
--header 'x-api-key: $SIGNATURE_API_KEY' \
--data '{
    "order_id": "ORDER-199993491562",
    "order_user_reference": "12345",
    "payment_method_type": "PROMPTPAY_QR",
    "amount": "100.5",
    "from_currency": "THB",
    "to_currency": "THB",
    "payer_bank_provider": "SCB",
    "payer_bank_account_number": "4052512594",
    "payer_bank_account_name": "รณชิต ราโช",
    "payment_domain": "https://app.wpayz.xyz",
    "url_return": "http://example.com/home_page",
    "url_success": "http://example.com/success_page",
    "url_failed": "http://example.com/failed_page",
    "webhook_url": "https://yourdomain.com/webhook",
    "additional_data": {
        "description": "test create payment"
    }
}'

Response Example

200 OK
JSON Response
{
    "data": {
        "id": "05fc1385-c4cf-4c6a-8cef-a04f63c3d0cb",
        "seq_num": 1,
        "order_id": "ORDER-199993491562",
        "order_user_reference": "12345",
        "order_display_mode": "FIAT",
        "payment_method_type": "PROMPTPAY_QR",
        "payment_provider": "EBANK",
        "invoice_type": "FIAT",
        "from_currency": "THB",
        "to_currency": "THB",
        "chain": "offchain",
        "network": "testnet",
        "to_wallet_id": null,
        "from_wallet_id": null,
        "address_type": "bank_account",
        "txid": "0x00",
        "address": "0x00",
        "from_address": null,
        "amount": "100.5",
        "payment_amount": 2.81,
        "payer_paid_currency": "THB",
        "payer_paid_amount": null,
        "payer_pay_network_fee": false,
        "merchant_amount": 2.81,
        "merchant_number": "0105556189594",
        "merchant_name": "บจก. ฮาร์เล็ม เชคเกอร์ กรุ๊ป",
        "merchant_provider": "KBANK",
        "ebank_account_id": "5b45bd2b-38b2-40db-a1cf-05c2e975b047",
        "one_time_address": false,
        "is_multiple_order": true,
        "lifetime": 900,
        "expired_at": "2025-05-01T10:56:31.516Z",
        "fee_subtract": 100,
        "discount_percent": 0,
        "discount_amount": 0,
        "accuracy_percent": 0,
        "support_currencies": null,
        "except_currencies": null,
        "additional_data": {},
        "auto_convert": false,
        "convert_to": "USDT",
        "payment_url": "https://app.wpayz.xyz/pay/05fc1385-c4cf-4c6a-8cef-a04f63c3d0cb",
        "payment_qr": "00020101021229370016A0000006770101110213010555618959453037645802TH54042.816304F9C5",
        "payment_domain": "https://app.wpayz.xyz",
        "url_return": "http://example.com/home_page",
        "url_success": "http://example.com/success_page",
        "url_failed": "http://example.com/failed_page",
        "exchange_rate": 1,
        "exchange_rate_source": "COINGECKO",
        "tx_value": 0,
        "fx_rate": null,
        "payment_status": "PAYMENT_CHECKING",
        "payment_match_type": "EXACTLY",
        "is_completed": false,
        "status": "PENDING",
        "audit_by_user_id": null,
        "audit_time": null,
        "created_at": "2025-05-01T10:41:31.517Z",
        "owned_by_group": "9ba6f348-5eb1-4d8f-846b-4a2e635093c5",
        "owned_by_group_parent": "c758da80-abd5-4b3e-83cc-c4bd3f106f41",
        "organization_id": "7686e9f3-1b6f-4100-9060-a0afb39b3541",
        "agent_id": "aacc3472-f3c3-49bb-9040-d5a6aff283bf"
    }
}
📋

Response Parameters

id
string Optional

Transaction ID

seq_num
number Optional

Status

order_id
string Optional

Reference ID

order_user_reference
string Optional

Customer Name

order_display_mode
enum Optional

Type

payment_method_type
enum Optional

Payment Method

payment_provider
enum Optional

Payment Method

invoice_type
enum Optional

Type

from_currency
string Optional

Currency

to_currency
string Optional

Currency

chain
string Optional

Type

network
string Optional

Sandbox Environment

amount
string Optional

Amount

payment_amount
number Optional

Amount

merchant_amount
number Optional

Withdrawal Amount

merchant_number
string Optional

Account Number

merchant_name
string Optional

Account Name

merchant_provider
string Optional

Bank Name

lifetime
number Optional

Expires At

expired_at
string Optional

Expires At

payment_url
string Optional

Payment URL

payment_qr
string Optional

QR Code

payment_status
enum Optional

Payment Status

payment_match_type
enum Optional

Payment Method

status
string Optional

Status

created_at
string Optional

Created At