PayKKa Docs for Payments
v1.2 🇨🇳 (Current Release)
  • v1.2 🇨🇳 (Current Release)
  • v1.0 🇨🇳 (Release)
  1. 收银台
PayKKa Docs for Payments
v1.2 🇨🇳 (Current Release)
  • v1.2 🇨🇳 (Current Release)
  • v1.0 🇨🇳 (Release)
  • 接入流程
  • 变更记录
  • 支付产品
    • 支付方式
    • API 支付
    • 收银台
  • 支付方式
    • Google Pay™
    • Apple Pay
  • API 参考
    • 开始
    • API认证
    • 系统响应码
    • 交易错误码
    • 交易
      • 发起交易
      • 交易查询
      • 交易请款
      • 交易撤销
      • token查询
      • token删除
      • 循环交易协议取消
      • 获取ApplePay会话
    • 收银台
      • 收银台创建
        POST
      • 收银台查询
        POST
    • 退款
      • 退款
      • 退款查询
    • 通知Webhook
      • 交易结果通知
      • 退款结果通知
  • 前端接入
    • PayKKa Checkout UI Component 使用文档
    • Fraud Detection SDK 使用文档
    • Encrypted Card 使用
  • 数据模型
    • Schemas
      • 响应
      • QueryPayResultReqDto
      • CardEncryptRespDto
      • WebAuthRequest
      • QueryOpenidRequest
      • OrderPayQrcodeRequest
      • EntryPayQrcodeRequest
      • CheckoutIdDto
      • BillRespDto
      • PaymentInfoRespDto
      • PaymentMethodRespDto
      • PaymentMethodsRespDto
      • TokenRespDto
      • BillReqDto
      • BrowserReqDto
      • CheckoutPaymentsReqDto
      • PaymentInfoReqDto
      • CheckoutPaymentQueryDto
      • PaymentMethodsReqDto
      • TokenAuthenticationDto
      • BalanceRespInPaymentsQuery
      • BalanceRespInPayments
      • PaymentLinkSessionReqDto
      • PaymentLinkPaymentsReqDto
      • PaymentLinkPaymentQueryDto
      • PaymentLinkIdDto
      • PaymentLinkQueryRespDto
      • SessionAppleApyReqDto
      • TokenRemoveReqDto
      • QueryTokenReqDto
      • PaymentCardInfoDto
      • QueryTokenRespDto
      • GoodsReqDto
      • SessionCreateReqDto
      • SessionPaymentInfoReqDto
      • ShippingReqDto
      • SessionRespDto
      • SessionQueryReqDto
      • RefundReqDto
      • RefundRespDto
      • RecurringCancelReqDto
      • CardInfoRespDto
      • QueryAddressStyleRespDto
      • CheckoutBillReqDto
      • CheckoutPaymentInfoReqDto
      • PaymentLinkPaymentInfoReqDto
      • SessionAuthenticationReqDto
      • SessionBillReqDto
      • SessionGoodsReqDto
      • SessionShippingReqDto
      • QueryRefundReqDto
      • AuthenticationRecordRespDto
      • QueryPaymentsReqDto
      • CheckoutQueryRespDto
      • CheckoutPaymentsRespDto
      • PaymentLinkPaymentsRespDto
      • PaymentsReqDto
      • AuthenticationRecordDto
      • PaymentsRespDto
      • AuthenticationReqDto
      • RefundNotifyReqDto
      • PaymentsNotifyReqDto
      • PaymentsVoidReqDto
      • PaymentsCaptureReqDto
      • CheckoutBrowserReqDto
      • SessionQueryRespDto
      • PaymentsQueryRespDto
      • BalanceResp
      • QueryPayResultRespDto
      • QueryMerchRequest
      • QueryMerchResponse
      • WebAuthResponse
      • QueryOpenidResponse
      • EntryPayQrcodeResponse
      • CardOrgEnum
      • ChannelConfig
      • SessionField
      • CheckoutThemeRespDto
      • CountryEnum
      • GoodsRespDto
      • Money
      • PaymentMethodEnum
      • PaymentTypeEnum
      • SessionModeEnum
      • SessionStatusEnum
      • CheckoutAuthenticationRecordDto
      • SessionApplePayReqDto
      • FramesLoadReqDto
      • FramesLoadRespDto
      • SuperPaymentMethodsRespDto
      • CardEncryptReqDto
      • CardInfoRespInCard
      • AuthenticationRecordRespInPaymentsQuery
      • CardInfoRespInPaymentsQuery
      • PaymentInfoRespInPaymentsQuery
      • DeviceOsEnum
      • PaymentDeviceTypeEnum
      • AuthenticationRecordRespInPayments
      • CardInfoRespInPayments
      • PaymentInfoRespInPayments
      • TerminalTypeEnum
      • AuthenticationRecordInNotify
      • BalanceRespInNotify
      • CardInfoRespInNotify
      • SessionAuthenticationRecordDto
      • PaymentInfoRespInNotify
      • SessionOrderStatusEnum
      • PaymentModeEnum
      • ApplePaySessionRespDto
      • BatchQueryDictReqDto
      • BatchQueryDictRespDto
      • DataDictResp
      • DataDictValueItem
      • OldPlaceOrderQrcodeRequestV2
      • OldPlaceOrderQrcodeResponseV2
      • OldPosQueryOrderRequestV2
      • OldPosQueryOrderResponseV2
      • OldCollectPayQrcodeRequestV2
      • OldCollectPayQrcodeResponseV2
      • OldPlaceOrderQrcodeRequest
      • OldPlaceOrderQrcodeResponse
      • OldPosQueryOrderRequest
      • OldPosQueryOrderResponse
      • OldCollectPayQrcodeRequest
      • OldCollectPayQrcodeResponse
      • PlaceOrderQrcodeRequest
      • PlaceOrderQrcodeResponse
      • DeviceActivateRequestV2
      • DeviceActivateResponseV2
      • DeviceActivateRequest
      • DeviceActivateResponse
      • CollectPayQrcodeRequest
      • CollectPayQrcodeResponse
      • CurrencyEnum
      • RefundQueryReqDto
      • WechatCallbackRespDto
      • AlipayCallbackRespDto
      • Result
      • CardTokenUsageEnum
      • ChallengeIndicatorEnum
      • ApiPaymentMethodEnum
      • CustomerReqDto
      • ThreedSecureExemptionEnum
      • GatewayOrderStatusEnum
      • SessionCustomerReqDto
      • PaymentsQueryReqDto
      • GatewayRefundOrderStatusEnum
      • QueryRefundResultReqDto
      • QueryRefundResultRespDto
      • QueryTransResultReqDto
      • AddressStyleDto
      • ThreedSecureModeEnum
      • DataDictRespDto
      • PagedDataDictValueItem
      • DeviceSignInReqDto
      • DeviceSignInRespDto
      • PosCurrency
      • DeviceSignInRequestV2
      • DeviceSignInResponseV2
      • DeviceSignInRequest
      • DeviceSignInResponse
  1. 收银台

