调用本接口前请先确认已在商户平台完成商户注册。 当购买者邮箱不为空时,开完发票后,默认将发票发送到购买者邮箱
POST
https:// bcinvoice.unionpay.com /invoice/blue
敬请期待
中文名称 | 英文名称 | 域类型 | 域长度 | 默认值 | 请求要求 | 备注 | |
---|---|---|---|---|---|---|---|
银联开放平台id | accesskey | string | M-必填 |
|
|||
10位unixtimestamp | timestamp | string | M-必填 |
|
|||
随机数 | nonce | string | M-必填 |
|
|||
摘要 | digest | string | M-必填 |
|
|||
发票信息 | data | map | O-选填 |
|
中文名称 | 英文名称 | 域类型 | 域长度 | 默认值 | 请求要求 | 备注 | |
---|---|---|---|---|---|---|---|
状态码 | code | string | M-必填 | 200 业务成功 9999系统异常 1004异常情况
|
|||
提示消息 | msg | string | M-必填 |
|
|||
业务返回数据 | data | map | M-必填 |
|
中文名称 | 英文名称 | 域类型 | 域长度 | 默认值 | 请求要求 | 备注 | |
---|---|---|---|---|---|---|---|
发票校验码 | check_code | string | M-必填 | ||||
返回结果 | message | string | M-必填 | ||||
通知类型 | notify_type | array[map] | M-必填 | invoice.blue或者invoice.red | |||
通知时间 | notify_time | string | M-必填 | 开票商户的税号 | |||
商户交易流水号(由商户维护唯一性) | order_id | string | M-必填 | ||||
pdf路径 | pdf_url | string | M-必填 | ||||
发票代码 | ticket_code | string | M-必填 | ||||
开票时间 | ticket_date | string | M-必填 | ||||
发票号码 | ticket_sn | string | M-必填 | ||||
发票状态 | ticket_status | int | M-必填 | 1开票成功, 2开票失败, 3开票中 | |||
发票税额 | ticket_tax_amount | string | M-必填 | 分为单位 | |||
发票含税总价 | ticket_total_amount_has_tax | string | M-必填 | 分为单位 | |||
发票去税总价 | ticket_total_amount_no_tax | string | M-必填 | 分为单位 | |||
区块链平台交易流水号 | up_trade_no | string | M-必填 | 由平台维护唯一性 |
{
"accesskey": "268e22e3-9949-4016-80f8-28298644338d",
"timestamp": "1565603347",
"nonce": "916548",
"digest": "651a6s1d56w4q81f6a31svf6a4dfq9w1d96as65d1a65s1",
"data": {
"buyer_title_type": 1,
"taxpayer_num": "91469027MA5RH09M0R",
"order_id": "200000001327144140800000013",
"buyer_title": "个人",
"buyer_address": "购买方地址",
"buyer_mobile": "15280273989",
"buyer_bank_account": "6228124512451212",
"extra": "发票备注",
"cashier": "收款人",
"buyer_bank_name": "中国工商",
"checker": "复核人",
"invoicer": "开票人",
"trade_type": "3",
"etr_data": "补充说明 ",
"callback_url": "http://www.xxx.com/callback",
"special_invoice_kind": "08",
"goods_info": [
{
"name": "卤鸭翅【大盒】测试 0.13",
"tax_code": "1020202000000000000",
"tax_type": "natural_gas",
"models": "规格型号",
"unit": "盒 ",
"total_price": "10.50000000",
"total": 1.00000000,
"price": "10.50000000",
"tax_rate": "0",
"tax_amount": "0.00000000",
"zero_tax_flag": 1
},
{
"name": "卤鸭翅【大盒】2测试 0.13",
"tax_code": "1020202000000000000",
"tax_type": "natural_gas",
"models": "规格型号",
"unit": "盒 ",
"total_price": "10.50000000",
"total": 1.00000000,
"price": "10.50000000",
"tax_rate": "0",
"tax_amount": "0.00000000",
"zero_tax_flag": 1
}
]
}
}
{
"code": "200",
"data": {
"up_trade_no": "20171011000000001315076805558269",
"order_id": "20000000132714414080000000000",
"state": 3
},
"msg": "success"
}