HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Update Order Payment Status

Function

To update order's payment status
更新訂單付款狀態

URL

PATCH <<api_domain>>/v1/orders/:id/order_payment_status

Request Parameters

ParameterTypeDescriptionExample
id
*Required
StringOrder's ID
訂單ID
ruby 59e97965e388095314000010
status
*Required
StringOrder Payment Status
訂單付款狀態

- Payment status allows
pending 未付款
failed 付款失敗
expired 超過付款時間
completed 已付款
refunding 退款中
refunded 已退款
ruby "status": "completed"
mail_notifyBooleanDo you want to notify the customer via email with the change?
此更新是否要以email通知顧客?

- Default: false
ruby "mail_notify": true

Response Field

FieldTypeDescriptionExample
order_idStringOrder's ID
訂單ID
59e97965e388095314000010
statusStringOrder Payment Status
訂單付款狀態
completed
updated_atDateTimeOrder Last Updated Time
訂單最後更新時間
2017-10-20T12:19:50.196+08:00

Response Example

{
    "order_id": "59e97965e388095314000010",
    "status": "completed",
    "updated_at": "2017-10-20T12:19:50.196+08:00"
}