PayCore PayCorePusat Pengembang

Katalog API

Telusuri setiap metode API terverifikasi berdasarkan gateway pembayaran.

Halaman ini hanya mencantumkan API yang dapat dipanggil dari luar dan dipetakan ke kode route, controller, serta driver. Buka tiap gateway untuk melihat endpoint, parameter, gateway_credentials, respons, kesalahan, dan contoh pengujian.

API CATALOG

PayCore public API catalog

本頁提供 PayCore API 串接流程、欄位說明、請求範例、回應格式與付款通知規格。

Replace the API key, order data and gateway credentials in each example, and never expose secrets in frontend or public source code. Last updated:2026-07-16
Public integration docs

Quickstart

Register and verify your email first, then create a PayCore API key from the member portal. Registration never creates a key automatically. After obtaining a key, choose Direct Gateway or an All-in-One project and call the create-payment API.

Create a PayCore account · Open the member portal

1. API authenticationX-API-KEY
2. gateway_credentialsGateway-specific merchant credentials
3. Create paymentPOST /api/paycore/pay/{gateway}/{method}
X-API-KEY

API authentication

PayCore APIs authenticate callers with the X-API-KEY header. A complete key is shown only once when it is created, so keep it on the server. Gateway merchant credentials are sent in gateway_credentials in the request body.

Direct / All-in-One

Integration modes

Direct Gateway lets merchants pass gateway credentials directly. All-in-One projects use a PayCore project API key to manage payment pages and methods centrally.

Webhook

Webhook concept

Gateway callbacks update PayCore payment status first. If payok_url is provided, PayCore notifies the merchant system after payment succeeds. Payment pages also poll status in the background to reduce manual refreshes.

FIELD DICTIONARY

PayCore field dictionary and gateway mapping

Names use the original PayCore public API fields. payer_ip, api_request_ip, payment_page_first_ip and provider_callback_first_ip represent different sources. The payment-page IP is recorded on the first valid payment-page visit; the gateway callback IP is recorded after notification validation. These IPs identify network sources and do not prove payer identity. When no dedicated gateway field exists, data remains in PayCore or is written to an allowed Remark/Metadata field.

Create-payment request

