Documentation ¶
Index ¶
- func ListPayments(o *ListPaymentsOption) ([]*payments.Payment[string], error)
- func NewDepositWithPayment(da *DepositWithPaymentArgs) (*payments.Payment[string], error)
- type BalanceAmounts
- type Balances
- type DepositArgs
- type DepositWithPaymentArgs
- type ListCommonOptionsArgs
- type ListPaymentsOption
- type ListTransfersOptionArgs
- type Transfer
- func GetTransfer(transferID string) (*Transfer, error)
- func ListTransfers(o *ListTransfersOptionArgs) ([]*Transfer, error)
- func NewDepositFroMasterAccount(da *DepositArgs) (*Transfer, error)
- func NewTransfer(ta *TransferArgs) (*Transfer, error)
- func NewWriteOffToMaster(wo *DepositArgs) (*Transfer, error)
- type TransferArgs
- type User
- type UserAccountArgs
- type UserBalances
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListPayments ¶ added in v1.0.2
func ListPayments(o *ListPaymentsOption) ([]*payments.Payment[string], error)
ListPayments return all Custody Payments, based on provided filters (which can be nil) JWT is required for this request
func NewDepositWithPayment ¶
func NewDepositWithPayment(da *DepositWithPaymentArgs) (*payments.Payment[string], error)
NewDepositWithPayment will create a payment to deposit on a specific user account (refill account) The response doesn't provide the payment link, but can be built using https://nowpayments.io/payment/?iid=[INVOICE_ID]&paymentId=[PAYMENT_id] JWT is required for this request
Types ¶
type BalanceAmounts ¶
type BalanceAmounts struct { Amount float64 `json:"amount"` PendingAmount float64 `json:"pendingAmount"` }
BalanceAmounts single balance for Custody user account
type Balances ¶
type Balances struct { Usddtrc20 BalanceAmounts `json:"usddtrc20"` Usdtbsc BalanceAmounts `json:"usdtbsc"` }
Balances hold multiple balances for Custody user account
type DepositArgs ¶
type DepositWithPaymentArgs ¶
type DepositWithPaymentArgs struct { DepositArgs IsFixedRate bool `json:"is_fixed_rate"` IsFeePaidByUser bool `json:"is_fee_paid_by_user"` IpnCallbackURL string `json:"ipn_callback_url,omitempty"` }
type ListCommonOptionsArgs ¶
type ListPaymentsOption ¶
type ListPaymentsOption struct { Limit int64 Page int64 Id int64 PayCurrency string Status string SubPartnerID string DateFrom string DateTo string OrderBy string SortBy string }
BalanceAmounts single balance for Custody user account
type ListTransfersOptionArgs ¶
type ListTransfersOptionArgs struct { ListCommonOptionsArgs Status string }
ListTransfersOption are options applying to the list of transfers
type Transfer ¶
type Transfer struct { Id string `json:"id,omitempty"` FromSubID string `json:"from_sub_id,omitempty"` ToSubID string `json:"to_sub_id,omitempty"` Status string `json:"status,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` }
func GetTransfer ¶
GetTransfer will return single transfer information based on the supplied transfer ID JWT is required for this request
func ListTransfers ¶
func ListTransfers(o *ListTransfersOptionArgs) ([]*Transfer, error)
Transfer with return a list of all transfers based on supplied options (which can be nil) JWT is required for this request
func NewDepositFroMasterAccount ¶
func NewDepositFroMasterAccount(da *DepositArgs) (*Transfer, error)
NewDepositFroMasterAccount will create a deposit on a specific user account from a master account (no payment link, will use balance from master) JWT is required for this request
func NewTransfer ¶
func NewTransfer(ta *TransferArgs) (*Transfer, error)
NewTransfer will initiate a transfer between two user account JWT is required for this request
func NewWriteOffToMaster ¶
func NewWriteOffToMaster(wo *DepositArgs) (*Transfer, error)
NewWriteOffToMaster will initiate a funds transfer from user balance to master account JWT is required for this request
type TransferArgs ¶
type User ¶
type User struct { ID string `json:"id"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
User hold response for a Custody user account
func ListUsers ¶
func ListUsers(o *ListCommonOptionsArgs) ([]*User, error)
func NewUser ¶
func NewUser(cu *UserAccountArgs) (*User, error)
NewUser will initiate new user account from a unique ID JWT is required for this request
type UserAccountArgs ¶
type UserAccountArgs struct {
Name string `json:"name"`
}
type UserBalances ¶
type UserBalances struct { SubPartnerID string `json:"subPartnerId"` Balances Balances `json:"balances"` }
UserBalances hold response for a specific Custody user account balance
func GetBalance ¶
func GetBalance(userAccountID string) (*UserBalances, error)
GetBalance get the balances for a specific Custody user account, based on it's unique account ID This endpoint will work only if IP is whitelisted (or white IP restrictions are disabled)