NAV Navbar
shell PHP

前書き

OwlPay Portal へようこそ。

OwlPay API は REST 設計仕様に準拠しています。

実際の支払い情報や銀行とのやり取りに影響を与えないように、OwlPay API は支払いプロセスをシミュレートするためのテスト環境を提供します。

また、開発者の使用環境がオンライン環境かテスト環境かをAPIキーの違いで判断します。

API Hosts: https://api.owlpay.com

OwlPay: https://www.owlpay.com
OwlPay for Platform: https://dashboard.owlpay.com

Authentication

Authenticated request example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders \ 
-u <application_secret>:

OwlPay API 使用 API keys 來驗證每個請求

你可以查看及管理您的應用程式 API Keys 在 OwlPay 開發者/金鑰
開發模式的金鑰前綴會是 pk_test_ , 正式環境下的金鑰會是 pk_live_

您的金鑰可以使用於 OwlPay 上大多功能,所以請確保他的儲存安全性 並且請勿分享您的金鑰於公開並可被存取的地方(例如 GitHub、客戶端程式碼 等等)

您需透過 Bearer 的方式於進行認證 (例如 跨網域的請求) 使用 -H 'Authorization: Bearer pk_test_2Wv9xZ....guTPiJ' 代替 -u pk_test_2Wv9xZ....guTPiJ.

所有的 API 請求通過 HTTPS。 若使用 http 的請求即會失敗,請求受金鑰保護的路由而沒通過金鑰也將會失敗

Errors

Http status code summary

200 - OK Everything worked as expected.
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
402 - Request Failed The parameters were valid but the request failed.
403 - Forbidden The API key doesn't have permissions to perform the request.
404 - Not Found The requested resource doesn't exist.
409 - Conflict The request conflicts with another request (perhaps due to using the same idempotent key).
429 - Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server Errors Something went wrong on OwlPay's end. (These are rare.)

Error types

unknowns_error unknowns_error
server_error server_error
unauthorized unauthorized
order_error order_error
order_transfer_error order_transfer_error
guard_auth_forbidden guard_auth_forbidden
data_not_found data_not_found
invite_fail invite_fail
2fa_error 2fa_error
2fa_recovery_code_exist 2fa_recovery_code_exist
2fa_recovery_code_incorrect 2fa_recovery_code_incorrect
data_is_lock data_is_lock

OwlPay uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter missing, a payout failed, etc.). Codes in the 5xx range indicate an error with OwlPay's servers.

Attributes

type

The type of error retruned.

One of unknowns_error, server_error, unauthorized, order_error, order_transfer_error, guard_auth_forbidden, data_not_found, invite_fail, 2fa_error, 2fa_recovery_code_exist, 2fa_recovery_code_incorrect, data_is_lock,

message

The description of error retruned.

More attributes

Metadata

curl https://api.owlpay.com/api/v1/platform/tunnel/orders \ 
-u <application_secret>: \
-d order_serial=OBExxxooo1234 \ 
-d currency=USD \
-d total=100 \
-d "meta_data[order_id]"=9527

Response Example

{
    "data": {
        "order_status": "owlpay.received_order",
        "status": "owlpay.received_order",
        "order_serial": "OBExxxooo1234",
        "application_order_serial": "OBExxxooo1234",
        "currency": "TWD",
        "total": 10000,
        "is_paid": false,
        "order_created_at": "2021-01-27T04:24:50+00:00",
        "paid_time_at": null,
        "notified_time_at": "2021-01-27T04:24:50+00:00",
        "vendor_uuid": "ven_VELSI1wQ6ipP8BJU4NZxFp5",
        "vendor_name": "",
        "customer_vendor_uuid": null,
        "is_transferred": false,
        "meta_data": [
            {
                "order_id": "6735"
            }
        ],
        "events": [
            {
                "type": "order_receive",
                "block_number": null,
                "transaction_hash": null,
                "created_at": "2021-01-27T04:24:50+00:00"
            }
        ],
        "order_token": "ord_f4cf770962550535fe3cae03b575fb20ee8951449261957e9aa5f9590b5fc699",
        "description": null,
        "logs": []
    },
    "status": 200
}

Updateable OwlPay objects—including Order, Vendor, Payout
—have a metadata parameter. You can use this parameter to attach key-value data to these OwlPay objects Some of the objects listed above also support a description parameter. You can use the description parameter to annotate a order-with, for example, a human-readable description like Hotel order from Hotel 2020-12-01 ~ 2020-12-03 Unlike metadata, description is just a single string Do not store any sensitive information (bank account numbers, card details, etc.) as metadata or in the description parameter

Do not store any sensitive information (bank account numbers, card details, etc.) as metadata or in the description parameter

Sample metadata use cases

Link Unique ID
Attach your system's unique IDs to a OwlPay object, for easy lookups. For example, add your application order ID to a Order, your vendor unique number to a Vendor

Order detailsAnnotate a Order by storing an orders items for your later use.

Order Extra

The order extra object

Attributes

Order transfer Status description
uuid translation missing: ja.order_extra_data_type_uuid
extra_rule_uuid translation missing: ja.order_extra_data_type_extra_rule_uuid
order_uuid translation missing: ja.order_extra_data_type_order_uuid
order_serial translation missing: ja.order_extra_data_type_order_serial
type translation missing: ja.order_extra_data_type_type
name translation missing: ja.order_extra_data_type_name
value translation missing: ja.order_extra_data_type_value
amount translation missing: ja.order_extra_data_type_amount
inclusive translation missing: ja.order_extra_data_type_inclusive
currency translation missing: ja.order_extra_data_type_currency

FormData

Parameter Type Default Required Description
type string translation missing: ja.order_extra_form_data_type
name string translation missing: ja.order_extra_form_data_name
value string translation missing: ja.order_extra_form_data_value
inclusive bool translation missing: ja.order_extra_form_data_inclusive

Pagination

Response Example

{
    "data": [
        {
            "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "object": "order",
            "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "status": "owlpay.order_unconfirmed",
            "status_group": "submit",
            "is_checked": false,
            "is_allow_transfer": false,
            "is_allow_close": false,
            "is_allow_confirmed": false,
            "is_allow_correction": false,
            "deny_transfer_reasons": [],
            "order_serial": "ORD20220101010101001",
            "application_order_serial": "ORD20220101010101001",
            "application_order_created_at": "2022-04-07T16:27:41+00:00",
            "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
            "last_reject_transfer_reason": null,
            "is_rejected": false,
            "currency": "TWD",
            "total": 100012,
            "original_total": 100012,
            "display_currency": "TWD",
            "created_at": "2022-04-07T16:27:41+00:00",
            "updated_at": "2022-04-07T16:40:45+00:00",
            "vendor_uuid": "ven_xxxxxxxxxxx",
            "vendor_name": "Your Vendor Name",
            "application_vendor_uuid": "0001",
            "is_vendor_kyc_passed": true,
            "description": null,
            "meta_data": {},
            "status_logs": [
                {
                    "name": "Incomplete reconciliation",
                    "is_current": false,
                    "updated_time_at": "2022-04-07T16:27:41+00:00"
                },
                {
                    "name": "Pending for approval",
                    "is_current": true,
                    "updated_time_at": "2022-04-07T16:40:45+00:00"
                },
                {
                    "name": "Approved",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Pending for payment",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Paid successfully",
                    "is_current": false,
                    "updated_time_at": null
                }
            ],
            "order_extras": {
                "inclusive": {
                    "total": 0,
                    "items": []
                },
                "exclusive": {
                    "total": 0,
                    "items": []
                }
            },
            "closed_transfer_reason": null,
            "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
            "accounting_uuid": null,
            "vendor_status": "approved",
            "is_has_need_correction": false,
            "import_uuid": null,
            "is_from_import": false
        },
        {...},
        {...},
    ],
    "status": 200,
    "pagination": {
        "total": 65,
        "count": 12,
        "perPage": 12,
        "currentPage": 1,
        "totalPages": 6,
        "links": {
            "next": "http://owlpay.owlting.worker/api/platform/applications/app_9KITy3ziM4Z841FX6dkRnYl/orders?q=%2Fapi%2Fplatform%2Fapplications%2Fapp_9KITy3ziM4Z841FX6dkRnYl%2Forders&page=2"
        }
    }
}

These list API methods share a common structure, taking at least these three parameters: limit, page.

Our client libraries offer Auto-pagination helpers to easily traverse all pages of a list.

Parameters

Parameter Description
limit A limit on the number of objects to be returned(default 12).
page page

List Response Format