Field Source Type Required Description Example
merchant_order_no API body string|max:100 Yes 商戶訂單號;同一 API Key 下應保持唯一。 ORDER202607130001
amount API body integer|min:1 Yes 付款金額;實際單位與幣別限制依金流而定。 980
currency API body string|max:10 No 幣別代碼,例如 TWD、USD。 TWD
payer_account API body string|max:100 No 商戶系統內的付款人/會員識別,不是身分證號。 member-001
payer_identity_no API body string|max:80 No 付款人身分識別號;只交給有正式對應欄位的金流。 A123456789
payer_ip API body IPv4|IPv6 No API 使用者提供的實際付款人或產單情境 IP。 203.0.113.20
success_url API body URL No 付款成功後可導回商戶的網址。 https://merchant.example/success
return_url API body URL No 相容用回站網址;部分金流會在未提供 success_url 時使用此欄位。 https://merchant.example/return
cancel_url API body URL No 付款取消或未完成時導回商戶的網址。 https://merchant.example/cancel
payok_url API body URL No PayCore 確認付款成功後通知商戶的網址。 https://merchant.example/payok
locale API body string|max:20 No 付款頁偏好語系。 zh-tw
item_name API body string|max:200 No 商品名稱;依金流官方長度限制安全裁切。 測試商品
description API body string|max:200 No 交易描述;未提供商品名稱時,部分金流會將此欄位作為商品名稱使用。 訂單付款
payer_name API body string|max:100 No 付款人姓名;只有有正式對應欄位的金流才直接帶入。 王小明
payer_mobile API body string|max:30 No 付款人手機號碼。 0912345678
payer_tel API body string|max:30 No 付款人一般電話/市話。 02-12345678
payer_email API body email|max:150 No 付款人 Email。 [email protected]
merchant_custom_field_1 API body string|max:200 No 商戶自訂欄位 1;只映射到官方支援的欄位。 campaign-A
merchant_custom_field_2 API body string|max:200 No 商戶自訂欄位 2;只映射到官方支援的欄位。 note-B
credit_installment API body integer|0,3,6,12,18,24,30 No 信用卡分期期數;目前只有 GoMyPay credit 使用,0 或未填為一般交易。 0
expire_days API body integer|1..60 No 離線付款有效天數。 7
expire_minutes API body integer|60..43200 No 離線付款有效分鐘;有值時通常優先於 expire_days。 1440
cvs_type API body enum No 超商類型;可用值依金流而定,例如 SmilePay 使用 ibon/fami,均鼎科技 GoMyPay 使用 family/ok/hilife/ibon。 ibon
bank_code API body string|max:10 No ECPay 背景 ATM 指定銀行代碼的通用名稱。 007
atm_bank_code API body string|max:10 No ECPay 背景 ATM 銀行代碼相容名稱。 007
ecpay_atm_bank_code API body string|max:10 No ECPay 背景 ATM 銀行代碼專用欄位名稱。 007
cvs_code API body enum No ECPay 背景超商代碼通用名稱。 FAMILY
ecpay_cvs_code API body enum No ECPay 背景超商代碼專用欄位名稱。 FAMILY
desc_1 API body string|max:20 No ECPay 背景付款描述欄位 1。
desc_2 API body string|max:20 No ECPay 背景付款描述欄位 2。
desc_3 API body string|max:20 No ECPay 背景付款描述欄位 3。
desc_4 API body string|max:20 No ECPay 背景付款描述欄位 4。
gateway_credentials API body object Yes 該金流的商店憑證;子欄位請查看各 endpoint,禁止放入備註或 Metadata。 {...}

PayCore-generated fields

Field Source Type Required Description Example
api_request_ip PayCore IPv4|IPv6|null No PayCore 在 API 產單當下由 HTTP request 自動取得的呼叫來源 IP;API 使用者不可覆寫。 198.51.100.10
payment_page_first_ip PayCore IPv4|IPv6|null No 持有效付款 token 第一次開啟 PayCore show/processing/result HTML 頁面時,由 PayCore 自動取得的來源 IP;不代表已驗證真人身分。 203.0.113.30
payment_page_first_seen_at PayCore datetime|null No payment_page_first_ip 第一次原子寫入的時間;刷新與 status 輪詢不會覆寫。 2026-07-13T10:30:00+08:00
provider_callback_first_ip PayCore IPv4|IPv6|null No 金流商對 PayCore 的第一個已驗證 server callback 來源 IP;不包含瀏覽器 Return URL、PayOK 對外通知或無效回調。 192.0.2.40
provider_callback_first_seen_at PayCore datetime|null No provider_callback_first_ip 第一次原子寫入的時間;金流重試不會覆寫。 2026-07-13T10:35:00+08:00
payment_no PayCore string Yes PayCore 付款編號。 PAY202607130001ABCDEFGH
gateway URL / PayCore string Yes 金流代號,例如 stripe、plus、pfun、gomypay、funpoint。 stripe
method URL / PayCore string Yes 該金流下的付款方式 key。 credit
api_key_id PayCore integer Yes 由 X-API-KEY 驗證後自動關聯的唯讀欄位;不接受從 API body 傳入。
preferred_locale PayCore string|null No 由 locale 或 Accept-Language 正規化後的付款頁語系。 zh-tw

Common response

