支付与退款
支付方式、创建、查单、关单和退款。
使用流程与权限要求见 发起支付。
GET查询店铺支持的支付方式/boma/v1/shops/{shop}/payments/supported_methods
Payment methods supported by at least one enabled payment connection selected for this shop.
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
响应
200Success
application/jsonsupported_methodswechat_jsapi | alipay_jsapi | wechat_barcode | alipay_barcode | external_unipay[]必填查看结构
wechat_jsapi | alipay_jsapi | wechat_barcode | alipay_barcode | external_unipay
defaultError
application/jsonobject · 规范允许任意字段
POST创建微信 JSAPI 支付/boma/v1/shops/{shop}/payments/wechat_jsapi
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_idstringamount_micro_yuanstring必填- 匹配 ^[1-9][0-9]*$
client_ipstringOptional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.
ledgerPaymentLedgerHCL 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必填keystringpayload任意值
metadata任意值
merchant_payment_connection_idstringOptional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.
uuidopen_idstring必填WeChat openid for the paying application or Alipay user_id.
最短 1 字符 · 最长 256 字符app_idstringWeChat application ID associated with open_id. Omit to use the channel default.
最短 1 字符 · 最长 256 字符
响应
200Success
application/jsonpaymentPaymentRecord必填查看结构
idstring必填modestring必填statusstring必填ledger_statusstring必填provider_responseNativePaymentResultWallet 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/jsonobject · 规范允许任意字段
POST创建支付宝 JSAPI 支付/boma/v1/shops/{shop}/payments/alipay_jsapi
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_idstringamount_micro_yuanstring必填- 匹配 ^[1-9][0-9]*$
client_ipstringOptional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.
ledgerPaymentLedgerHCL 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必填keystringpayload任意值
metadata任意值
merchant_payment_connection_idstringOptional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.
uuidopen_idstring必填WeChat openid for the paying application or Alipay user_id.
最短 1 字符 · 最长 256 字符
响应
200Success
application/jsonpaymentPaymentRecord必填查看结构
idstring必填modestring必填statusstring必填ledger_statusstring必填provider_responseNativePaymentResultWallet 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/jsonobject · 规范允许任意字段
POST创建微信付款码支付/boma/v1/shops/{shop}/payments/wechat_barcode
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_idstringamount_micro_yuanstring必填- 匹配 ^[1-9][0-9]*$
bar_codestring必填- 匹配 ^1[0-5][0-9]{16}$
client_ipstringOptional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.
ledgerPaymentLedgerHCL 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必填keystringpayload任意值
metadata任意值
merchant_payment_connection_idstringOptional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.
uuid
响应
200Success
application/jsonpaymentPaymentRecord必填查看结构
idstring必填modestring必填statusstring必填ledger_statusstring必填provider_responseNativePaymentResultWallet 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/jsonobject · 规范允许任意字段
POST创建支付宝付款码支付/boma/v1/shops/{shop}/payments/alipay_barcode
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_idstringamount_micro_yuanstring必填- 匹配 ^[1-9][0-9]*$
bar_codestring必填- 匹配 ^(2[5-9]|30)[0-9]{14,22}$
client_ipstringOptional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.
ledgerPaymentLedgerHCL 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必填keystringpayload任意值
metadata任意值
merchant_payment_connection_idstringOptional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.
uuid
响应
200Success
application/jsonpaymentPaymentRecord必填查看结构
idstring必填modestring必填statusstring必填ledger_statusstring必填provider_responseNativePaymentResultWallet 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/jsonobject · 规范允许任意字段
POST创建外部收银台支付/boma/v1/shops/{shop}/payments/external_unipay
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_idstringamount_micro_yuanstring必填- 匹配 ^[1-9][0-9]*$
client_ipstringOptional IPv4 or IPv6 address of the payer. Shops using ip_region use this address to select a payment connection.
ledgerPaymentLedgerHCL 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必填keystringpayload任意值
metadata任意值
merchant_payment_connection_idstringOptional explicit connection from the shop's selected channels. Bypasses automatic selection and failover.
uuid
响应
200Success
application/jsonpaymentPaymentRecord必填查看结构
idstring必填modestring必填statusstring必填ledger_statusstring必填provider_responseNativePaymentResultWallet 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/jsonobject · 规范允许任意字段
GET查询店铺支付列表/boma/v1/shops/{shop}/payments
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
shop | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET读取支付状态与入账进度/boma/v1/payments/{payment}
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
payment | 路径 | string | 必填 |
响应
200Success
application/jsonidstring必填modestring必填statusstring必填ledger_statusstring必填provider_responseNativePaymentResultWallet 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/jsonobject · 规范允许任意字段
POST向支付渠道主动查单/boma/v1/payments/{payment}/query
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
payment | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
POST关闭待支付单据/boma/v1/payments/{payment}/close
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
payment | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
POST发起部分或全额退款/boma/v1/payments/{payment}/refunds
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
payment | 路径 | string | 必填 |
请求体
application/json必填external_idstring必填amount_micro_yuanstring必填reasonstring必填ledgerPaymentLedgerHCL 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必填keystringpayload任意值
metadata任意值
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET查看原支付的退款列表/boma/v1/payments/{payment}/refunds
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
payment | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段
GET读取退款与入账状态/boma/v1/refunds/{refund}
参数
| 参数 | 位置 | 类型 | 说明 |
|---|---|---|---|
refund | 路径 | string | 必填 |
响应
200Success
application/json任意值
defaultError
application/jsonobject · 规范允许任意字段