Parameter Description
total A limit on the number of objects to be returned, between 1 and 100. default return 12 items.
count current page items count.
perPage per page items count.
currenctPage currenct page.
totalPages total pages count.
links return next or prev links when they exist.

CORE RESOURCES

Order

The order object

Response Example

{
    "data": {
        "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
        "object": "order",
        "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
        "status": "owlpay.order_unconfirmed",
        "status_group": "submit",
        "is_checked": false,
        "is_allow_transfer": false,
        "is_allow_close": false,
        "is_allow_confirmed": false,
        "is_allow_correction": false,
        "deny_transfer_reasons": [],
        "order_serial": "ORD20220101010101001",
        "application_order_serial": "ORD20220101010101001",
        "application_order_created_at": "2022-04-07T16:27:41+00:00",
        "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
        "last_reject_transfer_reason": null,
        "is_rejected": false,
        "currency": "TWD",
        "total": 100012,
        "original_total": 100012,
        "display_currency": "TWD",
        "created_at": "2022-04-07T16:27:41+00:00",
        "updated_at": "2022-04-07T16:40:45+00:00",
        "vendor_uuid": "ven_xxxxxxxxxxx",
        "vendor_name": "Your Vendor Name",
        "application_vendor_uuid": "0001",
        "is_vendor_kyc_passed": true,
        "description": null,
        "meta_data": {},
        "status_logs": [
            {
                "name": "Incomplete reconciliation",
                "is_current": false,
                "updated_time_at": "2022-04-07T16:27:41+00:00"
            },
            {
                "name": "Pending for approval",
                "is_current": true,
                "updated_time_at": "2022-04-07T16:40:45+00:00"
            },
            {
                "name": "Approved",
                "is_current": false,
                "updated_time_at": null
            },
            {
                "name": "Pending for payment",
                "is_current": false,
                "updated_time_at": null
            },
            {
                "name": "Paid successfully",
                "is_current": false,
                "updated_time_at": null
            }
        ],
        "order_extras": {
            "inclusive": {
                "total": 0,
                "items": []
            },
            "exclusive": {
                "total": 0,
                "items": []
            }
        },
        "closed_transfer_reason": null,
        "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
        "accounting_uuid": null,
        "vendor_status": "approved",
        "is_has_need_correction": false,
        "import_uuid": null,
        "is_from_import": false
    },
    "status": 200
}

Attributes

Parameter Type Description
order_token string 訂單於 OwlPay 識別碼 (同 uuid)
object string 物件名稱
uuid string 訂單識別碼
status string 訂單狀態
is_checked boolean 是否已完成審核
order_serial string 訂單於 application 的訂單編號 (同 application_order_serial)
application_order_serial string 訂單於 application 的訂單編號
application_order_created_at datetime 訂單於 application 建立時間
last_reject_transfer_reason string 訂單最後被審核駁回的原因
is_rejected boolean Has the review been rejected
currency string 幣別
total decimal 訂單金額(成本價)
original_total decimal translation missing: ja.order_data_type_original_total
display_currency string application 預設顯示幣別
created_at datetime 訂單於 OwlPay 時間
vendor_uuid string 供應商(Vendor) 識別碼
vendor_name string 供應商(Vendor) 名稱
application_vendor_uuid string 供應商(Vendor) 於 application 端識別碼
description string 訂單敘述
meta_data array key-value 資料 (ref: Meta Data)
order_extras array translation missing: ja.order_data_type_order_extras

Order Status

Order Status description
owlpay.received_order OwlPay received order from application (Your System)
platform.order_cancelled Application cancelled orders
vendor.order_unconfirmed Application initiates order reconciliation request (order_transfer) to the vendor to check
platform.order_unconfirmed Vendor initiates order reconciliation request (order_transfer) to the application to check
owlpay.order_confirmed The order transfer is completed (to check the review of reconciliation order is rejected or approved, see is_reject is true or false in order object)
owlpay.order_rejected The order reconciliation request (order_transfer) has been rejected
owlpay.order_settled The order reconciliation request (order_transfer) has been settled(approved)
bank.transfer_start The bank received payout instruction to vendor (transaction starts)
bank.transfer_end The bank received payout instruction to vendor (transaction ends)

List all order status

PROTECTget

https://api.owlpay.com/api/v1/platform/tunnel/orders/status

{
    "data": [
        {
            "name": "owlpay.received_order",
            "description": "已匯入"
        },
        {
            "name": "platform.order_cancelled",
            "description": "已取消"
        },
        {
            "name": "vendor.order_unconfirmed",
            "description": "已申請對帳"
        }pu,
        {
            "name": "platform.order_unconfirmed",
            "description": "供應商對帳確認中"
        },
        {
            "name": "owlpay.order_confirmed",
            "description": "雙方已確認對帳"
        },
        {
            "name": "bank.transfer_start",
            "description": "銀行交易處理中"
        },
        {
            "name": "bank.transfer_end",
            "description": "銀行交易完成"
        },
        {
            "name": "dest_bank.validated",
            "description": "銀行款項已確認"
        },
        {
            "name": "owlpay.order_settled",
            "description": "已結清"
        }
    ],
    "status": 200
}

Meta Query

Parameter Type Default Description
lang string en support lang (en, ja, zh_tw, vi, th)
Order Status description
owlpay.received_order OwlPay received order from application (Your System)
platform.order_cancelled Application cancelled orders
vendor.order_unconfirmed Application initiates order reconciliation request (order_transfer) to the vendor to check
platform.order_unconfirmed Vendor initiates order reconciliation request (order_transfer) to the application to check
owlpay.order_confirmed The order transfer is completed (to check the review of reconciliation order is rejected or approved, see is_reject is true or false in order object)
owlpay.order_rejected The order reconciliation request (order_transfer) has been rejected
owlpay.order_settled The order reconciliation request (order_transfer) has been settled(approved)
bank.transfer_start The bank received payout instruction to vendor (transaction starts)
bank.transfer_end The bank received payout instruction to vendor (transaction ends)

Create a order

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders \
  -u <application_secret>: \
  -d order_serial="OPY12345678" \
  -d currency='TWD' \
  -d total=10000 \
  -d vendor_uuid=<vendor_uuid> \ 
  -d "meta_data[order_id]"=9527

Response Example

{
    "data": {
        "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
        "object": "order",
        "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
        "status": "owlpay.order_unconfirmed",
        "status_group": "submit",
        "is_checked": false,
        "is_allow_transfer": false,
        "is_allow_close": false,
        "is_allow_confirmed": false,
        "is_allow_correction": false,
        "deny_transfer_reasons": [],
        "order_serial": "ORD20220101010101001",
        "application_order_serial": "ORD20220101010101001",
        "application_order_created_at": "2022-04-07T16:27:41+00:00",
        "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
        "last_reject_transfer_reason": null,
        "is_rejected": false,
        "currency": "TWD",
        "total": 100012,
        "original_total": 100012,
        "display_currency": "TWD",
        "created_at": "2022-04-07T16:27:41+00:00",
        "updated_at": "2022-04-07T16:40:45+00:00",
        "vendor_uuid": "ven_xxxxxxxxxxx",
        "vendor_name": "Your Vendor Name",
        "application_vendor_uuid": "0001",
        "is_vendor_kyc_passed": true,
        "description": null,
        "meta_data": {},
        "status_logs": [
            {
                "name": "Incomplete reconciliation",
                "is_current": false,
                "updated_time_at": "2022-04-07T16:27:41+00:00"
            },
            {
                "name": "Pending for approval",
                "is_current": true,
                "updated_time_at": "2022-04-07T16:40:45+00:00"
            },
            {
                "name": "Approved",
                "is_current": false,
                "updated_time_at": null
            },
            {
                "name": "Pending for payment",
                "is_current": false,
                "updated_time_at": null
            },
            {
                "name": "Paid successfully",
                "is_current": false,
                "updated_time_at": null
            }
        ],
        "order_extras": {
            "inclusive": {
                "total": 0,
                "items": []
            },
            "exclusive": {
                "total": 0,
                "items": []
            }
        },
        "closed_transfer_reason": null,
        "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
        "accounting_uuid": null,
        "vendor_status": "approved",
        "is_has_need_correction": false,
        "import_uuid": null,
        "is_from_import": false
    },
    "status": 200
}

PROTECTpost

https://api.owlpay.com/api/v1/platform/tunnel/orders

FormData

