cryptopay-node
Version:
Cryptopay is a payment gateway and business wallet that allows merchants to automate the processes of accepting cryptocurrency payments and payouts from their customers, as well as making currency exchange transactions and receiving data on the transactio
2,463 lines (2,462 loc) • 118 kB
TypeScript
/**
* Cryptopay API
* Cryptopay is a payment gateway and business wallet that allows merchants to automate the processes of accepting cryptocurrency payments and payouts from their customers, as well as making currency exchange transactions and receiving data on the transaction history and account balance statuses for reporting.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from './configuration';
import { AxiosPromise, AxiosInstance } from 'axios';
import { RequestArgs, BaseAPI } from './base';
/**
*
* @export
* @interface Account
*/
export interface Account {
/**
* Account ID
* @type {string}
* @memberof Account
*/
id: string;
/**
* Account currency
* @type {string}
* @memberof Account
*/
currency: string;
/**
* Account balance
* @type {number}
* @memberof Account
*/
balance: number;
/**
* Project ID which the account belongs to
* @type {string}
* @memberof Account
*/
project_id: string;
}
/**
*
* @export
* @interface AccountListResult
*/
export interface AccountListResult {
/**
*
* @type {Array<Account>}
* @memberof AccountListResult
*/
data: Array<Account>;
/**
*
* @type {Pagination}
* @memberof AccountListResult
*/
meta: Pagination;
}
/**
* Beneficiary information.
* @export
* @interface Beneficiary
*/
export interface Beneficiary {
/**
*
* @type {BeneficiaryType}
* @memberof Beneficiary
*/
type: BeneficiaryType;
/**
* The registered name of the company for a `legal_person` or the full name for a `natural_person`.
* @type {string}
* @memberof Beneficiary
*/
name: string;
/**
*
* @type {BeneficiaryAddress}
* @memberof Beneficiary
*/
address?: BeneficiaryAddress;
}
/**
*
* @export
* @interface BeneficiaryAddress
*/
export interface BeneficiaryAddress {
/**
* The 2-letter ISO country code of the address.
* @type {string}
* @memberof BeneficiaryAddress
*/
country?: string;
/**
* The city of the address.
* @type {string}
* @memberof BeneficiaryAddress
*/
city?: string;
/**
* First line of the address.
* @type {string}
* @memberof BeneficiaryAddress
*/
line_1?: string;
/**
* Second line of the address.
* @type {string}
* @memberof BeneficiaryAddress
*/
line_2?: string;
/**
* Postal code of the address.
* @type {string}
* @memberof BeneficiaryAddress
*/
post_code?: string;
}
/**
*
* @export
* @enum {string}
*/
export declare enum BeneficiaryType {
NaturalPerson = "natural_person",
LegalPerson = "legal_person"
}
/**
* @type Callback
* @export
*/
export declare type Callback = ChannelPaymentCallback | CoinWithdrawalCallback | InvoiceCallback | SubscriptionCallback;
/**
*
* @export
* @interface Channel
*/
export interface Channel {
/**
* Channel ID
* @type {string}
* @memberof Channel
*/
id: string;
/**
*
* @type {ChannelStatus}
* @memberof Channel
*/
status: ChannelStatus;
/**
* Channel name
* @type {string}
* @memberof Channel
*/
name: string;
/**
* Channel description
* @type {string}
* @memberof Channel
*/
description: string | null;
/**
* The cryptocurrency which you want to accept
* @type {string}
* @memberof Channel
*/
pay_currency: string;
/**
* The currency which all incoming transactions will be converted to
* @type {string}
* @memberof Channel
*/
receiver_currency: string;
/**
* Channel description
* @type {string}
* @memberof Channel
*/
address: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof Channel
*/
network: string;
/**
* Project ID
* @type {string}
* @memberof Channel
*/
project_id: string;
/**
* The channel reference ID in your system
* @type {string}
* @memberof Channel
*/
custom_id: string | null;
/**
* The reference ID of your customer
* @type {string}
* @memberof Channel
*/
customer_id: string | null;
/**
* Channel URI. May be used for generating a QR code
* @type {string}
* @memberof Channel
*/
uri: string;
/**
* Channel hosted page that renders channel details
* @type {string}
* @memberof Channel
*/
hosted_page_url: string;
}
/**
*
* @export
* @interface ChannelListResult
*/
export interface ChannelListResult {
/**
*
* @type {Array<Channel>}
* @memberof ChannelListResult
*/
data: Array<Channel>;
/**
*
* @type {Pagination}
* @memberof ChannelListResult
*/
meta: Pagination;
}
/**
*
* @export
* @interface ChannelParams
*/
export interface ChannelParams {
/**
* Channel name
* @type {string}
* @memberof ChannelParams
*/
name: string;
/**
* Channel description
* @type {string}
* @memberof ChannelParams
*/
description?: string;
/**
* The cryptocurrency which you want to accept
* @type {string}
* @memberof ChannelParams
*/
pay_currency: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof ChannelParams
*/
network?: string;
/**
* The currency which all incoming transactions will be converted to
* @type {string}
* @memberof ChannelParams
*/
receiver_currency: string;
/**
* The payment reference ID in your system
* @type {string}
* @memberof ChannelParams
*/
custom_id?: string;
/**
* The internal ID of your customer that the channel relates to
* @type {string}
* @memberof ChannelParams
*/
customer_id?: string;
}
/**
*
* @export
* @interface ChannelPayment
*/
export interface ChannelPayment {
/**
* Channel payment ID
* @type {string}
* @memberof ChannelPayment
*/
id: string;
/**
* Channel ID
* @type {string}
* @memberof ChannelPayment
*/
channel_id: string;
/**
* Cryptocurrency transaction amount that was received
* @type {number}
* @memberof ChannelPayment
*/
paid_amount: number;
/**
* Cryptocurrency type
* @type {string}
* @memberof ChannelPayment
*/
paid_currency: string;
/**
* Amount credited to your Cryptopay account
* @type {number}
* @memberof ChannelPayment
*/
received_amount: number;
/**
* Account currency
* @type {string}
* @memberof ChannelPayment
*/
received_currency: string;
/**
* Processing fee
* @type {number}
* @memberof ChannelPayment
*/
fee: number;
/**
* Processing fee currency
* @type {string}
* @memberof ChannelPayment
*/
fee_currency: string;
/**
* Cryptocurrency transaction ID on the blockchain
* @type {string}
* @memberof ChannelPayment
*/
txid: string;
/**
*
* @type {Exchange}
* @memberof ChannelPayment
*/
exchange?: Exchange;
/**
*
* @type {Risk}
* @memberof ChannelPayment
*/
risk?: Risk;
/**
*
* @type {ChannelPaymentStatus}
* @memberof ChannelPayment
*/
status: ChannelPaymentStatus;
/**
*
* @type {ChannelPaymentStatusContext}
* @memberof ChannelPayment
*/
status_context: ChannelPaymentStatusContext | null;
/**
*
* @type {string}
* @memberof ChannelPayment
*/
refund_address: string | null;
/**
*
* @type {string}
* @memberof ChannelPayment
*/
coin_withdrawal_id: string | null;
/**
* Channel payment custom_id value inherited from its parent channel
* @type {string}
* @memberof ChannelPayment
*/
custom_id: string | null;
/**
* The reference ID of your customer
* @type {string}
* @memberof ChannelPayment
*/
customer_id: string | null;
/**
* Channel cryptocurrency address
* @type {string}
* @memberof ChannelPayment
*/
address?: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof ChannelPayment
*/
network?: string;
/**
* Channel payment creation date and time
* @type {string}
* @memberof ChannelPayment
*/
created_at: string;
}
/**
*
* @export
* @interface ChannelPaymentCallback
*/
export interface ChannelPaymentCallback {
/**
*
* @type {string}
* @memberof ChannelPaymentCallback
*/
type: string;
/**
*
* @type {ChannelPaymentCallbackEvent}
* @memberof ChannelPaymentCallback
*/
event: ChannelPaymentCallbackEvent;
/**
*
* @type {ChannelPayment}
* @memberof ChannelPaymentCallback
*/
data: ChannelPayment;
}
/**
*
* @export
* @enum {string}
*/
export declare enum ChannelPaymentCallbackEvent {
Created = "created",
OnHold = "on_hold",
Completed = "completed",
Refunded = "refunded",
Cancelled = "cancelled"
}
/**
*
* @export
* @interface ChannelPaymentListResult
*/
export interface ChannelPaymentListResult {
/**
*
* @type {Array<ChannelPayment>}
* @memberof ChannelPaymentListResult
*/
data: Array<ChannelPayment>;
/**
*
* @type {Pagination}
* @memberof ChannelPaymentListResult
*/
meta: Pagination;
}
/**
*
* @export
* @interface ChannelPaymentResult
*/
export interface ChannelPaymentResult {
/**
*
* @type {ChannelPayment}
* @memberof ChannelPaymentResult
*/
data: ChannelPayment;
}
/**
*
* @export
* @enum {string}
*/
export declare enum ChannelPaymentStatus {
Pending = "pending",
OnHold = "on_hold",
Completed = "completed",
Refunded = "refunded",
Cancelled = "cancelled"
}
/**
*
* @export
* @enum {string}
*/
export declare enum ChannelPaymentStatusContext {
IllicitResource = "illicit_resource",
ChannelDisabled = "channel_disabled"
}
/**
*
* @export
* @interface ChannelResult
*/
export interface ChannelResult {
/**
*
* @type {Channel}
* @memberof ChannelResult
*/
data: Channel;
}
/**
*
* @export
* @enum {string}
*/
export declare enum ChannelStatus {
Enabled = "enabled",
Disabled = "disabled"
}
/**
*
* @export
* @interface ChannelUpdateParams
*/
export interface ChannelUpdateParams {
/**
* Channel name
* @type {string}
* @memberof ChannelUpdateParams
*/
name?: string;
/**
* Channel description
* @type {string}
* @memberof ChannelUpdateParams
*/
description?: string;
/**
*
* @type {ChannelStatus}
* @memberof ChannelUpdateParams
*/
status?: ChannelStatus;
/**
* The internal ID of your customer that the channel relates to
* @type {string}
* @memberof ChannelUpdateParams
*/
customer_id?: string;
}
/**
*
* @export
* @interface ChannelsConfig
*/
export interface ChannelsConfig {
/**
*
* @type {boolean}
* @memberof ChannelsConfig
*/
enabled: boolean;
}
/**
*
* @export
* @interface Coin
*/
export interface Coin {
/**
*
* @type {string}
* @memberof Coin
*/
currency: string;
/**
*
* @type {string}
* @memberof Coin
*/
name: string;
/**
*
* @type {string}
* @memberof Coin
*/
logo_url: string;
/**
*
* @type {Array<CoinNetwork>}
* @memberof Coin
*/
networks: Array<CoinNetwork>;
}
/**
*
* @export
* @interface CoinDestinationTag
*/
export interface CoinDestinationTag {
/**
*
* @type {boolean}
* @memberof CoinDestinationTag
*/
required: boolean;
/**
*
* @type {string}
* @memberof CoinDestinationTag
*/
name: string;
}
/**
*
* @export
* @interface CoinListResult
*/
export interface CoinListResult {
/**
*
* @type {Array<Coin>}
* @memberof CoinListResult
*/
data: Array<Coin>;
}
/**
*
* @export
* @interface CoinNetwork
*/
export interface CoinNetwork {
/**
*
* @type {string}
* @memberof CoinNetwork
*/
network: string;
/**
*
* @type {string}
* @memberof CoinNetwork
*/
name: string;
/**
*
* @type {number}
* @memberof CoinNetwork
*/
precision: number;
/**
*
* @type {CoinDestinationTag}
* @memberof CoinNetwork
*/
destination_tag: CoinDestinationTag | null;
/**
*
* @type {InvoicesConfig}
* @memberof CoinNetwork
*/
invoices: InvoicesConfig;
/**
*
* @type {ChannelsConfig}
* @memberof CoinNetwork
*/
channels: ChannelsConfig;
/**
*
* @type {CoinWithdrawalsConfig}
* @memberof CoinNetwork
*/
coin_withdrawals: CoinWithdrawalsConfig;
}
/**
*
* @export
* @interface CoinWithdrawal
*/
export interface CoinWithdrawal {
/**
* Coin withdrawal ID
* @type {string}
* @memberof CoinWithdrawal
*/
id: string | null;
/**
* Payment reference ID in your system
* @type {string}
* @memberof CoinWithdrawal
*/
custom_id: string | null;
/**
* The reference ID of your customer
* @type {string}
* @memberof CoinWithdrawal
*/
customer_id: string | null;
/**
* Recipient\'s cryptocurrency wallet address
* @type {string}
* @memberof CoinWithdrawal
*/
address: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof CoinWithdrawal
*/
network: string;
/**
* Cryptocurrency transaction ID on the blockchain
* @type {string}
* @memberof CoinWithdrawal
*/
txid: string | null;
/**
*
* @type {CoinWithdrawalStatus}
* @memberof CoinWithdrawal
*/
status: CoinWithdrawalStatus;
/**
* Payment amount. Amount charged from your account
* @type {number}
* @memberof CoinWithdrawal
*/
charged_amount: number;
/**
* Account currency the payment has been sent from
* @type {string}
* @memberof CoinWithdrawal
*/
charged_currency: string;
/**
* Cryptocurrency transaction amount. Exact amount received by a recipient
* @type {number}
* @memberof CoinWithdrawal
*/
received_amount: number;
/**
* Cryptocurrency type
* @type {string}
* @memberof CoinWithdrawal
*/
received_currency: string;
/**
* Network fee amount
* @type {number}
* @memberof CoinWithdrawal
*/
network_fee: number;
/**
*
* @type {NetworkFeeLevel}
* @memberof CoinWithdrawal
*/
network_fee_level: NetworkFeeLevel;
/**
*
* @type {number}
* @memberof CoinWithdrawal
*/
fee: number;
/**
*
* @type {string}
* @memberof CoinWithdrawal
*/
fee_currency: string;
/**
*
* @type {Exchange}
* @memberof CoinWithdrawal
*/
exchange?: Exchange;
/**
*
* @type {Risk}
* @memberof CoinWithdrawal
*/
risk?: Risk;
/**
* Coin withdrawal creation date and time
* @type {string}
* @memberof CoinWithdrawal
*/
created_at: string;
}
/**
*
* @export
* @interface CoinWithdrawalCallback
*/
export interface CoinWithdrawalCallback {
/**
*
* @type {string}
* @memberof CoinWithdrawalCallback
*/
type: string;
/**
*
* @type {CoinWithdrawalCallbackEvent}
* @memberof CoinWithdrawalCallback
*/
event: CoinWithdrawalCallbackEvent;
/**
*
* @type {CoinWithdrawal}
* @memberof CoinWithdrawalCallback
*/
data: CoinWithdrawal;
}
/**
*
* @export
* @enum {string}
*/
export declare enum CoinWithdrawalCallbackEvent {
Created = "created",
StatusChanged = "status_changed"
}
/**
*
* @export
* @interface CoinWithdrawalListResult
*/
export interface CoinWithdrawalListResult {
/**
*
* @type {Array<CoinWithdrawal>}
* @memberof CoinWithdrawalListResult
*/
data: Array<CoinWithdrawal>;
/**
*
* @type {Pagination}
* @memberof CoinWithdrawalListResult
*/
meta: Pagination;
}
/**
*
* @export
* @interface CoinWithdrawalParams
*/
export interface CoinWithdrawalParams {
/**
* A recipient\'s cryptocurrency wallet address
* @type {string}
* @memberof CoinWithdrawalParams
*/
address: string;
/**
* An account currency to send a transaction from
* @type {string}
* @memberof CoinWithdrawalParams
*/
charged_currency: string;
/**
* Cryptocurrency type
* @type {string}
* @memberof CoinWithdrawalParams
*/
received_currency: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof CoinWithdrawalParams
*/
network?: string;
/**
* The exact amount to debit from your account in `charged_currency`. All applicable fees will be deducted from this amount before processing a transaction instead of adding them on top it.
* @type {number}
* @memberof CoinWithdrawalParams
* @deprecated
*/
charged_amount?: number | null;
/**
* The exact transaction amount to send in `charged_currency`. All applicable fees will be added on top of this amount and debited from your account.
* @type {number}
* @memberof CoinWithdrawalParams
* @deprecated
*/
charged_amount_to_send?: number | null;
/**
* The exact transaction amount to send in `received_currency`. All applicable fees will be added on top of this amount and debited from your account.
* @type {number}
* @memberof CoinWithdrawalParams
* @deprecated
*/
received_amount?: number | null;
/**
* The payment reference ID in your system
* @type {string}
* @memberof CoinWithdrawalParams
*/
custom_id?: string;
/**
* The internal ID of your customer that the wihdrawal relates to
* @type {string}
* @memberof CoinWithdrawalParams
*/
customer_id?: string;
/**
*
* @type {NetworkFeeLevel}
* @memberof CoinWithdrawalParams
*/
network_fee_level?: NetworkFeeLevel;
/**
* Is `false` if omitted. Set `true` to turn off two-step withdrawal. Set `false` for two-step withdrawal and commit it within 30 seconds
* @type {boolean}
* @memberof CoinWithdrawalParams
*/
force_commit?: boolean;
/**
* Is `false` if omitted. Set `true` to turn on beneficiary data validations
* @type {boolean}
* @memberof CoinWithdrawalParams
*/
travel_rule_compliant?: boolean;
/**
*
* @type {Beneficiary}
* @memberof CoinWithdrawalParams
*/
beneficiary?: Beneficiary;
/**
* Transaction amount for new calculation
* @type {number}
* @memberof CoinWithdrawalParams
*/
amount?: number;
/**
* An currency of the transaction amount
* @type {string}
* @memberof CoinWithdrawalParams
*/
amount_currency?: string;
/**
* Whether the amount includes processing fee
* @type {boolean}
* @memberof CoinWithdrawalParams
*/
amount_includes_processing_fee?: boolean;
/**
* Whether the amount includes network fee
* @type {boolean}
* @memberof CoinWithdrawalParams
*/
amount_includes_network_fee?: boolean;
}
/**
*
* @export
* @interface CoinWithdrawalResult
*/
export interface CoinWithdrawalResult {
/**
*
* @type {CoinWithdrawal}
* @memberof CoinWithdrawalResult
*/
data: CoinWithdrawal;
}
/**
*
* @export
* @enum {string}
*/
export declare enum CoinWithdrawalStatus {
New = "new",
Pending = "pending",
OnHold = "on_hold",
Processing = "processing",
Sent = "sent",
Completed = "completed",
Failed = "failed",
Cancelled = "cancelled"
}
/**
*
* @export
* @interface CoinWithdrawalsConfig
*/
export interface CoinWithdrawalsConfig {
/**
*
* @type {boolean}
* @memberof CoinWithdrawalsConfig
*/
enabled: boolean;
}
/**
*
* @export
* @interface Customer
*/
export interface Customer {
/**
* The customer\'s reference ID in your system
* @type {string}
* @memberof Customer
*/
id: string;
/**
* The customer\'s currency in your system
* @type {string}
* @memberof Customer
*/
currency: string;
/**
* The list of refund addresses where Cryptopay will refund High-Risk transactions to
* @type {Array<CustomerAddress>}
* @memberof Customer
*/
addresses: Array<CustomerAddress>;
}
/**
*
* @export
* @interface CustomerAddress
*/
export interface CustomerAddress {
/**
* Cryptocurrency address
* @type {string}
* @memberof CustomerAddress
*/
address: string;
/**
* Cryptocurrency name
* @type {string}
* @memberof CustomerAddress
*/
currency: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof CustomerAddress
*/
network: string;
}
/**
*
* @export
* @interface CustomerListResult
*/
export interface CustomerListResult {
/**
*
* @type {Array<Customer>}
* @memberof CustomerListResult
*/
data: Array<Customer>;
/**
*
* @type {Pagination}
* @memberof CustomerListResult
*/
meta: Pagination;
}
/**
*
* @export
* @interface CustomerParams
*/
export interface CustomerParams {
/**
* The customer\'s reference ID in your system
* @type {string}
* @memberof CustomerParams
*/
id: string;
/**
* The customer\'s currency in your system
* @type {string}
* @memberof CustomerParams
*/
currency: string;
/**
* This array allows you to specify 1 cryptocurrency address for each type of supported cryptocurrencies i.e. BTC, ETH, XRP, LTC and BCH. In case Cryptopay detects a High-Risk transaction, such transaction will not be processed. Instead, it will be sent to the address specified for respective cryptocurrency. If you do not specify any addresses here, High-Risk payments will be put on hold
* @type {Array<CustomerAddress>}
* @memberof CustomerParams
*/
addresses?: Array<CustomerAddress>;
}
/**
*
* @export
* @interface CustomerResult
*/
export interface CustomerResult {
/**
*
* @type {Customer}
* @memberof CustomerResult
*/
data: Customer;
}
/**
*
* @export
* @interface CustomerUpdateParams
*/
export interface CustomerUpdateParams {
/**
* The customer\'s currency in your system
* @type {string}
* @memberof CustomerUpdateParams
*/
currency?: string;
/**
* This array allows you to specify 1 cryptocurrency address for each type of supported cryptocurrencies i.e. BTC, ETH, XRP, LTC and BCH. In case Cryptopay detects a High-Risk transaction, such transaction will not be processed. Instead, it will be sent to the address specified for respective cryptocurrency. If you do not specify any addresses here, High-Risk payments will be put on hold
* @type {Array<CustomerAddress>}
* @memberof CustomerUpdateParams
*/
addresses?: Array<CustomerAddress>;
}
/**
* Exchange details
* @export
* @interface Exchange
*/
export interface Exchange {
/**
* Currency pair
* @type {string}
* @memberof Exchange
*/
pair: string;
/**
* Exchange rate
* @type {number}
* @memberof Exchange
*/
rate: number;
/**
* Exchange fee
* @type {number}
* @memberof Exchange
*/
fee?: number;
/**
* Exchange fee currency
* @type {string}
* @memberof Exchange
*/
fee_currency?: string;
}
/**
*
* @export
* @interface ExchangeTransfer
*/
export interface ExchangeTransfer {
/**
* Exchange transaction ID
* @type {string}
* @memberof ExchangeTransfer
*/
id: string;
/**
* Amount converted
* @type {number}
* @memberof ExchangeTransfer
*/
charged_amount: number;
/**
* Account currency the funds converted from
* @type {string}
* @memberof ExchangeTransfer
*/
charged_currency: string;
/**
* Amount to be received upon exchange execution
* @type {number}
* @memberof ExchangeTransfer
*/
received_amount: number;
/**
* Account currency the funds converted to
* @type {string}
* @memberof ExchangeTransfer
*/
received_currency: string;
/**
* Exchange transaction reference ID in your system
* @type {string}
* @memberof ExchangeTransfer
*/
custom_id: string | null;
/**
*
* @type {Exchange}
* @memberof ExchangeTransfer
*/
exchange?: Exchange;
}
/**
*
* @export
* @interface ExchangeTransferParams
*/
export interface ExchangeTransferParams {
/**
* Account currency the funds to be converted from
* @type {string}
* @memberof ExchangeTransferParams
*/
charged_currency: string;
/**
* Amount to be converted
* @type {number}
* @memberof ExchangeTransferParams
*/
charged_amount: number | null;
/**
* Account currency the funds to be converted to
* @type {string}
* @memberof ExchangeTransferParams
*/
received_currency: string;
/**
* Amount to be received upon exchange execution
* @type {number}
* @memberof ExchangeTransferParams
*/
received_amount: number | null;
/**
* Exchange transaction reference ID in your system
* @type {string}
* @memberof ExchangeTransferParams
*/
custom_id?: string;
/**
* Is `false` if omitted. Set `true` to turn off two-step exchange. Set `false` for two-step exchange and commit it within 30 seconds
* @type {boolean}
* @memberof ExchangeTransferParams
*/
force_commit?: boolean;
}
/**
*
* @export
* @interface ExchangeTransferResult
*/
export interface ExchangeTransferResult {
/**
*
* @type {ExchangeTransfer}
* @memberof ExchangeTransferResult
*/
data: ExchangeTransfer;
}
/**
*
* @export
* @interface Invoice
*/
export interface Invoice {
/**
* Invoice ID
* @type {string}
* @memberof Invoice
*/
id: string;
/**
* Invoice reference ID in your system
* @type {string}
* @memberof Invoice
*/
custom_id: string | null;
/**
* The internal ID of your customer that the invoice relates to
* @type {string}
* @memberof Invoice
*/
customer_id: string | null;
/**
*
* @type {string}
* @memberof Invoice
*/
subscription_id: string | null;
/**
*
* @type {InvoiceStatus}
* @memberof Invoice
*/
status: InvoiceStatus;
/**
*
* @type {InvoiceStatusContext}
* @memberof Invoice
*/
status_context: InvoiceStatusContext | null;
/**
* Invoice cryptocurrency address
* @type {string}
* @memberof Invoice
*/
address: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof Invoice
*/
network: string;
/**
* Invoice URI. May be used for generating a QR code
* @type {string}
* @memberof Invoice
*/
uri: string;
/**
* Invoice amount
* @type {number}
* @memberof Invoice
*/
price_amount: number;
/**
* Invoice amount currency
* @type {string}
* @memberof Invoice
*/
price_currency: string;
/**
* Processing fee
* @type {number}
* @memberof Invoice
*/
fee: number;
/**
* Processing fee currency
* @type {string}
* @memberof Invoice
*/
fee_currency: string;
/**
* Cryptocurrency amount to pay
* @type {number}
* @memberof Invoice
*/
pay_amount: number;
/**
* Cryptocurrency type
* @type {string}
* @memberof Invoice
*/
pay_currency: string;
/**
* which amount already paid
* @type {number}
* @memberof Invoice
*/
paid_amount: number;
/**
*
* @type {Exchange}
* @memberof Invoice
*/
exchange?: Exchange;
/**
*
* @type {Array<InvoiceTransaction>}
* @memberof Invoice
*/
transactions: Array<InvoiceTransaction>;
/**
* Invoice name
* @type {string}
* @memberof Invoice
*/
name: string | null;
/**
* Invoice description
* @type {string}
* @memberof Invoice
*/
description: string | null;
/**
* Key-value data
* @type {{ [key: string]: string; }}
* @memberof Invoice
*/
metadata: {
[key: string]: string;
} | null;
/**
* URL that a customer will be redirected to upon transaction confirmation
* @type {string}
* @memberof Invoice
*/
success_redirect_url: string | null;
/**
*
* @type {string}
* @memberof Invoice
*/
unsuccess_redirect_url: string | null;
/**
* Invoice hosted page that renders invoice details
* @type {string}
* @memberof Invoice
*/
hosted_page_url: string;
/**
* Invoice creation date and time
* @type {string}
* @memberof Invoice
*/
created_at: string;
/**
* Invoice expiration date and time
* @type {string}
* @memberof Invoice
*/
expires_at: string;
}
/**
*
* @export
* @interface InvoiceCallback
*/
export interface InvoiceCallback {
/**
*
* @type {string}
* @memberof InvoiceCallback
*/
type: string;
/**
*
* @type {InvoiceCallbackEvent}
* @memberof InvoiceCallback
*/
event: InvoiceCallbackEvent;
/**
*
* @type {Invoice}
* @memberof InvoiceCallback
*/
data: Invoice;
}
/**
*
* @export
* @enum {string}
*/
export declare enum InvoiceCallbackEvent {
Created = "created",
Refunded = "refunded",
Recalculated = "recalculated",
StatusChanged = "status_changed",
TransactionCreated = "transaction_created",
TransactionConfirmed = "transaction_confirmed"
}
/**
*
* @export
* @interface InvoiceListResult
*/
export interface InvoiceListResult {
/**
*
* @type {Array<Invoice>}
* @memberof InvoiceListResult
*/
data: Array<Invoice>;
/**
*
* @type {Pagination}
* @memberof InvoiceListResult
*/
meta: Pagination;
}
/**
*
* @export
* @interface InvoiceParams
*/
export interface InvoiceParams {
/**
* The invoice amount
* @type {number}
* @memberof InvoiceParams
*/
price_amount: number;
/**
* The invoice amount currency
* @type {string}
* @memberof InvoiceParams
*/
price_currency: string;
/**
* The cryptocurrency that the invoice must be paid in
* @type {string}
* @memberof InvoiceParams
*/
pay_currency: string;
/**
* Cryptocurrency network
* @type {string}
* @memberof InvoiceParams
*/
network?: string;
/**
* The payment reference ID in your system
* @type {string}
* @memberof InvoiceParams
*/
custom_id?: string;
/**
* The internal ID of your customer that the invoice relates to. See Customers for more information
* @type {string}
* @memberof InvoiceParams
*/
customer_id?: string;
/**
* The invoice name
* @type {string}
* @memberof InvoiceParams
*/
name?: string;
/**
* The invoice description
* @type {string}
* @memberof InvoiceParams
*/
description?: string;
/**
* Custom key-valued data
* @type {{ [key: string]: string; }}
* @memberof InvoiceParams
*/
metadata?: {
[key: string]: string;
};
/**
* The URL that the customer will be redirected to upon transaction confirmation
* @type {string}
* @memberof InvoiceParams
*/
success_redirect_url?: string;
/**
*
* @type {string}
* @memberof InvoiceParams
*/
unsuccess_redirect_url?: string;
/**
* Email of payer
* @type {string}
* @memberof InvoiceParams
*/
payer_email?: string;
}
/**
*
* @export
* @interface InvoiceRecalculation
*/
export interface InvoiceRecalculation {
/**
* Recalculation ID
* @type {string}
* @memberof InvoiceRecalculation
*/
id: string;
/**
* Invoice ID
* @type {string}
* @memberof InvoiceRecalculation
*/
invoice_id: string;
/**
* Cryptocurrency amount received
* @type {number}
* @memberof InvoiceRecalculation
*/
pay_amount: number;
/**
* Cryptocurrency type
* @type {string}
* @memberof InvoiceRecalculation
*/
pay_currency: string;
/**
* New invoice amount
* @type {number}
* @memberof InvoiceRecalculation
*/
price_amount: number;
/**
* Invoice amount currency
* @type {string}
* @memberof InvoiceRecalculation
*/
price_currency: string;
/**
* Processing fee
* @type {string}
* @memberof InvoiceRecalculation
*/
fee: string;
/**
* Processing fee currency
* @type {string}
* @memberof InvoiceRecalculation
*/
fee_currency: string;
/**
* Previous amount to pay
* @type {number}
* @memberof InvoiceRecalculation
*/
previous_pay_amount: number;
/**
* Previous invoice amount
* @type {number}
* @memberof InvoiceRecalculation
*/
previous_price_amount: number;
/**
* Previous exchange rate
* @type {number}
* @memberof InvoiceRecalculation
*/
previous_exchange_rate: number | null;
/**
*
* @type {Exchange}
* @memberof InvoiceRecalculation
*/
exchange?: Exchange;
/**
* Recalculation creation date and time
* @type {string}
* @memberof InvoiceRecalculation
*/
created_at: string;
}
/**
*
* @export
* @interface InvoiceRecalculationParams
*/
export interface InvoiceRecalculationParams {
/**
* Is `false` if omitted. Set `true` to turn off two-step recalculation. Set `false` for two-step recalculation and commit it within 30 seconds
* @type {boolean}
* @memberof InvoiceRecalculationParams
*/
force_commit?: boolean;
}
/**
*
* @export
* @interface InvoiceRecalculationResult
*/
export interface InvoiceRecalculationResult {
/**
*
* @type {InvoiceRecalculation}
* @memberof InvoiceRecalculationResult
*/
data: InvoiceRecalculation;
}
/**
*
* @export
* @interface InvoiceRefund
*/
export interface InvoiceRefund {
/**
* Refund ID
* @type {string}
* @memberof InvoiceRefund
*/
id: string;
/**
* Invoice ID
* @type {string}
* @memberof InvoiceRefund
*/
invoice_id: string;
/**
* Refund `custom_id`. The value is being inherited from the parent invoice
* @type {string}
* @memberof InvoiceRefund
*/
custom_id: string | null;
/**
* Refund amount
* @type {number}
* @memberof InvoiceRefund
*/
amount: number;
/**
* Refund currency
* @type {string}
* @memberof InvoiceRefund
*/
amount_currency: string;
/**
* Processing fee
* @type {number}
* @memberof InvoiceRefund
*/
fee: number;
/**
* Processing fee currency
* @type {string}
* @memberof InvoiceRefund
*/
fee_currency: string;
/**
* Cryptocurrency address the refund transaction sent to
* @type {string}
* @memberof InvoiceRefund
*/
address: string | null;
/**
* Cryptocurrency network
* @type {string}
* @memberof InvoiceRefund
*/
network: string;
/**
* Cryptocurrency transaction ID on the blockchain
* @type {string}
* @memberof InvoiceRefund
*/
txid: string | null;
/**
*
* @type {Risk}
* @memberof InvoiceRefund
*/
risk?: Risk;
/**
* Refund transaction creation date and time
* @type {string}
* @memberof InvoiceRefund
*/
created_at: string;
}
/**
*
* @export
* @interface InvoiceRefundListResult
*/
export interface InvoiceRefundListResult {
/**
*
* @type {Array<InvoiceRefund>}
* @memberof InvoiceRefundListResult
*/
data: Array<InvoiceRefund>;
}
/**
*
* @export
* @interface InvoiceRefundResult
*/
export interface InvoiceRefundResult {
/**
*
* @type {InvoiceRefund}
* @memberof InvoiceRefundResult
*/
data: InvoiceRefund;
}
/**
*
* @export
* @interface InvoiceResult
*/
export interface InvoiceResult {
/**
*
* @type {Invoice}
* @memberof InvoiceResult
*/
data: Invoice;
}
/**
* Invoice status
* @export
* @enum {string}
*/
export declare enum InvoiceStatus {
New = "new",
Completed = "completed",
Unresolved = "unresolved",
Refunded = "refunded",
Cancelled = "cancelled"
}
/**
* Invoice status context
* @export
* @enum {string}
*/
export declare enum InvoiceStatusContext {
Overpaid = "overpaid",
Underpaid = "underpaid",
PaidLate = "paid_late",
IllicitResource = "illicit_resource"
}
/**
* Cryptocurrency transaction hash and its risk level details
* @export
* @interface InvoiceTransaction
*/
export interface InvoiceTransaction {
/**
* Transaction hash
* @type {string}
* @memberof InvoiceTransaction
*/
txid: string;
/**
*
* @type {Risk}
* @memberof InvoiceTransaction
*/
risk?: Risk;
}
/**
*
* @export
* @interface InvoicesConfig
*/
export interface InvoicesConfig {
/**
*
* @type {boolean}
* @memberof InvoicesConfig
*/
enabled: boolean;
}
/**
*
* @export
* @interface NetworkFee
*/
export interface NetworkFee {
/**
*
* @type {NetworkFeeLevel}
* @memberof NetworkFee
*/
level: NetworkFeeLevel;
/**
*
* @type {number}
* @memberof NetworkFee
*/
fee: number;
/**
*
* @type {string}
* @memberof NetworkFee
*/
currency: string;
/**
*
* @type {string}
* @memberof NetworkFee
*/
network: string;
}
/**
*
* @export
* @enum {string}
*/
export declare enum NetworkFeeLevel {
Fast = "fast",
Average = "average",
Slow = "slow"
}
/**
*
* @export
* @interface NetworkFeeListResult
*/
export interface NetworkFeeListResult {
/**
*
* @type {Array<NetworkFee>}
* @memberof NetworkFeeListResult
*/
data: Array<NetworkFee>;
}
/**
*
* @export
* @interface Pagination
*/
export interface Pagination {
/**
*
* @type {number}
* @memberof Pagination
*/
total: number;
/**
*
* @type {boolean}
* @memberof Pagination
*/
has_more: boolean;
}
/**
*
* @export
* @interface Rate
*/
export interface Rate {
/**
* Buy rate
* @type {number}
* @memberof Rate
*/
buy_rate: number;
/**
* Buy rate
* @type {number}
* @memberof Rate
*/
sell_rate: number;
}
/**
*
* @export
* @interface RateResult
*/
export interface RateResult {
/**
*
* @type {Rate}
* @memberof RateResult
*/
data: Rate;
}
/**
*
* @export
* @interface RatesResult
*/
export interface RatesResult {
/**
*
* @type {{ [key: string]: Rate; }}
* @memberof RatesResult
*/
data: {
[key: string]: Rate;
};
}
/**
* Transaction risk level details
* @export
* @interface Risk
*/
export interface Risk {
/**
* Transaction risk score
* @type {number}
* @memberof Risk
*/
score: number;
/**
*
* @type {RiskLevel}
* @memberof Risk
*/
level: RiskLevel;
/**
* A resource name the transaction has been received from
* @type {string}
* @memberof Risk
*/
resource_name: string;
/**
* A resource category the transaction has been received from
* @type {string}
* @memberof Risk
*/
resource_category: string;
}
/**
* Transaction risk level depending on the `score` value
* @export
* @enum {string}
*/
export declare enum RiskLevel {
Low = "low",
Medium = "medium",
High = "high"
}
/**
*
* @export
* @interface Subscription
*/
export interface Subscription {
/**
* Subscription ID
* @type {string}
* @memberof Subscription
*/
id: string;
/**
*
* @type {SubscriptionStatus}
* @memberof Subscription
*/
status: SubscriptionStatus;
/**
* Subscription reference ID in your system
* @type {string}
* @memberof Subscription
*/
custom_id: string | null;
/**
* Subscription name
* @type {string}
* @memberof Subscription
*/
name: string;
/**
* Subscription amount
* @type {number}
* @memberof Subscription
*/
amount: number;
/**
* Subscription amount currency
* @type {string}
* @memberof Subscription
*/
currency: string;
/**
*
* @type {SubscriptionPeriod}
* @memberof Subscription
*/
period: SubscriptionPeriod;
/**
*
* @type {number}
* @memberof Subscription
*/
period_quantity: number;
/**
*
* @type {string}
* @memberof Subscription
*/
current_period_starts_at: string;
/**
*
* @type {string}
* @memberof Subscription
*/
current_period_ends_at: string;
/**
*
* @type {boolean}
* @memberof Subscription
*/
current_period_paid: boolean;
/**
*
* @type {string}
* @memberof Subscription
*/
payer_email: string;
/**
*
* @type {string}
* @memberof Subscription
*/
payer_name: string | null;
/**
*
* @type {string}
* @memberof Subscription
*/
product_name: string | null;
/**
*
* @type {string}
* @memberof Subscription
*/
product_description: string | null;
/**
* The URL that the customer will be redirected to upon transaction confirmation
* @type {string}
* @memberof Subscription
*/
success_redirect_url: string | null;
/**
*
* @type {string}
* @memberof Subscription
*/
unsuccess_redirect_url: string | null;
/**
*
* @type {string}
* @memberof Subscription
*/
created_at: string;
/**
*
* @type {string}
* @memberof Subscription
*/
cancelled_at: string | null;
}
/**
*
* @export
* @interface SubscriptionCallback
*/
export interface SubscriptionCallback {
/**
*
* @type {string}
* @memberof SubscriptionCallback
*/
type: string;
/**
*
* @type {SubscriptionCallbackEvent}
* @memberof SubscriptionCallback
*/
event: SubscriptionCallbackEvent;
/**
*
* @type {Subscription}
* @memberof SubscriptionCallback
*/
data: Subscription;
}
/**
*
* @export
* @enum {string}
*/
export declare enum SubscriptionCallbackEvent {
Paid = "paid",
Cancelled = "cancelled"
}
/**
*
* @export
* @interface SubscriptionListResult
*/
export interface SubscriptionListResult {
/**
*
* @type {Array<Subscription>}
* @memberof SubscriptionListResult
*/
data: Array<Subscription>;
/**
*
* @type {Pagination}
* @memberof SubscriptionListResult
*/
meta: Pagination;
}
/**
*
* @export
* @interface SubscriptionParams
*/
export interface SubscriptionParams {
/**
* Subscription name
* @type {string}
* @memberof SubscriptionParams
*/
name: string;
/**
* Subscription amount
* @type {number}
* @memberof SubscriptionParams
*/
amount: number;
/**
* Subscription amount currency
* @type {string}
* @memberof SubscriptionParams
*/
currency: string;
/**
*
* @type {SubscriptionPeriod}
* @memberof SubscriptionParams
*/
period: SubscriptionPeriod;
/**
*
* @type {number}
* @memberof SubscriptionParams
*/
period_quantity: number;
/**
*
* @type {string}
* @memberof SubscriptionParams
*/
starts_at: string;
/**
* Email of the payer
* @type {string}
* @memberof SubscriptionParams
*/
payer_email: string;
/**
* Name of the payer
* @type {string}
* @memberof SubscriptionParams
*/
payer_name?: string;
/**
* Subscription reference ID in your system
* @type {string}
* @memberof SubscriptionParams
*/
custom_id?: string;
/**
*
* @type {string}
* @memberof SubscriptionParams
*/
product_name?: string;
/**
*
* @type {string}
* @memberof SubscriptionParams
*/
product_description?: string;
/**
* The URL that the customer will be redirected to upon transaction confirmation
* @type {string}
* @memberof SubscriptionParams
*/
success_redirect_url?: string;
/**
*
* @type {string}
* @memberof SubscriptionParams
*/
unsuccess_redirect_url?: string;
}
/**
*
* @export
* @enum {string}
*/
export declare enum SubscriptionPeriod {
Day = "day",
Week = "week",
Month = "month",
Year = "year"
}
/**
*
* @export
* @interface SubscriptionResult
*/
export interface SubscriptionResult {
/**
*
* @type {Subscription}
* @memberof SubscriptionResult
*/
data: Subscription;
}
/**
* Subscription status
* @export
* @enum {string}
*/
export declare enum SubscriptionStatus {
Active = "active",
Cancelled = "cancelled"
}
/**
*
* @export
* @interface Transaction
*/
export interface Transaction {
/**
* Account transaction ID
* @type {string}
* @memberof Transaction
*/
id: string;
/**
* Transaction description
* @type {string}
* @memberof Transaction
*/
custom_id: string | null;
/**
* The reference ID of your customer
* @type {string}
* @memberof Transaction
*/
customer_id: string | null;
/**
* Transaction amount
* @type {number}
* @memberof Transaction
*/
amount: number;
/**
* Transaction currency
* @type {string}
* @memberof Transaction
*/
currency: string;
/**
* Account subtotal
* @type {number}
* @memberof Transaction
*/
balance: number;
/**
* Transaction fee details
* @type {number}
* @memberof Transaction
*/
fee?: number;
/**
* Transaction fee currency
* @type {string}
* @memberof Transaction
*/
fee_currency?: string;
/**
* Transaction reference ID in Cryptopay
* @type {string}
* @memberof Transaction
*/
reference_id: string;
/**
*
* @type {TransactionReferenceType}
* @memberof Transaction
*/
reference_type: TransactionReferenceType;
/**
* Transaction description
* @type {string}
* @memberof Transaction
*/
description: string | null;
/**
* Transaction status
* @type {string}
* @memberof Transaction
*/
status: string | null;
/**
* Transaction status context
* @type {string}
* @memberof Transaction
*/
status_context: string | null;
/**
*
* @type {Risk}
* @memberof Transaction
*/
risk?: Risk;
/**
* Transaction creation date and time
* @type {string}
* @memberof Transaction
*/
created_at: string;
}
/**
*
* @export
* @interface TransactionListResult
*/
export interface TransactionListResult {
/**
*
* @type {Array<Transaction>}
* @memberof TransactionListResult
*/
data: Array<Transaction>;
/**
*
* @type {Pagination}
* @memberof TransactionListResult
*/
meta: Pagination;
}
/**
*
* @export
* @enum {string}
*/
export declare enum TransactionReferenceType {
BankDeposit = "BankDeposit",
BankWithdrawal = "BankWithdrawal",
ChannelPayment = "ChannelPayment",
CoinDeposit = "CoinDeposit",
CoinWithdrawal = "CoinWithdrawal",
ExchangeTransfer = "ExchangeTransfer",
Invoice = "Invoice",
InvoiceRefund = "InvoiceRefund",
ManualBalanceTransaction = "ManualBalanceTransaction"
}
/**
* Accounts - axios parameter creator
* @export
*/
export declare const AccountsAxiosParamCreator: (configuration?: Configuration | undefined) => {
/**
*
* @summary List accounts
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
list: (options?: any) => Promise<RequestArgs>;
/**
*
* @summary List account transactions
* @param {string} accountId Account ID
* @param {string} [startingAfter] Pagination parameter. ID to start after
* @param {*} [options] Override http request option.
* @throws {RequiredError}