收银台创建

POST
/payments/session
最后修改时间:2025-03-26 10:55:47
收银台创建

请求参数

Body 参数application/json

示例
{
    "merchant_id": "18000000000000",
    "payment_type": "PURCHASE",
    "authorisation_type": "FINAL_AUTH",
    "capture_method": "AUTOMATIC",
    "trans_id": "t202311081113",
    "timestamp": 1700805506000,
    "currency": "CNY",
    "amount": 1250,
    "notify_url": "https://www.baidu.com/notifyUrl",
    "return_url": "https://www.baidu.com/returnUrl",
    "expire_time": "2023-11-24T11:34:37+0800",
    "session_mode": "HOSTED",
    "display_merchant_name": "PayKKa Merchant",
    "display_locale": "zh-CN",
    "theme_id": "string",
    "goods": [
        {
            "id": "6916003178438",
            "name": "苹果",
            "description": "string",
            "category": "水果",
            "brand": "string",
            "link": "https://www.apple.com",
            "price": 625,
            "quantity": 2,
            "delivery_date": "2023-11-24T11:34:37+0800",
            "picture_url": "https://www.apple.com/apple.jpg"
        }
    ],
    "bill": {
        "billing_address_collection": "REQUIRED",
        "first_name": "string",
        "middle_name": "string",
        "last_name": "string",
        "address_line1": "1樓, Hong Kong, Wan Chai, Harbour Rd, 18號, Central Plaza",
        "address_line2": "-",
        "country": "AX",
        "state": "string",
        "city": "string",
        "postal_code": "999077",
        "email": "email@hotmail.com",
        "area_code": "+852",
        "phone_number": "string",
        "descriptor": "string"
    },
    "shipping": {
        "first_name": "string",
        "middle_name": "string",
        "last_name": "string",
        "address_line1": "1樓, Hong Kong, Wan Chai, Harbour Rd, 18號, Central Plaza",
        "address_line2": "-",
        "country": "AX",
        "state": "string",
        "city": "string",
        "postal_code": "999077",
        "email": "email@hotmail.com",
        "area_code": "+852",
        "phone_number": "string"
    },
    "customer": {
        "id": "string",
        "registration_time": "2023-11-24T11:34:37+0800",
        "past_transactions": 0,
        "area_code": "+852",
        "phone_number": "string",
        "date_of_birth": "string",
        "gender": "string",
        "first_shopping_time": "2023-11-24T11:34:37+0800",
        "last_shopping_time": "2023-11-24T11:34:37+0800",
        "level": "string",
        "email": "email@hotmail.com",
        "order_ip": "string"
    },
    "payment": {
        "store_payment_method": false,
        "token_usage": "CARD_ON_FILE",
        "shopper_reference": "user1234567890"
    },
    "authentication": {
        "challenge_indicator": "AUTO",
        "authentication_only": false,
        "exemption": "NONE"
    },
    "allowed_payment_methods": [
        "BankCard"
    ],
    "blocked_payment_methods": [
        "BankCard"
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/payments/session' \
--header 'Content-Type: application/json' \
--data-raw '{
    "merchant_id": "18000000000000",
    "payment_type": "PURCHASE",
    "authorisation_type": "FINAL_AUTH",
    "capture_method": "AUTOMATIC",
    "trans_id": "t202311081113",
    "timestamp": 1700805506000,
    "currency": "CNY",
    "amount": 1250,
    "notify_url": "https://www.baidu.com/notifyUrl",
    "return_url": "https://www.baidu.com/returnUrl",
    "expire_time": "2023-11-24T11:34:37+0800",
    "session_mode": "HOSTED",
    "display_merchant_name": "PayKKa Merchant",
    "display_locale": "zh-CN",
    "theme_id": "string",
    "goods": [
        {
            "id": "6916003178438",
            "name": "苹果",
            "description": "string",
            "category": "水果",
            "brand": "string",
            "link": "https://www.apple.com",
            "price": 625,
            "quantity": 2,
            "delivery_date": "2023-11-24T11:34:37+0800",
            "picture_url": "https://www.apple.com/apple.jpg"
        }
    ],
    "bill": {
        "billing_address_collection": "REQUIRED",
        "first_name": "string",
        "middle_name": "string",
        "last_name": "string",
        "address_line1": "1樓, Hong Kong, Wan Chai, Harbour Rd, 18號, Central Plaza",
        "address_line2": "-",
        "country": "AX",
        "state": "string",
        "city": "string",
        "postal_code": "999077",
        "email": "email@hotmail.com",
        "area_code": "+852",
        "phone_number": "string",
        "descriptor": "string"
    },
    "shipping": {
        "first_name": "string",
        "middle_name": "string",
        "last_name": "string",
        "address_line1": "1樓, Hong Kong, Wan Chai, Harbour Rd, 18號, Central Plaza",
        "address_line2": "-",
        "country": "AX",
        "state": "string",
        "city": "string",
        "postal_code": "999077",
        "email": "email@hotmail.com",
        "area_code": "+852",
        "phone_number": "string"
    },
    "customer": {
        "id": "string",
        "registration_time": "2023-11-24T11:34:37+0800",
        "past_transactions": 0,
        "area_code": "+852",
        "phone_number": "string",
        "date_of_birth": "string",
        "gender": "string",
        "first_shopping_time": "2023-11-24T11:34:37+0800",
        "last_shopping_time": "2023-11-24T11:34:37+0800",
        "level": "string",
        "email": "email@hotmail.com",
        "order_ip": "string"
    },
    "payment": {
        "store_payment_method": false,
        "token_usage": "CARD_ON_FILE",
        "shopper_reference": "user1234567890"
    },
    "authentication": {
        "challenge_indicator": "AUTO",
        "authentication_only": false,
        "exemption": "NONE"
    },
    "allowed_payment_methods": [
        "BankCard"
    ],
    "blocked_payment_methods": [
        "BankCard"
    ]
}'

返回响应

🟢200成功
*/*
OK
Body

示例
{
    "error_code": "string",
    "error_description": "string",
    "merchant_id": "18000000000000",
    "trans_id": "t202311081113",
    "session_id": "CS200395192979024625",
    "session_mode": "HOSTED",
    "status": "PROCESSING",
    "amount": 1250,
    "currency": "CNY",
    "expire_time": "2023-11-24T11:34:37+0800",
    "authorisation_type": "FINAL_AUTH",
    "capture_method": "AUTOMATIC",
    "session_url": "string"
}
🟠400请求有误
🟠404记录不存在
🟠429429
🔴500服务器错误
修改于 2025-03-26 10:55:47
上一页
获取ApplePay会话
下一页
收银台查询
Built with