Parameter Type Default Required Description
currency string Follows ISO currency code, please fill in upper case
total decimal Order total from Application
application_order_uuid string Order serial number from Application
is_force_create boolean false If set to True, OwlPay will create a new order even the order number already exists
description string Order description
vendor_uuid string Vendor's unique identifier on OwlPay used for updating vendor's information
application_vendor_uuid string Vendor's unique identifier on Application (must fill in "vendor_uuid" or "application_vendor_uuid")
order_created_at datetime Order created time on OwlPay. Time format follows ISO8601(W3C) Complete date plus hours, minutes and seconds:YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
allow_transfer_time_at datetime Allowable time for reconciliation
meta_data array Key-Value data (ref: Meta Data)
order_extras array translation missing: ja.order_detail_form_data_order_extras

Response

Parameter Type Description
order_token string 訂單於 OwlPay 識別碼 (同 uuid)
object string 物件名稱
uuid string 訂單識別碼
status string 訂單狀態
is_checked boolean 是否已完成審核
order_serial string 訂單於 application 的訂單編號 (同 application_order_serial)
application_order_serial string 訂單於 application 的訂單編號
application_order_created_at datetime 訂單於 application 建立時間
last_reject_transfer_reason string 訂單最後被審核駁回的原因
is_rejected boolean Has the review been rejected
currency string 幣別
total decimal 訂單金額(成本價)
original_total decimal translation missing: ja.order_data_type_original_total
display_currency string application 預設顯示幣別
created_at datetime 訂單於 OwlPay 時間
vendor_uuid string 供應商(Vendor) 識別碼
vendor_name string 供應商(Vendor) 名稱
application_vendor_uuid string 供應商(Vendor) 於 application 端識別碼
description string 訂單敘述
meta_data array key-value 資料 (ref: Meta Data)
order_extras array translation missing: ja.order_data_type_order_extras

Create orders (batch)

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders/batch \
  -u <application_secret>: \
  -d "orders[0][vendor_uuid]"=<vendor_uuid> \ 
  -d "orders[0][order_serial]"="OPY12345678" \
  -d "orders[0][currency]"="TWD" \
  -d "orders[0][total]"=10000 \
  -d "orders[0][meta_data][order_id]"=9527

Response Example

{
    "data": [
        {
            "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "object": "order",
            "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "status": "owlpay.order_unconfirmed",
            "status_group": "submit",
            "is_checked": false,
            "is_allow_transfer": false,
            "is_allow_close": false,
            "is_allow_confirmed": false,
            "is_allow_correction": false,
            "deny_transfer_reasons": [],
            "order_serial": "ORD20220101010101001",
            "application_order_serial": "ORD20220101010101001",
            "application_order_created_at": "2022-04-07T16:27:41+00:00",
            "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
            "last_reject_transfer_reason": null,
            "is_rejected": false,
            "currency": "TWD",
            "total": 100012,
            "original_total": 100012,
            "display_currency": "TWD",
            "created_at": "2022-04-07T16:27:41+00:00",
            "updated_at": "2022-04-07T16:40:45+00:00",
            "vendor_uuid": "ven_xxxxxxxxxxx",
            "vendor_name": "Your Vendor Name",
            "application_vendor_uuid": "0001",
            "is_vendor_kyc_passed": true,
            "description": null,
            "meta_data": {},
            "status_logs": [
                {
                    "name": "Incomplete reconciliation",
                    "is_current": false,
                    "updated_time_at": "2022-04-07T16:27:41+00:00"
                },
                {
                    "name": "Pending for approval",
                    "is_current": true,
                    "updated_time_at": "2022-04-07T16:40:45+00:00"
                },
                {
                    "name": "Approved",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Pending for payment",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Paid successfully",
                    "is_current": false,
                    "updated_time_at": null
                }
            ],
            "order_extras": {
                "inclusive": {
                    "total": 0,
                    "items": []
                },
                "exclusive": {
                    "total": 0,
                    "items": []
                }
            },
            "closed_transfer_reason": null,
            "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
            "accounting_uuid": null,
            "vendor_status": "approved",
            "is_has_need_correction": false,
            "import_uuid": null,
            "is_from_import": false
        },
        {...},
        {...},
    ],
    "status": 200,
    "pagination": {
        "total": 65,
        "count": 12,
        "perPage": 12,
        "currentPage": 1,
        "totalPages": 6,
        "links": {
            "next": "http://owlpay.owlting.worker/api/platform/applications/app_9KITy3ziM4Z841FX6dkRnYl/orders?q=%2Fapi%2Fplatform%2Fapplications%2Fapp_9KITy3ziM4Z841FX6dkRnYl%2Forders&page=2"
        }
    }
}

PROTECTpost

https://api.owlpay.com/api/v1/platform/tunnel/orders/batch

FormData

Parameter Type Default Required Description
currency string Follows ISO currency code, please fill in upper case
total decimal Order total from Application
application_order_uuid string Order serial number from Application
is_force_create boolean false If set to True, OwlPay will create a new order even the order number already exists
description string Order description
vendor_uuid string Vendor's unique identifier on OwlPay used for updating vendor's information
application_vendor_uuid string Vendor's unique identifier on Application (must fill in "vendor_uuid" or "application_vendor_uuid")
order_created_at datetime Order created time on OwlPay. Time format follows ISO8601(W3C) Complete date plus hours, minutes and seconds:YYYY-MM-DDThh:mm:ssTZD (eg 1997-07-16T19:20:30+01:00)
allow_transfer_time_at datetime Allowable time for reconciliation
meta_data array Key-Value data (ref: Meta Data)
order_extras array translation missing: ja.order_detail_form_data_order_extras

Response

Parameter Type Description
uuid string 訂單識別碼
object string 物件名稱
status string 訂單狀態
application_order_serial string 訂單於 application 的訂單編號
application_order_created_at datetime 訂單於 application 建立時間
created_at datetime 訂單於 OwlPay 時間
currency string 幣別
total decimal 訂單金額(成本價)
vendor_uuid string 供應商(Vendor) 識別碼
vendor_name string 供應商(Vendor) 名稱
application_vendor_uuid string 供應商(Vendor) 於 application 端識別碼

Retrieve a order

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders/{order_uuid} \
  -u <application_secret>:

Response Example

{
    "data": {
        "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
        "object": "order",
        "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
        "status": "owlpay.order_unconfirmed",
        "status_group": "submit",
        "is_checked": false,
        "is_allow_transfer": false,
        "is_allow_close": false,
        "is_allow_confirmed": false,
        "is_allow_correction": false,
        "deny_transfer_reasons": [],
        "order_serial": "ORD20220101010101001",
        "application_order_serial": "ORD20220101010101001",
        "application_order_created_at": "2022-04-07T16:27:41+00:00",
        "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
        "last_reject_transfer_reason": null,
        "is_rejected": false,
        "currency": "TWD",
        "total": 100012,
        "original_total": 100012,
        "display_currency": "TWD",
        "created_at": "2022-04-07T16:27:41+00:00",
        "updated_at": "2022-04-07T16:40:45+00:00",
        "vendor_uuid": "ven_xxxxxxxxxxx",
        "vendor_name": "Your Vendor Name",
        "application_vendor_uuid": "0001",
        "is_vendor_kyc_passed": true,
        "description": null,
        "meta_data": {},
        "status_logs": [
            {
                "name": "Incomplete reconciliation",
                "is_current": false,
                "updated_time_at": "2022-04-07T16:27:41+00:00"
            },
            {
                "name": "Pending for approval",
                "is_current": true,
                "updated_time_at": "2022-04-07T16:40:45+00:00"
            },
            {
                "name": "Approved",
                "is_current": false,
                "updated_time_at": null
            },
            {
                "name": "Pending for payment",
                "is_current": false,
                "updated_time_at": null
            },
            {
                "name": "Paid successfully",
                "is_current": false,
                "updated_time_at": null
            }
        ],
        "order_extras": {
            "inclusive": {
                "total": 0,
                "items": []
            },
            "exclusive": {
                "total": 0,
                "items": []
            }
        },
        "closed_transfer_reason": null,
        "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
        "accounting_uuid": null,
        "vendor_status": "approved",
        "is_has_need_correction": false,
        "import_uuid": null,
        "is_from_import": false
    },
    "status": 200
}

PROTECTget

https://api.owlpay.com/api/v1/platform/tunnel/orders/{order_uuid}

Response

