支付与退款

支付方式、创建、查单、关单和退款。

使用流程与权限要求见 发起支付。

GET查询店铺支持的支付方式/boma/v1/shops/{shop}/payments/supported_methods
鉴权已选身份的会话 / Boma API Key

Payment methods supported by at least one enabled payment connection selected for this shop.

参数

参数位置类型说明
shop路径string必填

响应

200Success
application/json
supported_methodswechat_jsapi | alipay_jsapi | wechat_barcode | alipay_barcode | external_unipay[]必填
查看结构

wechat_jsapi | alipay_jsapi | wechat_barcode | alipay_barcode | external_unipay

defaultError
application/json

object · 规范允许任意字段

POST创建微信 JSAPI 支付/boma/v1/shops/{shop}/payments/wechat_jsapi
鉴权已选身份的会话 / Boma API Key

Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID.

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
external_idstring必填
order_idstring
amount_micro_yuanstring必填
匹配 ^[1-9][0-9]*$
client_ipstring

Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.

ledgerPaymentLedger

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

查看结构

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

accountsPaymentAccount[]
查看结构
uidstring必填
resource_uidstring必填
non_negativeboolean必填
entriesPaymentEntry[]必填
至少 1 项 · 至多 256 项
查看结构
debitstring必填
creditstring必填
amountstring必填
匹配 ^[1-9][0-9]*$
eventsPaymentEvent[]
至多 31 项
查看结构
typestring必填
keystring
payload任意值
metadata任意值
merchant_payment_connection_idstring

Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.

uuid
open_idstring必填

WeChat openid for the paying application or Alipay user_id.

最短 1 字符 · 最长 256 字符
app_idstring

WeChat application ID associated with open_id. Omit to use the channel default.

最短 1 字符 · 最长 256 字符

响应

200Success
application/json
paymentPaymentRecord必填
查看结构
idstring必填
modestring必填
statusstring必填
ledger_statusstring必填
provider_responseNativePaymentResult

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

可为 null
查看结构

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

statestring必填
wechat_jsapiWechatJSAPIParams
查看结构
appIdstring必填
timeStampstring必填
nonceStrstring必填
packagestring必填
signTypestring必填
paySignstring必填
alipay_jsapiAlipayJSAPIParams
查看结构
tradeNOstring必填
external_unipayExternalUnipayParams
查看结构
urlstring必填

Original HTTPS URL issued by the provider, including its query string.

uri
expires_atstring
date-time
amount_micro_yuanstring必填
external_idstring必填
defaultError
application/json

object · 规范允许任意字段

POST创建支付宝 JSAPI 支付/boma/v1/shops/{shop}/payments/alipay_jsapi
鉴权已选身份的会话 / Boma API Key

Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID.

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
external_idstring必填
order_idstring
amount_micro_yuanstring必填
匹配 ^[1-9][0-9]*$
client_ipstring

Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.

ledgerPaymentLedger

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

查看结构

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

accountsPaymentAccount[]
查看结构
uidstring必填
resource_uidstring必填
non_negativeboolean必填
entriesPaymentEntry[]必填
至少 1 项 · 至多 256 项
查看结构
debitstring必填
creditstring必填
amountstring必填
匹配 ^[1-9][0-9]*$
eventsPaymentEvent[]
至多 31 项
查看结构
typestring必填
keystring
payload任意值
metadata任意值
merchant_payment_connection_idstring

Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.

uuid
open_idstring必填

WeChat openid for the paying application or Alipay user_id.

最短 1 字符 · 最长 256 字符

响应

200Success
application/json
paymentPaymentRecord必填
查看结构
idstring必填
modestring必填
statusstring必填
ledger_statusstring必填
provider_responseNativePaymentResult

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

可为 null
查看结构

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

statestring必填
wechat_jsapiWechatJSAPIParams
查看结构
appIdstring必填
timeStampstring必填
nonceStrstring必填
packagestring必填
signTypestring必填
paySignstring必填
alipay_jsapiAlipayJSAPIParams
查看结构
tradeNOstring必填
external_unipayExternalUnipayParams
查看结构
urlstring必填

