HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Order Payment

Data structure of order_payment

FieldColumn TypeDescriptionExample
payment_method_idStringPayment Method ID
付款方式ID
58d25cd501cda3475300002e
ref_payment_idString3rd party payment reference ID
payment_typeStringPayment Method
付款方式
ecpay
bank_transfer
cash_on_delivery
custom tw_711_b2c_pay
tw_711_pay

sl_logistics_ninjavan_cod
sl_logistics_kerry_th_cod
sl_logistics_kerry_th_cod
sl_logistics_kerry_th_cod
sl_logistics_ghtk_cod
sl_logistics_janio_cod
sl_logistics_poslaju_cod
name_translationsTranslationPayment Method Name
付款方式之名稱
{"en": "credit card",
"zh-hant": "信用卡"}
statusStringPayment Status
付款狀態
Payment status allows
pending 未付款
failed 付款失敗
expired 超過付款時間
completed 已付款
refunding 退款中
refunded 已退款
partially_refunded 已部分退款
payment_feeMoneyPayment Fee
附加費
0
totalMoneyPayment Total
付款金額
623
paid_atDateTimePaid Time
付款完成時間
(UTC +0)
2018-01-10T09:32:29.154+00:00
updated_atDateTimeUpdated Time related to change of payment
付款更新時間
(UTC +0)
2018-01-10T09:32:29.154+00:00
created_atDateTimeCreated Date
訂單創造時間
(UTC +0)
2018-01-10T09:32:29.154+00:00
payment_dataHashPayment Details Info
付款詳細資訊
(如有串接第三方金流)
Please refer to the example below
last_four_digitsStringCredit Card Last Four Digits.
信用卡後四碼
1234

JSON Sample

{
  "order_payment": {
    "payment_method_id": "58d25cd501cda3475300002e",
    "payment_type": "ecpay",
    "name_translations": {
      "en": "credit card",
      "zh-hant": "信用卡"
    },
    "status": "pending",
    "payment_fee": {
      "cents": 0,
      "currency_symbol": "NT$",
      "currency_iso": "TWD",
      "label": "",
      "dollars": 0
    },
    "total": {
      "cents": 623,
      "currency_symbol": "NT$",
      "currency_iso": "TWD",
      "label": "NT$623",
      "dollars": 623
    },
    "paid_at": "2018-01-10T09:32:29.154+00:00",
    "updated_at": "2018-01-10T09:32:29.154+00:00",
    "created_at": "2018-01-10T09:32:29.154+00:00",
		 "payment_data": {
                    "create_payment": {
                        "subCode": "",
                        "subMsg": "",
                        "resp": {
                            "orderId": "20200825005246830990241370000",
                            "appOrderId": "20200824165245716",
                            "chOrderId": "99920200824165245716",
                            "amount": "500.0",
                            "payData": {
                                "merchantCode": "250405304072",
                                "riskLevel": "0",
                                "channelPayUrl": "https://test-portal-xpay.yy.com/channel/TwoCheckout/Card/999/YlRzdXdjVjZHQTdTS2dyQXJWQmEzWWRrUmloM0JWeXd0dkxUVGZ1QTZhUk9UZlREY05HMHVtZkxzL0dRK3lSTFluc055RkFoZHVaL3ZUZkpNemdack96NGdJL1RZZ1JrRE40RFFnenZjWG5jaFRmRUd2eGNaYm5ISCs1VllZNkk=",
                                "riskResult": {
                                    "enable": "true",
                                    "result": {
                                        "checkSuccess": "true",
                                        "pass": "true",
                                        "expectRiskLevel": "80",
                                        "riskLevel": "0",
                                        "detail": "{\"appId\":\"shopline_recharge\",\"assocAcctType\":255.0,\"persona_risk_mask\":\"0\",\"phone\":\"\",\"risk_level\":0.0,\"termType\":0.0,\"timestamp\":1.598287967238E12,\"traceId\":\"1297939924594503680\",\"uid\":\"5edddd9201afcd24a0f86606\"}"
                                    }
                                },
                                "publicKey": "77620313-EAA5-4EB9-B484-E108C8F87ADE"
                            },
                            "attach": "",
                            "statusCode": "PAYING",
                            "statusMsg": "2checkout paying.",
                            "chDealTime": "",
                            "chDealId": "",
                            "paymentOrderId": "20200825005246830990241370000",
                            "merchantOrderId": "20200824165245716"
                        },
                        "success": "true",
                        "code": "10000",
                        "msg": "成功"
                    },
                    "notify_response": {
                        "appId": "999",
                        "signType": "RSA2",
                        "timestamp": "20200825005356",
                        "sign": "UhYsUizoDb7kM5L0XUGBNNkmJKhpCfVnlLxLhvMFV44msY9qWXy34ZGotmZfMzFyxCFeK2pgSN6T5MyCkk7+ofcj4BKWHw8RkkFp51bFjtARvD1Bsj8uHNA7TTeC1ZGNJRzDNydnyHMYgdCHiVgxWxX+fohnN6zQZh5S4bvM7hw=",
                        "bizContent": "{\"paymentOrderId\":\"20200825005246830990241370000\",\"merchantOrderId\":\"20200824165245716\",\"orderId\":\"20200825005246830990241370000\",\"appOrderId\":\"20200824165245716\",\"chOrderId\":\"99920200824165245716\",\"amount\":500.00,\"currency\":\"TWD\",\"payData\":{\"merchantCode\":\"250405304072\",\"riskLevel\":0.0,\"channelPayUrl\":\"https://test-portal-xpay.yy.com/channel/TwoCheckout/Card/999/YlRzdXdjVjZHQTdTS2dyQXJWQmEzWWRrUmloM0JWeXd0dkxUVGZ1QTZhUk9UZlREY05HMHVtZkxzL0dRK3lSTFluc055RkFoZHVaL3ZUZkpNemdack96NGdJL1RZZ1JrRE40RFFnenZjWG5jaFRmRUd2eGNaYm5ISCs1VllZNkk=\",\"publicKey\":\"77620313-EAA5-4EB9-B484-E108C8F87ADE\",\"payTokenData\":{\"last4\":\"1111\",\"bin\":\"4111\",\"card_type\":\"visa\"},\"chId\":\"TwoCheckout\",\"payMethod\":\"Card\",\"userId\":\"5edddd9201afcd24a0f86606\"},\"statusCode\":\"SUCCESS\",\"statusMsg\":\"pay success.\",\"chDealTime\":\"20200825005328\",\"chDealId\":\"131004268\",\"orderType\":\"\",\"prodId\":\"5f3a5188e38809a2d1388bdd\"}",
                        "controller": "order_payments",
                        "action": "notify",
                        "payment_gateway": "two_checkout",
                        "id": "5f43f05de388093f603a3ac6"
                    }
                },
    "last_four_digits": "1234"
  }
}