Parameter Type Description
order_token string 訂單於 OwlPay 識別碼 (同 uuid)
object string 物件名稱
uuid string 訂單識別碼
status string 訂單狀態
is_checked boolean 是否已完成審核
order_serial string 訂單於 application 的訂單編號 (同 application_order_serial)
application_order_serial string 訂單於 application 的訂單編號
application_order_created_at datetime 訂單於 application 建立時間
last_reject_transfer_reason string 訂單最後被審核駁回的原因
is_rejected boolean Has the review been rejected
currency string 幣別
total decimal 訂單金額(成本價)
original_total decimal translation missing: ja.order_data_type_original_total
display_currency string application 預設顯示幣別
created_at datetime 訂單於 OwlPay 時間
vendor_uuid string 供應商(Vendor) 識別碼
vendor_name string 供應商(Vendor) 名稱
application_vendor_uuid string 供應商(Vendor) 於 application 端識別碼
description string 訂單敘述
meta_data array key-value 資料 (ref: Meta Data)
order_extras array translation missing: ja.order_data_type_order_extras

Cancel orders

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors \
  -u <application_secret>: \
  -d "order_uuids[]=OPY12343210001" \
  -d "order_uuids[]=OPY12343210002"

Response Example

{
    "data": [
        {
            "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "object": "order",
            "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "status": "owlpay.order_unconfirmed",
            "status_group": "submit",
            "is_checked": false,
            "is_allow_transfer": false,
            "is_allow_close": false,
            "is_allow_confirmed": false,
            "is_allow_correction": false,
            "deny_transfer_reasons": [],
            "order_serial": "ORD20220101010101001",
            "application_order_serial": "ORD20220101010101001",
            "application_order_created_at": "2022-04-07T16:27:41+00:00",
            "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
            "last_reject_transfer_reason": null,
            "is_rejected": false,
            "currency": "TWD",
            "total": 100012,
            "original_total": 100012,
            "display_currency": "TWD",
            "created_at": "2022-04-07T16:27:41+00:00",
            "updated_at": "2022-04-07T16:40:45+00:00",
            "vendor_uuid": "ven_xxxxxxxxxxx",
            "vendor_name": "Your Vendor Name",
            "application_vendor_uuid": "0001",
            "is_vendor_kyc_passed": true,
            "description": null,
            "meta_data": {},
            "status_logs": [
                {
                    "name": "Incomplete reconciliation",
                    "is_current": false,
                    "updated_time_at": "2022-04-07T16:27:41+00:00"
                },
                {
                    "name": "Pending for approval",
                    "is_current": true,
                    "updated_time_at": "2022-04-07T16:40:45+00:00"
                },
                {
                    "name": "Approved",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Pending for payment",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Paid successfully",
                    "is_current": false,
                    "updated_time_at": null
                }
            ],
            "order_extras": {
                "inclusive": {
                    "total": 0,
                    "items": []
                },
                "exclusive": {
                    "total": 0,
                    "items": []
                }
            },
            "closed_transfer_reason": null,
            "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
            "accounting_uuid": null,
            "vendor_status": "approved",
            "is_has_need_correction": false,
            "import_uuid": null,
            "is_from_import": false
        },
        {...},
        {...},
    ],
    "status": 200,
    "pagination": {
        "total": 65,
        "count": 12,
        "perPage": 12,
        "currentPage": 1,
        "totalPages": 6,
        "links": {
            "next": "http://owlpay.owlting.worker/api/platform/applications/app_9KITy3ziM4Z841FX6dkRnYl/orders?q=%2Fapi%2Fplatform%2Fapplications%2Fapp_9KITy3ziM4Z841FX6dkRnYl%2Forders&page=2"
        }
    }
}

PROTECTput

https://api.owlpay.com/api/v1/platform/tunnel/orders/cancel

FormData

Parameter Type Default Required Description
order_uuids array Fill in *application_order_serials* or *order_uuids* to cancel order
application_order_serials array Fill in *application_order_serials* or *order_uuids* to cancel orders on Application

Response

Parameter Type Description
uuid string 訂單識別碼
object string 物件名稱
status string 訂單狀態
application_order_serial string 訂單於 application 的訂單編號
application_order_created_at datetime 訂單於 application 建立時間
created_at datetime 訂單於 OwlPay 時間
currency string 幣別
total decimal 訂單金額(成本價)
vendor_uuid string 供應商(Vendor) 識別碼
vendor_name string 供應商(Vendor) 名稱
application_vendor_uuid string 供應商(Vendor) 於 application 端識別碼

List all orders

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders \
  -u <application_secret>:

Response Example

{
    "data": [
        {
            "order_token": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "object": "order",
            "uuid": "ord_978be7deca82a65525f74bec7a3077cf26138409d8838cce0cca5fbfbe4b02d7",
            "status": "owlpay.order_unconfirmed",
            "status_group": "submit",
            "is_checked": false,
            "is_allow_transfer": false,
            "is_allow_close": false,
            "is_allow_confirmed": false,
            "is_allow_correction": false,
            "deny_transfer_reasons": [],
            "order_serial": "ORD20220101010101001",
            "application_order_serial": "ORD20220101010101001",
            "application_order_created_at": "2022-04-07T16:27:41+00:00",
            "allow_transfer_time_at": "2022-04-07T16:00:00+00:00",
            "last_reject_transfer_reason": null,
            "is_rejected": false,
            "currency": "TWD",
            "total": 100012,
            "original_total": 100012,
            "display_currency": "TWD",
            "created_at": "2022-04-07T16:27:41+00:00",
            "updated_at": "2022-04-07T16:40:45+00:00",
            "vendor_uuid": "ven_xxxxxxxxxxx",
            "vendor_name": "Your Vendor Name",
            "application_vendor_uuid": "0001",
            "is_vendor_kyc_passed": true,
            "description": null,
            "meta_data": {},
            "status_logs": [
                {
                    "name": "Incomplete reconciliation",
                    "is_current": false,
                    "updated_time_at": "2022-04-07T16:27:41+00:00"
                },
                {
                    "name": "Pending for approval",
                    "is_current": true,
                    "updated_time_at": "2022-04-07T16:40:45+00:00"
                },
                {
                    "name": "Approved",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Pending for payment",
                    "is_current": false,
                    "updated_time_at": null
                },
                {
                    "name": "Paid successfully",
                    "is_current": false,
                    "updated_time_at": null
                }
            ],
            "order_extras": {
                "inclusive": {
                    "total": 0,
                    "items": []
                },
                "exclusive": {
                    "total": 0,
                    "items": []
                }
            },
            "closed_transfer_reason": null,
            "order_transfer_uuid": "otr_LgURkR4yTufr2j5fyW2WMGH",
            "accounting_uuid": null,
            "vendor_status": "approved",
            "is_has_need_correction": false,
            "import_uuid": null,
            "is_from_import": false
        },
        {...},
        {...},
    ],
    "status": 200,
    "pagination": {
        "total": 65,
        "count": 12,
        "perPage": 12,
        "currentPage": 1,
        "totalPages": 6,
        "links": {
            "next": "http://owlpay.owlting.worker/api/platform/applications/app_9KITy3ziM4Z841FX6dkRnYl/orders?q=%2Fapi%2Fplatform%2Fapplications%2Fapp_9KITy3ziM4Z841FX6dkRnYl%2Forders&page=2"
        }
    }
}

PROTECTget

https://api.owlpay.com/api/v1/platform/tunnel/orders

Query

Parameter Type Description
currency string Order currency
vendor_uuid string Vendor's unique identifier on OwlPay used for updating vendor's information (prefix: ven_) (ref:The vendor object)
vendor_email string Vendor email on your application (ref:The vendor object)
application_order_serial string Array, unique order number(serial) on your Application (ref:The order object)
application_order_serials array Array, unique order number(serial) on your Application (ref:The order object)
order_uuid string Unique order identifier on OwlPay (prefix: ord_) (ref:The order object)
order_uuids array Array, unique order identifier on OwlPay (ref:The order object)
order_status string Order status (ref:The order object)
application_vendor_uuid string Unique vendor identifier on Application (ref:The vendor object)
during_created_at string Order created time on OwlPay format:ISO8601(W3C)
during_order_created_at array Order created time on your Application (default timezone: UTC+0) (ref:The order object)
during_allow_transfer_time_at array Allowable time for reconciliation
is_rejected boolean 注文が拒否されました
is_vendor_kyc_passed boolean Is the KYC status of vendor approved
uuid_query string OwlPay uuid query (order uuid / orders reconciliation uuid / accounting uuid)
vendor_status_list array Search orders by vendor status (uncheck / approved / deleted)
import_uuid string Imported order uuid
import_uuids array Array, imported order uuid

Query for pagination

Parameter Type Default Description
page int 1 ref: Pagination
limit int 12 ref: Pagination

Response

Parameter Type Description
uuid string 訂單識別碼
object string 物件名稱
status string 訂單狀態
application_order_serial string 訂單於 application 的訂單編號
application_order_created_at datetime 訂單於 application 建立時間
created_at datetime 訂單於 OwlPay 時間
currency string 幣別
total decimal 訂單金額(成本價)
vendor_uuid string 供應商(Vendor) 識別碼
vendor_name string 供應商(Vendor) 名稱
application_vendor_uuid string 供應商(Vendor) 於 application 端識別碼