Original HTTPS URL issued by the provider, including its query string.

uri
expires_atstring
date-time
amount_micro_yuanstring必填
external_idstring必填
defaultError
application/json

object · 规范允许任意字段

POST创建微信付款码支付/boma/v1/shops/{shop}/payments/wechat_barcode
鉴权已选身份的会话 / Boma API Key

Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID.

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
external_idstring必填
order_idstring
amount_micro_yuanstring必填
匹配 ^[1-9][0-9]*$
bar_codestring必填
匹配 ^1[0-5][0-9]{16}$
client_ipstring

Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.

ledgerPaymentLedger

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

查看结构

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

accountsPaymentAccount[]
查看结构
uidstring必填
resource_uidstring必填
non_negativeboolean必填
entriesPaymentEntry[]必填
至少 1 项 · 至多 256 项
查看结构
debitstring必填
creditstring必填
amountstring必填
匹配 ^[1-9][0-9]*$
eventsPaymentEvent[]
至多 31 项
查看结构
typestring必填
keystring
payload任意值
metadata任意值
merchant_payment_connection_idstring

Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.

uuid

响应

200Success
application/json
paymentPaymentRecord必填
查看结构
idstring必填
modestring必填
statusstring必填
ledger_statusstring必填
provider_responseNativePaymentResult

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

可为 null
查看结构

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

statestring必填
wechat_jsapiWechatJSAPIParams
查看结构
appIdstring必填
timeStampstring必填
nonceStrstring必填
packagestring必填
signTypestring必填
paySignstring必填
alipay_jsapiAlipayJSAPIParams
查看结构
tradeNOstring必填
external_unipayExternalUnipayParams
查看结构
urlstring必填

Original HTTPS URL issued by the provider, including its query string.

uri
expires_atstring
date-time
amount_micro_yuanstring必填
external_idstring必填
defaultError
application/json

object · 规范允许任意字段

POST创建支付宝付款码支付/boma/v1/shops/{shop}/payments/alipay_barcode
鉴权已选身份的会话 / Boma API Key

Idempotently submit this method. Read payment.provider_response for native invocation data. If still submitting, GET the same payment by ID.

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
external_idstring必填
order_idstring
amount_micro_yuanstring必填
匹配 ^[1-9][0-9]*$
bar_codestring必填
匹配 ^(2[5-9]|30)[0-9]{14,22}$
client_ipstring

Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.

ledgerPaymentLedger

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

查看结构

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

accountsPaymentAccount[]
查看结构
uidstring必填
resource_uidstring必填
non_negativeboolean必填
entriesPaymentEntry[]必填
至少 1 项 · 至多 256 项
查看结构
debitstring必填
creditstring必填
amountstring必填
匹配 ^[1-9][0-9]*$
eventsPaymentEvent[]
至多 31 项
查看结构
typestring必填
keystring
payload任意值
metadata任意值
merchant_payment_connection_idstring

Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.

uuid

响应

200Success
application/json
paymentPaymentRecord必填
查看结构
idstring必填
modestring必填
statusstring必填
ledger_statusstring必填
provider_responseNativePaymentResult

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

可为 null
查看结构

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

statestring必填
wechat_jsapiWechatJSAPIParams
查看结构
appIdstring必填
timeStampstring必填
nonceStrstring必填
packagestring必填
signTypestring必填
paySignstring必填
alipay_jsapiAlipayJSAPIParams
查看结构
tradeNOstring必填
external_unipayExternalUnipayParams
查看结构
urlstring必填

Original HTTPS URL issued by the provider, including its query string.

uri
expires_atstring
date-time
amount_micro_yuanstring必填
external_idstring必填
defaultError
application/json

object · 规范允许任意字段

POST创建外部收银台支付/boma/v1/shops/{shop}/payments/external_unipay
鉴权已选身份的会话 / Boma API Key

Returns the original provider cashier URL in payment.provider_response.external_unipay.url when ready. Send this HTTPS URL to the payer or encode it directly in a QR code. The Wangpu provider returns its payUrl verbatim.

