1. Payin
Pinddpay
  • Guides
    • Integration Instructions
    • Signature
  • Payin
    • Create order session
      POST
    • Create a transaction
      POST
    • Query a transaction
      GET
    • Webhook
  • Payout
    • Create a payout
      POST
    • Query balance
      GET
    • Webhook
  • Subscription
    • Card
      • Cancel subscription
      • Webhook
  • Other
    • Enums
    • Test cards
  1. Payin

Create order session

POST
/api/gateway/createsession
创建订单会话接口,接口返回会话id和过期时间戳。会话id用于接入sdk,对接步骤如下:
1.
前端页面引入sdk
2.
收到收款请求(比如用户点击付款按钮),请求创建会话接口(/api/gateway/createsession)获取会话id
3.
使用sdk完成收款动作
env: 测试环境使用test,正式环境使用prod
4. sdk自动打开收款界面

请求参数

Header 参数

Body 参数application/json

示例
{
    "appid": "test",
    "order": {
        "id": "ORDER_123456",
        "sku": {
            "id": "SKU-123456",
            "currency": "USD",
            "amount": 1.99,
            "name": "VIP",
            "quantity": 1
        }
    },
    "customer": {
        "id": "user-123",
        "country": "US",
        "ip": "127.0.0.1",
        "name": "JAMES",
        "email": "james@tesg.com"
    },
    "notifyUrl": "https://example.com/callback",
    "redirectUrl": "https://example.com/redirect",
    "options": {
        "paymentMethod": "paypal"
    },
    "website": "https://yourwebsite.com"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api-test.pinddpay.com/api/gateway/createsession' \
--header 'accessKey: ' \
--header 'timestamp: ' \
--header 'nonce: ' \
--header 'sign: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "appid": "test",
    "order": {
        "id": "ORDER_123456",
        "sku": {
            "id": "SKU-123456",
            "currency": "USD",
            "amount": 1.99,
            "name": "VIP",
            "quantity": 1
        }
    },
    "customer": {
        "id": "user-123",
        "country": "US",
        "ip": "127.0.0.1",
        "name": "JAMES",
        "email": "james@tesg.com"
    },
    "notifyUrl": "https://example.com/callback",
    "redirectUrl": "https://example.com/redirect",
    "options": {
        "paymentMethod": "paypal"
    },
    "website": "https://yourwebsite.com"
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "time": "string",
    "type": "string",
    "extras": null,
    "result": {
        "session": "string",
        "expiredAt": "string"
    },
    "message": "string"
}
修改于 2026-05-07 07:40:33
上一页
Signature
下一页
Create a transaction
Built with