Orders reconciliation

The orders reconciliation object

Response Example

{
    "data": {
        "is_test": true,
        "is_pair_approval": false,
        "group_uuid": null,
        "uuid": "otr_lBfu9B0YZmzk6nRb5SzznIS",
        "object": "order_transfer",
        "uncheck_count": 0,
        "checked_count": 1,
        "currency": "TWD",
        "status": "settled",
        "total": 2980,
        "settled_total": 0,
        "finished_at": "2021-03-28 09:08:27",
        "display_currency": "TWD",
        "display_total": 2980,
        "fee_currency": "TWD",
        "fee": 0,
        "display_fee_currency": "TWD",
        "display_fee": 0,
        "apply_user": {
            "object": "order_transfer.apply_user",
            "owlting_uuid": "08842a50-9940-11e8-b24c-5f482ae31d14",
            "name": "OwlPay Apply User",
            "email": "owlpay@owlting.com",
            "guard": "platform"
        },
        "orders": [
            {
                ...
            }
        ],
        "vendors": [
            {
                "object": "order_transfer.vendor",
                "application_vendor_uuid": "4dae51cf-c26f-41c2-9b89-202338ce5f3e",
                "uuid": "ven_xxxxxxxxxxxxxx",
                "email": "owlpay_vendor@gmail.com",
                "name": "OwlPay Vendor Name"
            }
        ],
        "created_at": "2021-03-19T08:19:02+00:00",
        "updated_at": "2021-03-28T09:08:27+00:00"
    },
    "status": 200
}

Attributes

Column Type Description
is_test boolean 是否為測試環境
is_allow_check boolean 是否允許當前使用者審核
is_allow_batch_finish boolean 是否允許批次審核同意
group_uuid string 目前沒有用,用於之後群組話對帳單識別碼
uuid string 對帳單識別碼
object string 物件名稱
uncheck_count int 未審核訂單數量
checked_count int 已審核訂單數量
status string 對帳單狀態
total decimal 審核單內所有訂單加總金額
settled_total decimal 已完成審核後的訂單總金額(=同意)
settled_count int 完成審核後的總訂單數量
finished_at datetime 完成審核時間
created_at datetime 對帳單建立時間
updated_at datetime 對帳單更新時間
orders array ref: the order object
vendors.*.application_vendor_uuid string 供應商於平台方 識別碼
vendors.*.uuid string 供應商於 owlpay 識別碼
vendors.*.email string 供應商 email
vendors.*.name string 供應商姓名
draft.approve_total decimal 草稿中的訂單同意總金額
draft.reject_total decimal 草稿中的訂單駁回總金額
draft.uncheck_total decimal 草稿中的訂單未審核總金額
draft.approve_count int 草稿中的訂單同意總數量
draft.reject_count int 草稿中的訂單駁回總數量
draft.uncheck_count int 草稿中的訂單審核總數
settled.total decimal 已完成審核後的訂單總金額(=同意)
settled.approve_total decimal 已完成審核後的訂單同意總金額
settled.reject_total decimal 已完成審核後的訂單駁回總金額
settled.approve_count int 已完成審核後的訂單同意金額
settled.reject_count int 已完成審核後的訂單駁回金額
apply_user.owlting_uuid string 申請人於 owlting 識別碼
apply_user.name string 申請人姓名
apply_user.email string 申請人email
apply_user.guard string 申請人身份 (vendors_users / platforms)

Create a orders reconciliation

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders_reconciliation \
  -u <application_secret>: \
  -d order_serials[0]="OPY00000001" \
  -d order_serials[1]="OPY00000002"

Response Example

{
    "data": {
        "is_test": true,
        "is_pair_approval": false,
        "group_uuid": null,
        "uuid": "otr_lBfu9B0YZmzk6nRb5SzznIS",
        "object": "order_transfer",
        "uncheck_count": 0,
        "checked_count": 1,
        "currency": "TWD",
        "status": "settled",
        "total": 2980,
        "settled_total": 0,
        "finished_at": "2021-03-28 09:08:27",
        "display_currency": "TWD",
        "display_total": 2980,
        "fee_currency": "TWD",
        "fee": 0,
        "display_fee_currency": "TWD",
        "display_fee": 0,
        "apply_user": {
            "object": "order_transfer.apply_user",
            "owlting_uuid": "08842a50-9940-11e8-b24c-5f482ae31d14",
            "name": "OwlPay Apply User",
            "email": "owlpay@owlting.com",
            "guard": "platform"
        },
        "orders": [
            {
                ...
            }
        ],
        "vendors": [
            {
                "object": "order_transfer.vendor",
                "application_vendor_uuid": "4dae51cf-c26f-41c2-9b89-202338ce5f3e",
                "uuid": "ven_xxxxxxxxxxxxxx",
                "email": "owlpay_vendor@gmail.com",
                "name": "OwlPay Vendor Name"
            }
        ],
        "created_at": "2021-03-19T08:19:02+00:00",
        "updated_at": "2021-03-28T09:08:27+00:00"
    },
    "status": 200
}

PROTECTpost

https://api.owlpay.com/api/v1/platform/tunnel/orders_reconciliation

FormData

Parameter Type Default Description
vendor_uuid string 供應商 識別碼
vendor_email string 供應商 Email
order_serial string 平台訂單編號
order_serials string 平台訂單編號陣列
order_uuid string 訂單 uuid
order_uuids array 訂單 uuid 陣列
order_status string 訂單狀態
customer_vendor_uuid string 供應商 於 application 端識別碼
during_order_created_at string 查詢訂單於 application 建立區間 (若未帶時區會以 UTC+0 來查詢時間) (&during_order_created_at=2020-12-17T00:00:00+08:00,2020-12-18T23:59:59+08:00)

Response

Column Type Description
is_test boolean 是否為測試環境
is_allow_check boolean 是否允許當前使用者審核
is_allow_batch_finish boolean 是否允許批次審核同意
group_uuid string 目前沒有用,用於之後群組話對帳單識別碼
uuid string 對帳單識別碼
object string 物件名稱
uncheck_count int 未審核訂單數量
checked_count int 已審核訂單數量
status string 對帳單狀態
total decimal 審核單內所有訂單加總金額
settled_total decimal 已完成審核後的訂單總金額(=同意)
settled_count int 完成審核後的總訂單數量
finished_at datetime 完成審核時間
created_at datetime 對帳單建立時間
updated_at datetime 對帳單更新時間
orders array ref: the order object
vendors.*.application_vendor_uuid string 供應商於平台方 識別碼
vendors.*.uuid string 供應商於 owlpay 識別碼
vendors.*.email string 供應商 email
vendors.*.name string 供應商姓名
draft.approve_total decimal 草稿中的訂單同意總金額
draft.reject_total decimal 草稿中的訂單駁回總金額
draft.uncheck_total decimal 草稿中的訂單未審核總金額
draft.approve_count int 草稿中的訂單同意總數量
draft.reject_count int 草稿中的訂單駁回總數量
draft.uncheck_count int 草稿中的訂單審核總數
settled.total decimal 已完成審核後的訂單總金額(=同意)
settled.approve_total decimal 已完成審核後的訂單同意總金額
settled.reject_total decimal 已完成審核後的訂單駁回總金額
settled.approve_count int 已完成審核後的訂單同意金額
settled.reject_count int 已完成審核後的訂單駁回金額
apply_user.owlting_uuid string 申請人於 owlting 識別碼
apply_user.name string 申請人姓名
apply_user.email string 申請人email
apply_user.guard string 申請人身份 (vendors_users / platforms)

Retrieve a orders reconciliation

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders_reconciliation/{orders_reconciliation_uuid} \
  -u <application_secret>:

Response Example