参数

参数位置类型说明
shop路径string必填

请求体

application/json必填
external_idstring必填
order_idstring
amount_micro_yuanstring必填
匹配 ^[1-9][0-9]*$
client_ipstring

Optional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.

ledgerPaymentLedger

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

查看结构

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

accountsPaymentAccount[]
查看结构
uidstring必填
resource_uidstring必填
non_negativeboolean必填
entriesPaymentEntry[]必填
至少 1 项 · 至多 256 项
查看结构
debitstring必填
creditstring必填
amountstring必填
匹配 ^[1-9][0-9]*$
eventsPaymentEvent[]
至多 31 项
查看结构
typestring必填
keystring
payload任意值
metadata任意值
merchant_payment_connection_idstring

Optional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.

uuid

响应

200Success
application/json
paymentPaymentRecord必填
查看结构
idstring必填
modestring必填
statusstring必填
ledger_statusstring必填
provider_responseNativePaymentResult

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

可为 null
查看结构

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

statestring必填
wechat_jsapiWechatJSAPIParams
查看结构
appIdstring必填
timeStampstring必填
nonceStrstring必填
packagestring必填
signTypestring必填
paySignstring必填
alipay_jsapiAlipayJSAPIParams
查看结构
tradeNOstring必填
external_unipayExternalUnipayParams
查看结构
urlstring必填

Original HTTPS URL issued by the provider, including its query string.

uri
expires_atstring
date-time
amount_micro_yuanstring必填
external_idstring必填
defaultError
application/json

object · 规范允许任意字段

GET查询店铺支付列表/boma/v1/shops/{shop}/payments
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
shop路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

GET读取支付状态与入账进度/boma/v1/payments/{payment}
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
payment路径string必填

响应

200Success
application/json
idstring必填
modestring必填
statusstring必填
ledger_statusstring必填
provider_responseNativePaymentResult

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

可为 null
查看结构

Wallet parameters or a provider-hosted cashier link while the payment is pending. A submitting payment can be polled by ID. An expired result requires reconciliation.

statestring必填
wechat_jsapiWechatJSAPIParams
查看结构
appIdstring必填
timeStampstring必填
nonceStrstring必填
packagestring必填
signTypestring必填
paySignstring必填
alipay_jsapiAlipayJSAPIParams
查看结构
tradeNOstring必填
external_unipayExternalUnipayParams
查看结构
urlstring必填

Original HTTPS URL issued by the provider, including its query string.

uri
expires_atstring
date-time
amount_micro_yuanstring必填
external_idstring必填
defaultError
application/json

object · 规范允许任意字段

POST向支付渠道主动查单/boma/v1/payments/{payment}/query
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
payment路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

POST关闭待支付单据/boma/v1/payments/{payment}/close
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
payment路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

POST发起部分或全额退款/boma/v1/payments/{payment}/refunds
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
payment路径string必填

请求体

application/json必填
external_idstring必填
amount_micro_yuanstring必填
reasonstring必填
ledgerPaymentLedger

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

查看结构

HCL transaction intent. Use $channel as the channel account UID; Boma supplies the ledger and idempotency key. Currency is _boma.cny_micro_yuan.

accountsPaymentAccount[]
查看结构
uidstring必填
resource_uidstring必填
non_negativeboolean必填
entriesPaymentEntry[]必填
至少 1 项 · 至多 256 项
查看结构
debitstring必填
creditstring必填
amountstring必填
匹配 ^[1-9][0-9]*$
eventsPaymentEvent[]
至多 31 项
查看结构
typestring必填
keystring
payload任意值
metadata任意值

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

GET查看原支付的退款列表/boma/v1/payments/{payment}/refunds
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
payment路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段

GET读取退款与入账状态/boma/v1/refunds/{refund}
鉴权已选身份的会话 / Boma API Key

参数

参数位置类型说明
refund路径string必填

响应

200Success
application/json

任意值

defaultError
application/json

object · 规范允许任意字段