openapi: 3.1.0 info: title: BitPay API description: > BitPay is a cryptocurrency payment processing platform offering REST APIs for accepting Bitcoin and altcoin payments, creating invoices, managing refunds, processing payouts, and accessing settlement and ledger data. BitPay handles cryptocurrency conversion and fiat settlement to bank accounts and crypto wallets. version: '2.0.0' contact: name: BitPay Support url: https://support.bitpay.com/hc/en-us termsOfService: https://www.bitpay.com/legal/terms-of-use servers: - url: https://bitpay.com description: Production server - url: https://test.bitpay.com description: Test server tags: - name: Invoices description: Create and manage time-sensitive payment requests with fixed prices in fiat or cryptocurrency. - name: Bills description: Manage payment requests sent to specific buyers with fixed-price line items. - name: Payouts description: Submit cryptocurrency withdrawal payments to active BitPay recipients. - name: Refunds description: Process full or partial refunds associated with invoices. - name: Settlements description: Access transfer reports documenting payment profits settled from BitPay. - name: Rates description: Retrieve exchange rate data representing fiat currency equivalents per cryptocurrency unit. - name: Ledgers description: Access account balance records by currency and track individual ledger entries. paths: /invoices: post: operationId: createInvoice summary: Create an Invoice description: > Create a time-sensitive payment request with a fixed price in fiat currency and cryptocurrency equivalents locked at exchange rates expiring in 15 minutes. Supports online checkout and point-of-sale payment flows. tags: - Invoices parameters: - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] description: API version header. Must be set to 2.0.0. - name: X-Identity in: header schema: type: string description: The hexadecimal public key generated from the client private key. Required for merchant facade. - name: X-Signature in: header schema: type: string description: The ECDSA signature of the full request URL concatenated with the request body, signed with the client private key. Required for merchant facade. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateInvoiceRequest' example: token: "your-api-token" price: 10.00 currency: "USD" orderId: "order-12345" itemDesc: "Example product" notificationURL: "https://yourdomain.com/ipn" redirectURL: "https://yourdomain.com/success" responses: '200': description: Invoice created successfully content: application/json: schema: $ref: '#/components/schemas/InvoiceResponse' '400': description: Bad request - invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized - invalid or missing token content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: operationId: listInvoices summary: List Invoices description: Retrieve a list of invoices filtered by date range and other criteria. tags: - Invoices parameters: - name: token in: query required: true schema: type: string description: API token for merchant facade authentication. - name: dateStart in: query schema: type: string format: date description: Start date for filtering invoices (YYYY-MM-DD). - name: dateEnd in: query schema: type: string format: date description: End date for filtering invoices (YYYY-MM-DD). - name: status in: query schema: type: string enum: [new, paid, confirmed, complete, expired, invalid] description: Filter by invoice status. - name: orderId in: query schema: type: string description: Filter by merchant order ID. - name: limit in: query schema: type: integer maximum: 50 description: Maximum number of results to return. - name: offset in: query schema: type: integer description: Number of results to skip for pagination. - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: List of invoices content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Invoice' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /invoices/{invoiceId}: get: operationId: getInvoice summary: Retrieve an Invoice description: Retrieve a specific invoice by its ID. tags: - Invoices parameters: - name: invoiceId in: path required: true schema: type: string description: ID of the invoice to retrieve. - name: token in: query schema: type: string description: API token. Pass as URL parameter when fetching via merchant or pos facade. - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string description: Required for merchant facade. - name: X-Signature in: header schema: type: string description: Required for merchant facade. responses: '200': description: Invoice details content: application/json: schema: $ref: '#/components/schemas/InvoiceResponse' '404': description: Invoice not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /bills: post: operationId: createBill summary: Create a Bill description: > Create a payment request sent to a specific buyer with fixed-price line items typically denominated in fiat currency. Supports email billing and recurring payment scheduling via subscriptions. tags: - Bills parameters: - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateBillRequest' example: token: "your-api-token" currency: "USD" name: "John Doe" email: "john@example.com" dueDate: "2026-07-01T00:00:00Z" items: - description: "Consulting services" price: 150.00 quantity: 2 responses: '200': description: Bill created successfully content: application/json: schema: $ref: '#/components/schemas/BillResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: operationId: listBills summary: List Bills description: Retrieve a list of bills, optionally filtered by status. tags: - Bills parameters: - name: token in: query required: true schema: type: string description: API token for authentication. - name: status in: query schema: type: string enum: [draft, sent, new, paid, acknowledged, refunded, cancelled, unpaid, sentAndPaid] description: Filter by bill status. - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: List of bills content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Bill' /bills/{billId}: get: operationId: getBill summary: Retrieve a Bill description: Retrieve a specific bill by its ID. tags: - Bills parameters: - name: billId in: path required: true schema: type: string description: ID of the bill to retrieve. - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Bill details content: application/json: schema: $ref: '#/components/schemas/BillResponse' '404': description: Bill not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' put: operationId: updateBill summary: Update a Bill description: Update an existing bill. Bills can be updated only if they have not been paid. tags: - Bills parameters: - name: billId in: path required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateBillRequest' responses: '200': description: Bill updated successfully content: application/json: schema: $ref: '#/components/schemas/BillResponse' /bills/{billId}/deliveries: post: operationId: deliverBill summary: Deliver a Bill description: Trigger email delivery of a bill to the recipient. tags: - Bills parameters: - name: billId in: path required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string requestBody: required: true content: application/json: schema: type: object required: - token properties: token: type: string description: API token for authentication. responses: '200': description: Bill delivered successfully content: application/json: schema: type: object properties: data: type: string example: "success" /payouts: post: operationId: createPayout summary: Create a Payout description: > Submit a cryptocurrency withdrawal payment to an active BitPay recipient for customer payouts, marketplace disbursements, affiliate networks, or payroll processing. tags: - Payouts parameters: - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreatePayoutRequest' responses: '200': description: Payout created successfully content: application/json: schema: $ref: '#/components/schemas/PayoutResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: operationId: listPayouts summary: List Payouts description: Retrieve a list of payouts, optionally filtered by date range and status. tags: - Payouts parameters: - name: token in: query required: true schema: type: string - name: startDate in: query schema: type: string format: date - name: endDate in: query schema: type: string format: date - name: status in: query schema: type: string enum: [new, funded, processing, complete, failed, cancelled, paid, unpaid] - name: reference in: query schema: type: string description: Filter by merchant reference ID. - name: limit in: query schema: type: integer - name: offset in: query schema: type: integer - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: List of payouts content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Payout' /payouts/{payoutId}: get: operationId: getPayout summary: Retrieve a Payout description: Retrieve a specific payout by its ID. tags: - Payouts parameters: - name: payoutId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Payout details content: application/json: schema: $ref: '#/components/schemas/PayoutResponse' '404': description: Payout not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' delete: operationId: cancelPayout summary: Cancel a Payout description: Cancel a payout that has not yet been processed. tags: - Payouts parameters: - name: payoutId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Payout cancelled successfully content: application/json: schema: type: object properties: data: type: boolean /invoices/{invoiceId}/refunds: post: operationId: createRefund summary: Create a Refund description: > Create a refund for a paid invoice. Supports full or partial refunds. Handles automatic processing of underpaid and overpaid amounts with cryptocurrency refund workflows. tags: - Refunds parameters: - name: invoiceId in: path required: true schema: type: string description: ID of the invoice to refund. - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateRefundRequest' responses: '200': description: Refund created successfully content: application/json: schema: $ref: '#/components/schemas/RefundResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' get: operationId: listRefunds summary: List Refunds for an Invoice description: Retrieve all refunds associated with a specific invoice. tags: - Refunds parameters: - name: invoiceId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: List of refunds content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Refund' /invoices/{invoiceId}/refunds/{refundId}: get: operationId: getRefund summary: Retrieve a Refund description: Retrieve a specific refund by its ID. tags: - Refunds parameters: - name: invoiceId in: path required: true schema: type: string - name: refundId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Refund details content: application/json: schema: $ref: '#/components/schemas/RefundResponse' delete: operationId: cancelRefund summary: Cancel a Refund description: Cancel a refund request that has not yet been processed. tags: - Refunds parameters: - name: invoiceId in: path required: true schema: type: string - name: refundId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Refund cancelled content: application/json: schema: type: object properties: data: type: boolean /settlements: get: operationId: listSettlements summary: List Settlements description: > Access transfer reports documenting payment profits settled from BitPay to merchant bank accounts and cryptocurrency wallets. Supports USD, EUR, GBP, CAD, AUD, NZD, MXN, and major cryptocurrencies. tags: - Settlements parameters: - name: token in: query required: true schema: type: string - name: currency in: query schema: type: string description: Filter by settlement currency (ISO 4217 code). - name: dateStart in: query schema: type: string format: date - name: dateEnd in: query schema: type: string format: date - name: status in: query schema: type: string enum: [new, processing, complete, failed] - name: limit in: query schema: type: integer - name: offset in: query schema: type: integer - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: List of settlements content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Settlement' /settlements/{settlementId}: get: operationId: getSettlement summary: Retrieve a Settlement description: Retrieve a specific settlement report by its ID. tags: - Settlements parameters: - name: settlementId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Settlement details content: application/json: schema: $ref: '#/components/schemas/SettlementResponse' /settlements/{settlementId}/reconciliationReport: get: operationId: getSettlementReconciliationReport summary: Get Settlement Reconciliation Report description: Retrieve a detailed reconciliation report for a specific settlement. tags: - Settlements parameters: - name: settlementId in: path required: true schema: type: string - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Reconciliation report content: application/json: schema: $ref: '#/components/schemas/ReconciliationReport' /rates: get: operationId: getRates summary: Get Exchange Rates description: > Retrieve exchange rate data representing fiat currency equivalents per cryptocurrency unit. Returns rates for all supported cryptocurrency and fiat currency pairs. tags: - Rates responses: '200': description: Exchange rates data content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Rate' /rates/{baseCurrency}: get: operationId: getRatesForCurrency summary: Get Exchange Rates for a Base Currency description: > Retrieve exchange rates for a specific base cryptocurrency against all supported fiat currencies. tags: - Rates parameters: - name: baseCurrency in: path required: true schema: type: string enum: [BTC, ETH, BCH, XRP, DOGE, LTC, USDC] description: The base cryptocurrency code (e.g., BTC, ETH). responses: '200': description: Exchange rates for the specified currency content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Rate' /rates/{baseCurrency}/{quoteCurrency}: get: operationId: getRate summary: Get Exchange Rate for Currency Pair description: > Retrieve the exchange rate for a specific cryptocurrency/fiat currency pair. tags: - Rates parameters: - name: baseCurrency in: path required: true schema: type: string description: The base cryptocurrency code (e.g., BTC). - name: quoteCurrency in: path required: true schema: type: string description: The quote fiat currency code (e.g., USD). responses: '200': description: Exchange rate for the specified pair content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Rate' /ledgers: get: operationId: listLedgers summary: List Ledgers description: > Access account balance records by currency. Provides accounting data for merchant financial reconciliation. tags: - Ledgers parameters: - name: token in: query required: true schema: type: string - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: List of ledgers with balances content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Ledger' /ledgers/{currency}: get: operationId: getLedgerEntries summary: Get Ledger Entries description: > Retrieve individual ledger entries for a specific currency. Track individual transactions for merchant financial reconciliation. tags: - Ledgers parameters: - name: currency in: path required: true schema: type: string description: ISO 4217 currency code or cryptocurrency code. - name: token in: query required: true schema: type: string - name: startDate in: query schema: type: string format: date - name: endDate in: query schema: type: string format: date - name: limit in: query schema: type: integer - name: offset in: query schema: type: integer - name: X-Accept-Version in: header required: true schema: type: string enum: ['2.0.0'] - name: X-Identity in: header schema: type: string - name: X-Signature in: header schema: type: string responses: '200': description: Ledger entries for the specified currency content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/LedgerEntry' components: schemas: CreateInvoiceRequest: type: object required: - token - currency properties: token: type: string description: API token from the BitPay dashboard (pos facade) or Tokens resource (merchant facade). price: type: number format: double description: Fixed checkout amount in the invoice currency. currency: type: string description: ISO 4217 3-character currency code for the invoice price. example: USD bitpayIdRequired: type: boolean description: Forces BitPay ID requirement at checkout. merchantName: type: string description: Merchant display identifier shown to buyers. forcedBuyerSelectedTransactionCurrency: type: string description: Preselected transaction currency for buyer. forcedBuyerSelectedWallet: type: string description: Preselected wallet for buyer. orderId: type: string description: Merchant internal order identifier. itemDesc: type: string description: Invoice description displayed on the checkout page. itemCode: type: string description: Item code. Use "bitcoindonation" for donation flows. itemizedDetails: type: array description: Line item details for the invoice. items: type: object properties: amount: type: number description: type: string isFee: type: boolean notificationEmail: type: string format: email description: Merchant email address for invoice status change notifications. notificationURL: type: string format: uri description: Webhook URL for invoice status notifications. Must be HTTPS. redirectURL: type: string format: uri description: URL to redirect buyer after payment is complete. closeURL: type: string format: uri description: URL to redirect buyer if the invoice is unpaid or closed. autoRedirect: type: boolean description: Enable automatic redirect after payment. default: false posData: type: string description: Merchant passthru variable for correlating invoices with orders. guid: type: string description: Merchant passthru GUID for order lookup. transactionSpeed: type: string enum: [high, medium, low] description: Transaction speed for risk mitigation purposes. fullNotifications: type: boolean description: Send all standard notifications. default: true extendedNotifications: type: boolean description: Enable additional webhook notifications including expiration and refund events. physical: type: boolean description: Indicates the invoice is for physical goods delivery. buyerSms: type: string description: Buyer SMS phone number with country code. buyer: $ref: '#/components/schemas/Buyer' jsonPayProRequired: type: string description: Enforce BitPay JSON Payment Protocol. acceptanceWindow: type: integer format: int32 minimum: 0 maximum: 900000 description: Payment window in milliseconds (0-900000). Invoice: type: object properties: id: type: string description: BitPay invoice ID. url: type: string format: uri description: URL to the hosted invoice checkout page. status: type: string enum: [new, paid, confirmed, complete, expired, invalid] description: Current status of the invoice. price: type: number description: Invoice price in the specified currency. currency: type: string description: Invoice currency code. orderId: type: string description: Merchant order ID. invoiceTime: type: integer description: Invoice creation timestamp (Unix milliseconds). expirationTime: type: integer description: Invoice expiration timestamp (Unix milliseconds). currentTime: type: integer description: Current server timestamp (Unix milliseconds). btcPrice: type: string description: BTC equivalent price locked at creation. btcDue: type: string description: BTC amount still due. btcPaid: type: string description: BTC amount paid. rate: type: number description: BTC/fiat exchange rate at invoice creation. exceptionStatus: type: string description: Exception status for underpaid/overpaid invoices. buyerFields: $ref: '#/components/schemas/Buyer' paymentUrls: type: object description: Payment protocol URLs for various wallets. token: type: string description: Invoice-specific token for status checks. itemDesc: type: string posData: type: string guid: type: string notificationURL: type: string InvoiceResponse: type: object properties: data: $ref: '#/components/schemas/Invoice' Buyer: type: object properties: name: type: string address1: type: string address2: type: string city: type: string state: type: string zip: type: string country: type: string email: type: string format: email phone: type: string notify: type: boolean CreateBillRequest: type: object required: - token - currency - items properties: token: type: string description: API token from the BitPay dashboard. number: type: string description: Bill identifier specified by the merchant. currency: type: string description: ISO 4217 3-character currency code. name: type: string description: Bill recipient's name. address1: type: string description: Bill recipient's street address. address2: type: string description: Additional address line. city: type: string description: Bill recipient's city. state: type: string description: Bill recipient's state or province. zip: type: string description: Bill recipient's ZIP or postal code. country: type: string description: Bill recipient's country. email: type: string format: email description: Bill recipient's email address. cc: type: array items: type: string format: email description: Email addresses to CC on the bill. phone: type: string description: Bill recipient's phone number. dueDate: type: string format: date-time description: Date and time at which the bill is due (ISO-8601). passProcessingFee: type: boolean description: If true, BitPay's processing fee will be included in the bill. items: type: array description: List of line items on the bill. items: $ref: '#/components/schemas/BillItem' BillItem: type: object required: - price - quantity properties: description: type: string description: Description of the line item. price: type: number description: Unit price of the item. quantity: type: integer description: Quantity of the item. Bill: type: object properties: id: type: string description: BitPay bill ID. status: type: string enum: [draft, sent, new, paid, acknowledged, refunded, cancelled, unpaid, sentAndPaid] url: type: string format: uri number: type: string currency: type: string name: type: string email: type: string dueDate: type: string format: date-time items: type: array items: $ref: '#/components/schemas/BillItem' token: type: string merchant: type: string BillResponse: type: object properties: data: $ref: '#/components/schemas/Bill' CreatePayoutRequest: type: object required: - token - amount - currency - ledgerCurrency properties: token: type: string description: API token with payout facade permissions. amount: type: number description: The amount of the payout request. currency: type: string description: The currency the payout request is denominated in (ISO 4217). ledgerCurrency: type: string description: Ledger currency code set for the account (e.g., USD, BTC). reference: type: string description: Merchant-provided unique reference identifier for the payout. notificationURL: type: string format: uri description: Webhook URL for payout status notifications. notificationEmail: type: string format: email description: Email for payout notification. email: type: string format: email description: The email address of an active recipient. recipientId: type: string description: BitPay recipient ID. shopperId: type: string description: This field is used when the payout is tied to a shopper. label: type: string description: Merchant-provided label for the payout request. message: type: string description: Optional merchant message to include with the payout. Payout: type: object properties: id: type: string description: BitPay payout ID. amount: type: number currency: type: string ledgerCurrency: type: string reference: type: string label: type: string notificationURL: type: string notificationEmail: type: string email: type: string recipientId: type: string shopperId: type: string status: type: string enum: [new, funded, processing, complete, failed, cancelled, paid, unpaid] requestDate: type: string format: date-time dateExecuted: type: string format: date-time transactions: type: array items: type: object properties: amount: type: number date: type: string format: date-time txid: type: string PayoutResponse: type: object properties: data: $ref: '#/components/schemas/Payout' CreateRefundRequest: type: object required: - token - invoiceId - amount - currency properties: token: type: string description: API token for authentication. invoiceId: type: string description: The ID of the invoice to refund. amount: type: number description: Amount to refund. currency: type: string description: Currency of the refund amount. preview: type: boolean description: If true, returns a preview of the refund without executing it. immediate: type: boolean description: If true, process the refund immediately. buyerPaysRefundFee: type: boolean description: If true, the refund fee is deducted from the refund amount. reference: type: string description: Merchant-provided reference for the refund. Refund: type: object properties: id: type: string description: BitPay refund ID. invoiceId: type: string status: type: string enum: [created, pending, cancelled, manual, immediate, failed, complete] amount: type: number currency: type: string lastRefundNotification: type: string format: date-time refundFee: type: number immediate: type: boolean buyerPaysRefundFee: type: boolean reference: type: string requestDate: type: string format: date-time RefundResponse: type: object properties: data: $ref: '#/components/schemas/Refund' Settlement: type: object properties: id: type: string description: BitPay settlement ID. accountId: type: string currency: type: string payoutInfo: type: object properties: label: type: string bankCountry: type: string name: type: string bank: type: string swift: type: string address: type: string city: type: string postal: type: string sort: type: string wire: type: boolean bankName: type: string bankAddress: type: string bankCity: type: string bankPostal: type: string account: type: string status: type: string enum: [new, processing, complete, failed] dateCreated: type: string format: date-time dateExecuted: type: string format: date-time dateCompleted: type: string format: date-time openingDate: type: string format: date-time closingDate: type: string format: date-time openingBalance: type: number ledgerEntriesSum: type: number withHoldings: type: array items: type: object properties: amount: type: number code: type: string description: type: string withHoldingsSum: type: number totalAmount: type: number token: type: string SettlementResponse: type: object properties: data: $ref: '#/components/schemas/Settlement' ReconciliationReport: type: object properties: data: type: object properties: accountId: type: string currency: type: string payoutInfo: type: object openingDate: type: string format: date-time closingDate: type: string format: date-time openingBalance: type: number ledgerEntriesSum: type: number withHoldings: type: array items: type: object withHoldingsSum: type: number totalAmount: type: number ledgerEntries: type: array items: type: object properties: code: type: integer invoiceId: type: string description: type: string timestamp: type: string format: date-time amount: type: number id: type: string Rate: type: object properties: name: type: string description: Full name of the currency (e.g., "US Dollar"). code: type: string description: Currency code (e.g., "USD"). rate: type: number description: Exchange rate (fiat units per one cryptocurrency unit). Ledger: type: object properties: currency: type: string description: Currency code for this ledger. balance: type: number description: Current balance in this currency. LedgerEntry: type: object properties: type: type: string description: Type of ledger entry. amount: type: number description: Transaction amount. code: type: integer description: Transaction code. description: type: string description: Transaction description. timestamp: type: string format: date-time description: Transaction timestamp. txType: type: string description: Transaction type identifier. scale: type: integer description: Scale for decimal precision. invoiceId: type: string description: Associated invoice ID, if applicable. buyerFields: $ref: '#/components/schemas/Buyer' invoiceAmount: type: number description: Original invoice amount. invoiceCurrency: type: string description: Original invoice currency. transactionCurrency: type: string description: Currency in which the transaction was settled. id: type: string description: Unique ledger entry ID. ErrorResponse: type: object properties: status: type: string example: error error: type: string description: Error code or type. message: type: string description: Human-readable error message. code: type: integer description: Numeric error code.