{
    "data": {
        "is_test": true,
        "is_pair_approval": false,
        "group_uuid": null,
        "uuid": "otr_lBfu9B0YZmzk6nRb5SzznIS",
        "object": "order_transfer",
        "uncheck_count": 0,
        "checked_count": 1,
        "currency": "TWD",
        "status": "settled",
        "total": 2980,
        "settled_total": 0,
        "finished_at": "2021-03-28 09:08:27",
        "display_currency": "TWD",
        "display_total": 2980,
        "fee_currency": "TWD",
        "fee": 0,
        "display_fee_currency": "TWD",
        "display_fee": 0,
        "apply_user": {
            "object": "order_transfer.apply_user",
            "owlting_uuid": "08842a50-9940-11e8-b24c-5f482ae31d14",
            "name": "OwlPay Apply User",
            "email": "owlpay@owlting.com",
            "guard": "platform"
        },
        "orders": [
            {
                ...
            }
        ],
        "vendors": [
            {
                "object": "order_transfer.vendor",
                "application_vendor_uuid": "4dae51cf-c26f-41c2-9b89-202338ce5f3e",
                "uuid": "ven_xxxxxxxxxxxxxx",
                "email": "owlpay_vendor@gmail.com",
                "name": "OwlPay Vendor Name"
            }
        ],
        "created_at": "2021-03-19T08:19:02+00:00",
        "updated_at": "2021-03-28T09:08:27+00:00"
    },
    "status": 200
}

PROTECTget

https://api.owlpay.com/api/v1/platform/tunnel/orders_reconciliation/{orders_reconciliation_uuid}

Response

Column Type Description
is_test boolean 是否為測試環境
is_allow_check boolean 是否允許當前使用者審核
is_allow_batch_finish boolean 是否允許批次審核同意
group_uuid string 目前沒有用,用於之後群組話對帳單識別碼
uuid string 對帳單識別碼
object string 物件名稱
uncheck_count int 未審核訂單數量
checked_count int 已審核訂單數量
status string 對帳單狀態
total decimal 審核單內所有訂單加總金額
settled_total decimal 已完成審核後的訂單總金額(=同意)
settled_count int 完成審核後的總訂單數量
finished_at datetime 完成審核時間
created_at datetime 對帳單建立時間
updated_at datetime 對帳單更新時間
orders array ref: the order object
vendors.*.application_vendor_uuid string 供應商於平台方 識別碼
vendors.*.uuid string 供應商於 owlpay 識別碼
vendors.*.email string 供應商 email
vendors.*.name string 供應商姓名
draft.approve_total decimal 草稿中的訂單同意總金額
draft.reject_total decimal 草稿中的訂單駁回總金額
draft.uncheck_total decimal 草稿中的訂單未審核總金額
draft.approve_count int 草稿中的訂單同意總數量
draft.reject_count int 草稿中的訂單駁回總數量
draft.uncheck_count int 草稿中的訂單審核總數
settled.total decimal 已完成審核後的訂單總金額(=同意)
settled.approve_total decimal 已完成審核後的訂單同意總金額
settled.reject_total decimal 已完成審核後的訂單駁回總金額
settled.approve_count int 已完成審核後的訂單同意金額
settled.reject_count int 已完成審核後的訂單駁回金額
apply_user.owlting_uuid string 申請人於 owlting 識別碼
apply_user.name string 申請人姓名
apply_user.email string 申請人email
apply_user.guard string 申請人身份 (vendors_users / platforms)

List order reconciliation status

Order transfer Status description
unconfirm 預設,都還沒審核過時
in_process 處理中(當某一對帳單細節被審核過)
wait_remit 同幣別(國內, 目前設置為只有TWD) 當對帳單被 finish 後,轉成等待被匯款 (wait_remit)
on_the_way_to_bank 同幣別(國內, 目前設置為只有TWD) 當使用者下載對帳單後並且尚未被覆核
settled 結清

List all orders reconciliation

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/orders_reconciliation \
  -u <application_secret>:

Response Example

{
    "data": [
        {
            "is_test": true,
            "is_pair_approval": false,
            "group_uuid": null,
            "uuid": "otr_lBfu9B0YZmzk6nRb5SzznIS",
            "object": "order_transfer",
            "uncheck_count": 0,
            "checked_count": 1,
            "currency": "TWD",
            "status": "settled",
            "total": 2980,
            "settled_total": 0,
            "finished_at": "2021-03-28 09:08:27",
            "display_currency": "TWD",
            "display_total": 2980,
            "fee_currency": "TWD",
            "fee": 0,
            "display_fee_currency": "TWD",
            "display_fee": 0,
            "apply_user": {
                "object": "order_transfer.apply_user",
                "owlting_uuid": "08842a50-9940-11e8-b24c-5f482ae31d14",
                "name": "OwlPay Apply User",
                "email": "owlpay@owlting.com",
                "guard": "platform"
            },
            "orders": [
                {
                    ...
                }
            ],
            "vendors": [
                {
                    "object": "order_transfer.vendor",
                    "application_vendor_uuid": "4dae51cf-c26f-41c2-9b89-202338ce5f3e",
                    "uuid": "ven_xxxxxxxxxxxxxx",
                    "email": "owlpay_vendor@gmail.com",
                    "name": "OwlPay Vendor Name"
                }
            ],
            "created_at": "2021-03-19T08:19:02+00:00",
            "updated_at": "2021-03-28T09:08:27+00:00"
        },
        {...},
        {...},
        ...
    ],
    "status": 200,
    "pagination": {
        "total": 39,
        "count": 12,
        "perPage": 12,
        "currentPage": 1,
        "totalPages": 4,
        "links": {
            "next": "http://owlpay.owlting.worker/api/platform/applications/app_9KITy3ziM4Z841FX6dkRnYl/orders_transfer?q=%2Fapi%2Fplatform%2Fapplications%2Fapp_9KITy3ziM4Z841FX6dkRnYl%2Forders_transfer&page=2"
        }
    }
}

PROTECTget

https://api.owlpay.com/api/v1/platform/tunnel/orders_reconciliation

Response

Column Type Description
is_test boolean 是否為測試環境
is_allow_check boolean 是否允許當前使用者審核
is_allow_batch_finish boolean 是否允許批次審核同意
group_uuid string 目前沒有用,用於之後群組話對帳單識別碼
uuid string 對帳單識別碼
object string 物件名稱
uncheck_count int 未審核訂單數量
checked_count int 已審核訂單數量
status string 對帳單狀態
total decimal 審核單內所有訂單加總金額
settled_total decimal 已完成審核後的訂單總金額(=同意)
settled_count int 完成審核後的總訂單數量
finished_at datetime 完成審核時間
created_at datetime 對帳單建立時間
updated_at datetime 對帳單更新時間
orders array ref: the order object
vendors.*.application_vendor_uuid string 供應商於平台方 識別碼
vendors.*.uuid string 供應商於 owlpay 識別碼
vendors.*.email string 供應商 email
vendors.*.name string 供應商姓名
draft.approve_total decimal 草稿中的訂單同意總金額
draft.reject_total decimal 草稿中的訂單駁回總金額
draft.uncheck_total decimal 草稿中的訂單未審核總金額
draft.approve_count int 草稿中的訂單同意總數量
draft.reject_count int 草稿中的訂單駁回總數量
draft.uncheck_count int 草稿中的訂單審核總數
settled.total decimal 已完成審核後的訂單總金額(=同意)
settled.approve_total decimal 已完成審核後的訂單同意總金額
settled.reject_total decimal 已完成審核後的訂單駁回總金額
settled.approve_count int 已完成審核後的訂單同意金額
settled.reject_count int 已完成審核後的訂單駁回金額
apply_user.owlting_uuid string 申請人於 owlting 識別碼
apply_user.name string 申請人姓名
apply_user.email string 申請人email
apply_user.guard string 申請人身份 (vendors_users / platforms)

Vendor

The vendor object

{
  "data": {
    "uuid": "ven_2psRYn3k90lZ1H0H49TcLhg",
    "object": "vendor",
    "application_vendor_uuid": "16584585454784",
    "name": "VendorTest_1658458545",
    "email": "VendorTest_1658458545_7829@owlpay.com",
    "description": "",
    "note": null,
    "is_removed": false,
    "is_active": false,
    "is_vendor_kyc_passed": false,
    "status": "uncheck",
    "kyc_status_list": {
      "remit_info": { "status": "unchecked", "is_allow_update": true }
    },
    "country_iso": "TW",
    "is_invited": false,
    "is_registered": false,
    "remit_info": [
      {
        "id": 4856,
        "status": 0,
        "sort": 0,
        "payout_gateway": "MyB2B_batch_payout",
        "is_enable": 1,
        "detail": {
          "country_code": "TW",
          "bank_code": "013",
          "branch_code": "0130017",
          "account": "264200000000",
          "account_name": "OWLPAYMARAS",
          "currency": "TWD"
        }
      },
      {...}
    ]
  },
  "status": 200
}

Attributes

Parameter Type Description
uuid string 供應商識別碼
object string 供應商物件
application_vendor_uuid string 供應商於 application 識別碼
name string 供應商名稱
email string 供應商電子郵件
description string 供應商敘述
vendor_information array 供應商資料 (KYC)
contact array 供應商聯絡人資訊 (KYC)
remit_info array 供應商付款資訊 (KYC)