Field Source Type Required Description Example
success API response boolean Yes 請求是否成功。 true
message API response string Yes 人類可讀的結果訊息。 Payment created successfully
data.payment_no API response string Yes PayCore 付款編號。
data.merchant_order_no API response string Yes 商戶訂單號。
data.gateway API response string Yes 金流代號。
data.method API response string Yes 付款方式 key。
data.amount API response integer Yes 交易金額。
data.currency API response string Yes 交易幣別。
data.status API response string Yes PayCore 付款狀態。 pending
data.payment_method API response string|null No PayCore 付款流程分類。
data.payment_url API response URL|null No PayCore 付款頁或金流導轉網址。
data.payment_info API response object No 金流取號、付款頁或前端初始化所需資訊;內容依金流而異。
data.created API response boolean No 本次是否新建交易;回傳既有有效交易時為 false。
data.paid_at API response datetime|null No PayCore 確認付款成功的時間。
data.created_at API response datetime|null No PayCore 交易建立時間。
error API response object|string|null No 失敗時的錯誤碼、欄位錯誤或附加內容。

Gateway field mappings

Stored in PayCore means the value remains in the PayCore transaction record and is not sent to that gateway. Fallback fields are used only when the primary mapped value is unavailable.

PayCore fieldECPaySmilePayStripePayPalPLUSPFunJunding Technology GoMyPayFunPoint
api_request_ip Stored in PayCore Remark metadata.api_request_ip Stored in PayCore Stored in PayCore ClientIP fallback; payer_ip is also written to Remark Buyer_Memo fallback Remark fallback
payer_ip Stored in PayCore Remark metadata.payer_ip Stored in PayCore Stored in PayCore ClientIP (primary) Buyer_Memo fallback Remark fallback
payment_page_first_ip Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore
provider_callback_first_ip verified callback source verified callback source verified signature source verified webhook source verified callback source validated callback source verified str_check source verified CheckMacValue source
payer_account Stored in PayCore Pur_name fallback metadata.payer_account Stored in PayCore Used to build payName Stored in PayCore Buyer_Memo fallback Remark fallback
payer_name Stored in PayCore Pur_name Stored in PayCore Stored in PayCore Stored in PayCore ReceiverName Buyer_Name Remark fallback
payer_mobile Stored in PayCore Mobile_number Stored in PayCore Stored in PayCore Stored in PayCore ReceiverTel (primary) Buyer_Telm (primary) Remark fallback
payer_tel Stored in PayCore Tel_number Stored in PayCore Stored in PayCore Stored in PayCore ReceiverTel fallback Buyer_Telm fallback Remark fallback
payer_email Stored in PayCore Email receipt_email Stored in PayCore Stored in PayCore ReceiverEmail Buyer_Mail Remark fallback
payer_identity_no Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore ReceiverID Stored in PayCore Stored in PayCore
item_name ItemName Od_sob PaymentIntent description fallback purchase item name Stored in PayCore TradeTitle Buyer_Memo fallback ItemName
description TradeDesc / ItemName fallback Od_sob fallback PaymentIntent.description purchase description Stored in PayCore OrderInfo / TradeTitle fallback Buyer_Memo TradeDesc / ItemName fallback
merchant_custom_field_1 Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore CustomField1 Buyer_Memo fallback CustomField1
merchant_custom_field_2 Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore CustomField2 Buyer_Memo fallback CustomField2
credit_installment Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore Stored in PayCore TransMode / Installment Stored in PayCore
AJAX LAZY LOAD

Choose an API from the left to view details

To keep /developer/api fast, this page loads the catalog index first; full parameter tables and examples are loaded by AJAX only after an endpoint is selected.

1. Pick a gatewayThe left catalog keeps every gateway / method
2. Load detailsOnly the selected endpoint tables and examples are rendered
3. Shareable linkThe URL keeps the current API position
You have reached the end

Pico is here with you at the end.

Need to find another API, return to the catalog, or review the integration flow? Jump back to search or continue from the API catalog.

PayCore Developer Center sudah terbuka untuk publik. Dokumentasi Direct Gateway API, All-in-One checkout, webhook, dan kode error akan terus dilengkapi.