Skip to content

getTradeBill

申请交易账单

使用示例

ts
import type { TradeBillOptions, BillResponse } from 'nest-wxpay'
import { WechatService } from 'nest-wxpay'
import { Injectable, Body, Post } from '@nestjs/common'

@Injectable()
export class Controller {
  constructor(private readonly wechatService: WechatService) {}

  @Post('trade-bill')
  async refund(@Body() options: TradeBillOptions): Promise<BillResponse> {
    return this.wechatService.getTradeBill(options)
  }
}

参数解析

TradeBillOptions

字段名类型是否必填用途
bill_datestring账单日期
bill_type'ALL''SUCCESS''REFUND'
tar_type'GZIP'压缩类型

返回参数

BillResponse

字段名类型是否必填用途
hash_type'SHA1'哈希类型
hash_valuestring哈希值
download_urlstring下载URL