Create a vendor

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors \
  -u <application_secret>: \
  -d name="OwlPay Vendor Name" \
  -d email="owlting@owlpay.com" \
  -d country_iso="TW"
{
  "data": {
    "uuid": "ven_2psRYn3k90lZ1H0H49TcLhg",
    "object": "vendor",
    "application_vendor_uuid": "16584585454784",
    "name": "VendorTest_1658458545",
    "email": "VendorTest_1658458545_7829@owlpay.com",
    "description": "",
    "note": null,
    "is_removed": false,
    "is_active": false,
    "is_vendor_kyc_passed": false,
    "status": "uncheck",
    "kyc_status_list": {
      "remit_info": { "status": "unchecked", "is_allow_update": true }
    },
    "country_iso": "TW",
    "is_invited": false,
    "is_registered": false,
    "remit_info": [
      {
        "id": 4856,
        "status": 0,
        "sort": 0,
        "payout_gateway": "MyB2B_batch_payout",
        "is_enable": 1,
        "detail": {
          "country_code": "TW",
          "bank_code": "013",
          "branch_code": "0130017",
          "account": "264200000000",
          "account_name": "OWLPAYMARAS",
          "currency": "TWD"
        }
      },
      {...}
    ]
  },
  "status": 200
}

PROTECTpost https://api.owlpay.com/api/v1/platform/tunnel/vendors

FormData

Parameter Type Default Required Description
name string 供應商名稱
country_iso string Vendor country
uuid string 供應商於 OwlPay 的識別碼
application_vendor_uuid string 供應商於 application 識別碼
email string 供應商電子郵件
description string 供應商敘述

Response

Parameter Type Description
uuid string 供應商識別碼
object string 供應商物件
application_vendor_uuid string 供應商於 application 識別碼
name string 供應商名稱
email string 供應商電子郵件
description string 供應商敘述
vendor_information array 供應商資料 (KYC)
contact array 供應商聯絡人資訊 (KYC)
remit_info array 供應商付款資訊 (KYC)

Update a vendor

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid} \
  -u <application_secret>: \
  -d name="OwlPay Vendor Name" \
  -d email="owlting@owlpay.com" \
  -d country_iso="TW"
{
  "data": {
    "uuid": "ven_2psRYn3k90lZ1H0H49TcLhg",
    "object": "vendor",
    "application_vendor_uuid": "16584585454784",
    "name": "VendorTest_1658458545",
    "email": "VendorTest_1658458545_7829@owlpay.com",
    "description": "",
    "note": null,
    "is_removed": false,
    "is_active": false,
    "is_vendor_kyc_passed": false,
    "status": "uncheck",
    "kyc_status_list": {
      "remit_info": { "status": "unchecked", "is_allow_update": true }
    },
    "country_iso": "TW",
    "is_invited": false,
    "is_registered": false,
    "remit_info": [
      {
        "id": 4856,
        "status": 0,
        "sort": 0,
        "payout_gateway": "MyB2B_batch_payout",
        "is_enable": 1,
        "detail": {
          "country_code": "TW",
          "bank_code": "013",
          "branch_code": "0130017",
          "account": "264200000000",
          "account_name": "OWLPAYMARAS",
          "currency": "TWD"
        }
      },
      {...}
    ]
  },
  "status": 200
}

PROTECTput https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}

FormData

Parameter Type Default Required Description
name string 供應商名稱
country_iso string Vendor country
uuid string 供應商於 OwlPay 的識別碼
application_vendor_uuid string 供應商於 application 識別碼
email string 供應商電子郵件
description string 供應商敘述

Response

Parameter Type Description
uuid string 供應商識別碼
object string 供應商物件
application_vendor_uuid string 供應商於 application 識別碼
name string 供應商名稱
email string 供應商電子郵件
description string 供應商敘述
vendor_information array 供應商資料 (KYC)
contact array 供應商聯絡人資訊 (KYC)
remit_info array 供應商付款資訊 (KYC)

Retrieve a vendor

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid} \
-u <application_secret>
{
  "data": {
    "uuid": "ven_2psRYn3k90lZ1H0H49TcLhg",
    "object": "vendor",
    "application_vendor_uuid": "16584585454784",
    "name": "VendorTest_1658458545",
    "email": "VendorTest_1658458545_7829@owlpay.com",
    "description": "",
    "note": null,
    "is_removed": false,
    "is_active": false,
    "is_vendor_kyc_passed": false,
    "status": "uncheck",
    "kyc_status_list": {
      "remit_info": { "status": "unchecked", "is_allow_update": true }
    },
    "country_iso": "TW",
    "is_invited": false,
    "is_registered": false,
    "remit_info": [
      {
        "id": 4856,
        "status": 0,
        "sort": 0,
        "payout_gateway": "MyB2B_batch_payout",
        "is_enable": 1,
        "detail": {
          "country_code": "TW",
          "bank_code": "013",
          "branch_code": "0130017",
          "account": "264200000000",
          "account_name": "OWLPAYMARAS",
          "currency": "TWD"
        }
      },
      {...}
    ]
  },
  "status": 200
}

PROTECTget https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}

Response

Parameter Type Description
uuid string 供應商識別碼
object string 供應商物件
application_vendor_uuid string 供應商於 application 識別碼
name string 供應商名稱
email string 供應商電子郵件
description string 供應商敘述
vendor_information array 供應商資料 (KYC)
contact array 供應商聯絡人資訊 (KYC)
remit_info array 供應商付款資訊 (KYC)

Delete a vendor

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid} \
  -u <application_secret>: \
  -X DELETE

Response Example

{
  "data": {
    "deleted": true,
    "message": "success"
  },
  "status": 200
}

PROTECTdelete https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}

List all vendors

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors \
  -u <application_secret>:

Response Example

{
  "data": [
    {
      "uuid": "ven_2psRYn3k90lZ1H0H49TcLhg",
      "object": "vendor",
      "application_vendor_uuid": "16584585454784",
      "name": "VendorTest_1658458545",
      "email": "VendorTest_1658458545_7829@owlpay.com",
      "description": "",
      "note": null,
      "is_removed": false,
      "is_active": false,
      "is_vendor_kyc_passed": false,
      "status": "uncheck",
      "kyc_status_list": {
        "remit_info": { "status": "unchecked", "is_allow_update": true }
      },
      "country_iso": "TW",
      "is_invited": false,
      "is_registered": false,
      "remit_info": [
        {
          "id": 4856,
          "status": 0,
          "sort": 0,
          "payout_gateway": "MyB2B_batch_payout",
          "is_enable": 1,
          "detail": {
            "country_code": "TW",
            "bank_code": "013",
            "branch_code": "0130017",
            "account": "264200000000",
            "account_name": "OWLPAYMARAS",
            "currency": "TWD"
          }
        },
        {...}
      ]
    },
    {...}
  ],
  "status": 200,
  "pagination": {
    "total": 614,
    "count": 12,
    "perPage": 12,
    "currentPage": 1,
    "totalPages": 52,
    "links": {
      "next": "http://owlpay.owlting.worker/api/v1/platform/tunnel/vendors?q=%2Fapi%2Fv1%2Fplatform%2Ftunnel%2Fvendors&page=2"
    }
  }
}

PROTECTget https://api.owlpay.com/api/v1/platform/tunnel/vendors

Meta Query
Parameter Type Default Description
page int 1 ref: Pagination
limit int 12 ref: Pagination

Response

Parameter Type Description
uuid string vendor uuid on owlpay
application_vendor_uuid string vendor uuid on application
object string
name string vendor name
email string vendor email
description string vendor description
vendor_information array vendor advenced information for KYC
contact array vendor contact information for KYC
remit_info array vendor remit information for KYC

Vendors remit info

The vendor remit info object

Response Example

{
    "data": [
        {
            "payout_gateway_channel": "cathay",
            "payout_gateway_key": "MyB2B_batch_payout",
            "payout_gateway": "Cathay United Bank - Global MyB2B",
            "status": "checking",
            "sort": 0,
            "is_enable": true,
            "detail": {
                "country_code": "TW",
                "bank_code": "013",
                "branch_code": "0130017",
                "account": "264200000000",
                "account_name": "OWLPAYTEST",
                "currency": "TWD"
            }
        }
    ],
    "status": 200
}

Attributes

Parameter Type Description
payout_gateway string 供應商付款資訊 - 付款管道 (cathay/firstBank/nium/visa) 目前支援的請查看 OwlTing AML Schema Tool
payout_gateway_key string Vendor payout information - key of payout method
payout_gateway_channel string Vendor payout information - payout method for AML (cathay/ firstBank/nium/visa), ref OwlTing AML Schema Tool
status string 供應商付款資訊 - 付款管道狀態
sort int 供應商付款資訊 - 付款管道優先順序 (數字越小越優先)
is_enable boolean 供應商付款資訊 - 付款管道是否啟用中
detail object 供應商付款資訊 - 付款管道細節內容

Apply a vendor remit info

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}/remit_info/apply \
  -u <application_secret>: \
  -d payout_channel="cathay" \
  -d applicant="company" \
  -d "aml_data[companyName]"='Maras Test' \
  -d "aml_data[businessAddressCity]"='Taipei' \
  -d "aml_data[businessAddressArea]"='Taipei' \
  -d "aml_data[businessAddress]"='Taipei' \
  -d "aml_data[companyPhoneCode]"='TW' \
  -d "aml_data[companyPhoneNumber]"='0912345678' \
  -d "aml_data[companyEmail]"='testing@owlpay.com' \
  -d "aml_data[companyId]"='12345678' \
  -d "aml_data[customName]"='Maras Account' \
  -d "aml_data[bankCountry]"='TW' \
  -d "aml_data[bankCode]"='013' \
  -d "aml_data[branchCode]"='0017' \
  -d "aml_data[currency]"='TWD' \
  -d "aml_data[accountName]"='OWLPAYMARAS' \
  -d "aml_data[account]"='264200000000'

Response Example

{
    "data": [
        {
            "payout_gateway_channel": "cathay",
            "payout_gateway_key": "MyB2B_batch_payout",
            "payout_gateway": "Cathay United Bank - Global MyB2B",
            "status": "checking",
            "sort": 0,
            "is_enable": true,
            "detail": {
                "country_code": "TW",
                "bank_code": "013",
                "branch_code": "0130017",
                "account": "264200000000",
                "account_name": "OWLPAYTEST",
                "currency": "TWD"
            }
        }
    ],
    "status": 200
}

PROTECTpost https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}/remit_info/apply

供應商付款資訊,因應各國家法規及付款管道限制,請參考此表單傳入相對應的欄位

FormData

Parameter Type Default Required Description
payout_channel string 供應商付款資訊 - 付款管道 (需根據 application 已開通的管道)
applicant decimal 供應商付款資訊 - 個人或公司 (company/individual)
aml_data array 供應商付款資訊 - KYC/AML 詳細資料,需要欄位請參考

Response

Parameter Type Description
payout_gateway string 供應商付款資訊 - 付款管道 (cathay/firstBank/nium/visa) 目前支援的請查看 OwlTing AML Schema Tool
payout_gateway_key string Vendor payout information - key of payout method
payout_gateway_channel string Vendor payout information - payout method for AML (cathay/ firstBank/nium/visa), ref OwlTing AML Schema Tool
status string 供應商付款資訊 - 付款管道狀態
sort int 供應商付款資訊 - 付款管道優先順序 (數字越小越優先)
is_enable boolean 供應商付款資訊 - 付款管道是否啟用中
detail object 供應商付款資訊 - 付款管道細節內容

List all vendor remit info

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}/remit_info \
  -u <application_secret>:

Response Example

{
    "data": [
        {
            "payout_gateway_channel": "cathay",
            "payout_gateway_key": "MyB2B_batch_payout",
            "payout_gateway": "Cathay United Bank - Global MyB2B",
            "status": "checking",
            "sort": 0,
            "is_enable": true,
            "detail": {
                "country_code": "TW",
                "bank_code": "013",
                "branch_code": "0130017",
                "account": "264200000000",
                "account_name": "OWLPAYTEST",
                "currency": "TWD"
            }
        }
    ],
    "status": 200
}

PROTECTget https://api.owlpay.com/api/v1/platform/tunnel/vendors/{vendor_uuid}/remit_info

Response

Parameter Type Description
payout_gateway string 供應商付款資訊 - 付款管道 (cathay/firstBank/nium/visa) 目前支援的請查看 OwlTing AML Schema Tool
payout_gateway_key string Vendor payout information - key of payout method
payout_gateway_channel string Vendor payout information - payout method for AML (cathay/ firstBank/nium/visa), ref OwlTing AML Schema Tool
status string 供應商付款資訊 - 付款管道狀態
sort int 供應商付款資訊 - 付款管道優先順序 (數字越小越優先)
is_enable boolean 供應商付款資訊 - 付款管道是否啟用中
detail object 供應商付款資訊 - 付款管道細節內容

Vendors Invite

The vendor invite object

Response Example

{
    "data": {
        "object": "vendor_invite",
        "uuid": "veninv_xxxxxxx",
        "vendor_uuid": "ven_xxxxxxxxxxx",
        "connect_invite_hash": "xxxxxxxxxxxx",
        "invite_url": "https://auth.owlting.com/...",
        "email": "vendor@owlpay.com",
        "is_owlpay_send_email": false,
        "expired_at": "2021-09-11T16:23:07+00:00",
        "created_at": "2021-09-10T16:23:07+00:00"
    },
    "status": 200
}

Attributes

Parameter Type Description
object string Object name
uuid string Unique vendor invite identifier
vendor_uuid string Unique vendor identifier
connect_invite_hash string invite token
invite_url string invite link
email string,email invite email (if "is_owlpay_send_email = True" when invite object is created, the invitation email will be sent to this email)
expired_at string, iso8601 Expiration date of link
created_at string, iso8601 Link created time

Create a vendor invite

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendor_invite \
  -u <application_secret>: \
  -d is_owlpay_send_email=false \
  -d email='owlpay-team@owlting.com' \
  -d "meta_data[vendor_name]"='Hello'

Response Example

{
    "data": {
        "object": "vendor_invite",
        "uuid": "veninv_xxxxxxx",
        "vendor_uuid": "ven_xxxxxxxxxxx",
        "connect_invite_hash": "xxxxxxxxxxxx",
        "invite_url": "https://auth.owlting.com/...",
        "email": "vendor@owlpay.com",
        "is_owlpay_send_email": false,
        "expired_at": "2021-09-11T16:23:07+00:00",
        "created_at": "2021-09-10T16:23:07+00:00"
    },
    "status": 200
}

PROTECTpost

https://api.owlpay.com/api/v1/platform/tunnel/vendor_invite

FormData

Parameter Type Default Description
is_owlpay_send_email boolean false Whether to send email through OwlPay
email string Required if *is_owlpay_send_email* is *true*
meta_data array Metadata is useful for storing additional, structured information on an object
vendor object Vendor information. If you want to create a vendor along with the invitation, or invite a vendor that already exists on OwlPay )

Formdata - vendor invite with vendor

Parameter Type Default Description
uuid string Unique vendor identifier on OwlPay, if uuid already exists, OwlPay will invite vendor to join (ref: The vendor object)
application_vendor_uuid string Unique vendor identifier on Application (ref: The vendor object)
name string Vendor name on Application (ref: The vendor object)
description string Vendor description on Application (ref: The vendor object)
email string Required if *is_owlpay_send_email* is *true*

Response

Parameter Type Description
object string Object name
uuid string Unique vendor invite identifier
vendor_uuid string Unique vendor identifier
connect_invite_hash string invite token
invite_url string invite link
email string,email invite email (if "is_owlpay_send_email = True" when invite object is created, the invitation email will be sent to this email)
expired_at string, iso8601 Expiration date of link
created_at string, iso8601 Link created time

List all vendor invites

Request Example

curl https://api.owlpay.com/api/v1/platform/tunnel/vendor_invite \
  -u <application_secret>:

Response Example

{
    "data": [
        {
            "object": "vendor_invite",
            "uuid": "veninv_xxxxxxx",
            "vendor_uuid": "ven_xxxxxxxxxxx",
            "connect_invite_hash": "xxxxxxxxxxxx",
            "invite_url": "https://auth.owlting.com/...",
            "email": "vendor@owlpay.com",
            "is_owlpay_send_email": false,
            "expired_at": "2021-09-11T16:23:07+00:00",
            "created_at": "2021-09-10T16:23:07+00:00"
        },
        ...
    ],
    "status": 200
}

PROTECTget

Only can retrieve *vendor_invite* invitations that have not expired and have not been successfully invited

Response

Parameter Type Description
object string Object name
uuid string Unique vendor invite identifier
vendor_uuid string Unique vendor identifier
connect_invite_hash string invite token
invite_url string invite link
email string,email invite email (if "is_owlpay_send_email = True" when invite object is created, the invitation email will be sent to this email)
expired_at string, iso8601 Expiration date of link
created_at string, iso8601 Link created time