Documentation ΒΆ
Index ΒΆ
- type APIKey
- type APIKeyRequest
- type APIKeyResponse
- type AuthorizationRequest
- type BTCPayInvoiceAdditionalStatus
- type BTCPayInvoiceStatus
- type BTCPayInvoiceStatusMark
- type BTCPayNetworkFeeMode
- type BTCPayPaymentRequestStatus
- type BTCPayPaymentStatus
- type BTCPayPayoutStatus
- type BTCPayPermission
- type BTCPaySpeedPolicy
- type Client
- func (c *Client) ApprovePayout(ctx context.Context, storeID *StoreID, payoutID *PayoutID, ...) (*PayoutResponse, int, error)
- func (c *Client) ArchiveInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) (int, error)
- func (c *Client) ArchivePaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestID *PaymentRequestID) (int, error)
- func (c *Client) ArchivePullPayment(ctx context.Context, storeID *StoreID, pullPaymentID *PullPaymentID) (int, error)
- func (c *Client) Authorize(ctx context.Context, authRequest *AuthorizationRequest) (int, error)
- func (c *Client) CancelPayout(ctx context.Context, storeID *StoreID, payoutID *PayoutID) (int, error)
- func (c *Client) CreateAPIKey(ctx context.Context, apiKeyRequest *APIKeyRequest) (*APIKeyResponse, int, error)
- func (c *Client) CreateInvoice(ctx context.Context, storeID *StoreID, invoiceRequest *InvoiceRequest) (*InvoiceResponse, int, error)
- func (c *Client) CreatePaymentRequest(ctx context.Context, storeID *StoreID, ...) (*PaymentRequestResponse, int, error)
- func (c *Client) CreatePayout(ctx context.Context, pullPaymentID *PullPaymentID, ...) (*PayoutResponse, int, error)
- func (c *Client) CreatePullPayment(ctx context.Context, storeID *StoreID, pullPaymentRequest *PullPaymentRequest) (*PullPaymentResponse, int, error)
- func (c *Client) CreateStore(ctx context.Context, storeRequest *StoreRequest) (*StoreResponse, int, error)
- func (c *Client) CreateUser(ctx context.Context, userRequest *UserRequest) (*UserResponse, int, error)
- func (c *Client) GetCurrentAPIKey(ctx context.Context) (*APIKeyResponse, int, error)
- func (c *Client) GetHealth(ctx context.Context) (*HealthResponse, int, error)
- func (c *Client) GetInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) (*InvoiceResponse, int, error)
- func (c *Client) GetInvoiceCheckoutPage(ctx context.Context, invoiceID *InvoiceID, lang ...string) (*InvoiceCheckoutPage, int, error)
- func (c *Client) GetInvoicePaymentMethod(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) ([]*InvoicePaymentMethodResponse, int, error)
- func (c *Client) GetInvoices(ctx context.Context, storeID *StoreID) ([]*InvoiceResponse, int, error)
- func (c *Client) GetLanguageCodes(ctx context.Context) ([]*LanguageCodesRespose, int, error)
- func (c *Client) GetNotification(ctx context.Context, notificationID *NotificationID) (*NotificationResponse, int, error)
- func (c *Client) GetNotifications(ctx context.Context, seen ...bool) ([]*NotificationResponse, int, error)
- func (c *Client) GetPaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestID *PaymentRequestID) (*PaymentRequestResponse, int, error)
- func (c *Client) GetPaymentRequests(ctx context.Context, storeID *StoreID) ([]*PaymentRequestResponse, int, error)
- func (c *Client) GetPayouts(ctx context.Context, pullPaymentID *PullPaymentID, includeCancelled ...bool) ([]*PayoutResponse, int, error)
- func (c *Client) GetPullPayment(ctx context.Context, pullPaymentID *PullPaymentID) (*PullPaymentResponse, int, error)
- func (c *Client) GetPullPayments(ctx context.Context, storeID *StoreID, includeArchived ...bool) ([]*PullPaymentResponse, int, error)
- func (c *Client) GetServerInfo(ctx context.Context) (*ServerInfoResponse, int, error)
- func (c *Client) GetStore(ctx context.Context, storeID *StoreID) (*StoreResponse, int, error)
- func (c *Client) GetStores(ctx context.Context) ([]*StoreResponse, int, error)
- func (c *Client) GetUser(ctx context.Context) (*UserResponse, int, error)
- func (c *Client) MarkInvoiceStatus(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID, ...) (*InvoiceResponse, int, error)
- func (c *Client) RemoveNotification(ctx context.Context, notificationID *NotificationID) (int, error)
- func (c *Client) RemoveStore(ctx context.Context, storeID *StoreID) (int, error)
- func (c *Client) RevokeAPIKey(ctx context.Context, apiKey *APIKey) (int, error)
- func (c *Client) RevokeCurrentAPIKey(ctx context.Context) (*APIKeyResponse, int, error)
- func (c *Client) UnarchiveInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) (*InvoiceResponse, int, error)
- func (c *Client) UpdateInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID, ...) (*InvoiceResponse, int, error)
- func (c *Client) UpdateNotification(ctx context.Context, notificationID *NotificationID, ...) (*NotificationResponse, int, error)
- func (c *Client) UpdatePaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestID *PaymentRequestID, ...) (*PaymentRequestResponse, int, error)
- func (c *Client) UpdateStore(ctx context.Context, storeID *StoreID, storeUpdate *StoreUpdate) (*StoreResponse, int, error)
- type HealthResponse
- type Invoice
- func (i *Invoice) ArchiveInvoice(ctx context.Context) (int, error)
- func (i *Invoice) GetInvoice(ctx context.Context) (*InvoiceResponse, int, error)
- func (i *Invoice) GetInvoiceCheckoutPage(ctx context.Context) (*InvoiceCheckoutPage, int, error)
- func (i *Invoice) GetInvoicePaymentMethod(ctx context.Context) ([]*InvoicePaymentMethodResponse, int, error)
- func (i *Invoice) MarkInvoiceStatus(ctx context.Context, markInvoiceStatusRequest *MarkInvoiceStatusRequest) (*InvoiceResponse, int, error)
- func (i *Invoice) UnarchiveInvoice(ctx context.Context) (*InvoiceResponse, int, error)
- func (i *Invoice) UpdateInvoice(ctx context.Context, invoiceUpdate *InvoiceUpdate) (*InvoiceResponse, int, error)
- type InvoiceAdditionalStatus
- type InvoiceCheckout
- type InvoiceCheckoutPage
- type InvoiceID
- type InvoiceMetadata
- type InvoicePaymentMethodResponse
- type InvoiceRequest
- type InvoiceResponse
- type InvoiceStatus
- type InvoiceStatusMark
- type InvoiceUpdate
- type LanguageCodesRespose
- type MarkInvoiceStatusRequest
- type NetworkFeeMode
- type Notification
- func (n *Notification) GetNotification(ctx context.Context) (*NotificationResponse, int, error)
- func (n *Notification) RemoveNotification(ctx context.Context) (int, error)
- func (n *Notification) UpdateNotification(ctx context.Context, updateNotification ...*UpdateNotification) (*NotificationResponse, int, error)
- type NotificationID
- type NotificationResponse
- type Payment
- type PaymentID
- type PaymentRequest
- func (p *PaymentRequest) ArchivePaymentRequest(ctx context.Context) (int, error)
- func (p *PaymentRequest) GetPaymentRequest(ctx context.Context) (*PaymentRequestResponse, int, error)
- func (p *PaymentRequest) UpdatePaymentRequest(ctx context.Context, paymentRequestUpdate *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
- type PaymentRequestID
- type PaymentRequestRequest
- type PaymentRequestResponse
- type PaymentRequestStatus
- type PaymentStatus
- type Payout
- type PayoutApproveRequest
- type PayoutID
- type PayoutRequest
- type PayoutResponse
- type PayoutStatus
- type Permission
- type PullPayment
- func (p *PullPayment) ArchivePullPayment(ctx context.Context) (int, error)
- func (p *PullPayment) CreatePayout(ctx context.Context, payoutRequest *PayoutRequest) (*PayoutResponse, int, error)
- func (p *PullPayment) GetPayouts(ctx context.Context, includeCancelled ...bool) ([]*PayoutResponse, int, error)
- func (p *PullPayment) GetPullPayment(ctx context.Context) (*PullPaymentResponse, int, error)
- type PullPaymentID
- type PullPaymentRequest
- type PullPaymentResponse
- type ServerInfoResponse
- type ServerNodeInformation
- type ServerSyncStatus
- type SpeedPolicy
- type Store
- func (s *Store) ApprovePayout(ctx context.Context, payoutID *PayoutID, ...) (*PayoutResponse, int, error)
- func (s *Store) ArchiveInvoice(ctx context.Context, invoiceID *InvoiceID) (int, error)
- func (s *Store) ArchivePaymentRequest(ctx context.Context, paymentRequestID *PaymentRequestID) (int, error)
- func (s *Store) ArchivePullPayment(ctx context.Context, pullPaymentID *PullPaymentID) (int, error)
- func (s *Store) CancelPayout(ctx context.Context, payoutID *PayoutID) (int, error)
- func (s *Store) CreateInvoice(ctx context.Context, invoiceRequest *InvoiceRequest) (*InvoiceResponse, int, error)
- func (s *Store) CreatePaymentRequest(ctx context.Context, paymentRequestRequest *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
- func (s *Store) CreatePullPayment(ctx context.Context, pullPaymentRequest *PullPaymentRequest) (*PullPaymentResponse, int, error)
- func (s *Store) GetInvoice(ctx context.Context, invoiceID *InvoiceID) (*InvoiceResponse, int, error)
- func (s *Store) GetInvoicePaymentMethod(ctx context.Context, invoiceID *InvoiceID) ([]*InvoicePaymentMethodResponse, int, error)
- func (s *Store) GetInvoices(ctx context.Context) ([]*InvoiceResponse, int, error)
- func (s *Store) GetPaymentRequest(ctx context.Context, paymentRequestID *PaymentRequestID) (*PaymentRequestResponse, int, error)
- func (s *Store) GetPaymentRequests(ctx context.Context) ([]*PaymentRequestResponse, int, error)
- func (s *Store) GetPullPayments(ctx context.Context, includeArchived ...bool) ([]*PullPaymentResponse, int, error)
- func (s *Store) GetStore(ctx context.Context) (*StoreResponse, int, error)
- func (s *Store) MarkInvoiceStatus(ctx context.Context, invoiceID *InvoiceID, ...) (*InvoiceResponse, int, error)
- func (s *Store) RemoveStore(ctx context.Context) (int, error)
- func (s *Store) UnarchiveInvoice(ctx context.Context, invoiceID *InvoiceID) (*InvoiceResponse, int, error)
- func (s *Store) UpdateInvoice(ctx context.Context, invoiceID *InvoiceID, invoiceUpdate *InvoiceUpdate) (*InvoiceResponse, int, error)
- func (s *Store) UpdatePaymentRequest(ctx context.Context, paymentRequestID *PaymentRequestID, ...) (*PaymentRequestResponse, int, error)
- func (s *Store) UpdateStore(ctx context.Context, storeUpdate *StoreUpdate) (*StoreResponse, int, error)
- type StoreID
- type StoreRequest
- type StoreResponse
- type StoreUpdate
- type UpdateNotification
- type UserID
- type UserRequest
- type UserResponse
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type APIKeyRequest ΒΆ
type APIKeyRequest struct { Label string `json:"label,omitempty"` Permissions []BTCPayPermission `json:"permissions,omitempty"` }
type APIKeyResponse ΒΆ
type APIKeyResponse struct { APIKey APIKey `json:"apiKey"` Label string `json:"label"` Permissions []BTCPayPermission `json:"permissions"` }
type AuthorizationRequest ΒΆ
type AuthorizationRequest struct { Permissions []BTCPayPermission `json:"permissions,omitempty"` ApplicationName string `json:"applicationName,omitempty"` Strict bool `json:"strict,omitempty"` SelectiveStores bool `json:"selectiveStores,omitempty"` Redirect string `json:"redirect,omitempty"` ApplicationIdentifier string `json:"applicationIdentifier,omitempty"` }
type BTCPayInvoiceAdditionalStatus ΒΆ
type BTCPayInvoiceAdditionalStatus string
Enums InvoiceAdditionalStatus
type BTCPayPaymentRequestStatus ΒΆ
type BTCPayPaymentRequestStatus string
Enums PaymentRequestStatus
type BTCPayPermission ΒΆ
type BTCPayPermission string
Enums BTCPayPermission
func CreateCustomPermission ΒΆ
func CreateCustomPermission(permission BTCPayPermission, storeID StoreID) BTCPayPermission
type Client ΒΆ
type Client struct { URL string APIKey APIKey Username string Password string Http *http.Client Store *Store Invoice *Invoice PaymentRequest *PaymentRequest Notification *Notification PullPayment *PullPayment Payout *Payout }
func NewBasicClient ΒΆ
func (*Client) ApprovePayout ΒΆ
func (c *Client) ApprovePayout(ctx context.Context, storeID *StoreID, payoutID *PayoutID, payoutApproveRequest *PayoutApproveRequest) (*PayoutResponse, int, error)
Approve a payout
func (*Client) ArchiveInvoice ΒΆ
func (c *Client) ArchiveInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) (int, error)
Archive a single invoice of a store
func (*Client) ArchivePaymentRequest ΒΆ
func (c *Client) ArchivePaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestID *PaymentRequestID) (int, error)
Archives the specified payment request.
func (*Client) ArchivePullPayment ΒΆ
func (*Client) CancelPayout ΒΆ
func (c *Client) CancelPayout(ctx context.Context, storeID *StoreID, payoutID *PayoutID) (int, error)
Cancel the payout
func (*Client) CreateAPIKey ΒΆ
func (c *Client) CreateAPIKey(ctx context.Context, apiKeyRequest *APIKeyRequest) (*APIKeyResponse, int, error)
func (*Client) CreateInvoice ΒΆ
func (c *Client) CreateInvoice(ctx context.Context, storeID *StoreID, invoiceRequest *InvoiceRequest) (*InvoiceResponse, int, error)
Create an invoice for a certain store
func (*Client) CreatePaymentRequest ΒΆ
func (c *Client) CreatePaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestRequest *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
Create a new payment request
func (*Client) CreatePayout ΒΆ
func (c *Client) CreatePayout(ctx context.Context, pullPaymentID *PullPaymentID, payoutRequest *PayoutRequest) (*PayoutResponse, int, error)
create a new payout
func (*Client) CreatePullPayment ΒΆ
func (c *Client) CreatePullPayment(ctx context.Context, storeID *StoreID, pullPaymentRequest *PullPaymentRequest) (*PullPaymentResponse, int, error)
func (*Client) CreateStore ΒΆ
func (c *Client) CreateStore(ctx context.Context, storeRequest *StoreRequest) (*StoreResponse, int, error)
create a new store
func (*Client) CreateUser ΒΆ
func (c *Client) CreateUser(ctx context.Context, userRequest *UserRequest) (*UserResponse, int, error)
func (*Client) GetCurrentAPIKey ΒΆ
func (*Client) GetInvoice ΒΆ
func (c *Client) GetInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) (*InvoiceResponse, int, error)
Get a signle invoice from a single store.
func (*Client) GetInvoiceCheckoutPage ΒΆ
func (c *Client) GetInvoiceCheckoutPage(ctx context.Context, invoiceID *InvoiceID, lang ...string) (*InvoiceCheckoutPage, int, error)
View the checkout page of an invoice
func (*Client) GetInvoicePaymentMethod ΒΆ
func (c *Client) GetInvoicePaymentMethod(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) ([]*InvoicePaymentMethodResponse, int, error)
View information about the specified invoice's payment methods
func (*Client) GetInvoices ΒΆ
func (c *Client) GetInvoices(ctx context.Context, storeID *StoreID) ([]*InvoiceResponse, int, error)
Get an array of all Invoices from a single store.
func (*Client) GetLanguageCodes ΒΆ
func (*Client) GetNotification ΒΆ
func (c *Client) GetNotification(ctx context.Context, notificationID *NotificationID) (*NotificationResponse, int, error)
View information about the specified notification
func (*Client) GetNotifications ΒΆ
func (*Client) GetPaymentRequest ΒΆ
func (c *Client) GetPaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestID *PaymentRequestID) (*PaymentRequestResponse, int, error)
View information about the specified payment request
func (*Client) GetPaymentRequests ΒΆ
func (c *Client) GetPaymentRequests(ctx context.Context, storeID *StoreID) ([]*PaymentRequestResponse, int, error)
View information about the existing payment requests
func (*Client) GetPayouts ΒΆ
func (c *Client) GetPayouts(ctx context.Context, pullPaymentID *PullPaymentID, includeCancelled ...bool) ([]*PayoutResponse, int, error)
Get payouts
func (*Client) GetPullPayment ΒΆ
func (c *Client) GetPullPayment(ctx context.Context, pullPaymentID *PullPaymentID) (*PullPaymentResponse, int, error)
Get a pull payment
func (*Client) GetPullPayments ΒΆ
func (c *Client) GetPullPayments(ctx context.Context, storeID *StoreID, includeArchived ...bool) ([]*PullPaymentResponse, int, error)
Get the pull payments of a store
func (*Client) GetServerInfo ΒΆ
func (*Client) MarkInvoiceStatus ΒΆ
func (c *Client) MarkInvoiceStatus(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID, markInvoiceStatusRequest *MarkInvoiceStatusRequest) (*InvoiceResponse, int, error)
Mark an invoice as invalid or settled.
func (*Client) RemoveNotification ΒΆ
func (c *Client) RemoveNotification(ctx context.Context, notificationID *NotificationID) (int, error)
Removes the specified notification.
func (*Client) RemoveStore ΒΆ
Removes the specified store. If there is another user with access, only your access will be removed.
func (*Client) RevokeAPIKey ΒΆ
func (*Client) RevokeCurrentAPIKey ΒΆ
func (*Client) UnarchiveInvoice ΒΆ
func (c *Client) UnarchiveInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID) (*InvoiceResponse, int, error)
unarchive an invoice
func (*Client) UpdateInvoice ΒΆ
func (c *Client) UpdateInvoice(ctx context.Context, storeID *StoreID, invoiceID *InvoiceID, invoiceUpdate *InvoiceUpdate) (*InvoiceResponse, int, error)
Update the metadata from an existing invoice
func (*Client) UpdateNotification ΒΆ
func (c *Client) UpdateNotification(ctx context.Context, notificationID *NotificationID, updateNotification ...*UpdateNotification) (*NotificationResponse, int, error)
Updates the notification
func (*Client) UpdatePaymentRequest ΒΆ
func (c *Client) UpdatePaymentRequest(ctx context.Context, storeID *StoreID, paymentRequestID *PaymentRequestID, paymentRequestUpdate *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
Update a payment request
func (*Client) UpdateStore ΒΆ
func (c *Client) UpdateStore(ctx context.Context, storeID *StoreID, storeUpdate *StoreUpdate) (*StoreResponse, int, error)
type HealthResponse ΒΆ
type HealthResponse struct {
Synchronized bool `json:"synchronized"`
}
type Invoice ΒΆ
func (*Invoice) ArchiveInvoice ΒΆ
func (*Invoice) GetInvoice ΒΆ
func (*Invoice) GetInvoiceCheckoutPage ΒΆ
func (*Invoice) GetInvoicePaymentMethod ΒΆ
func (*Invoice) MarkInvoiceStatus ΒΆ
func (i *Invoice) MarkInvoiceStatus(ctx context.Context, markInvoiceStatusRequest *MarkInvoiceStatusRequest) (*InvoiceResponse, int, error)
func (*Invoice) UnarchiveInvoice ΒΆ
func (*Invoice) UpdateInvoice ΒΆ
func (i *Invoice) UpdateInvoice(ctx context.Context, invoiceUpdate *InvoiceUpdate) (*InvoiceResponse, int, error)
type InvoiceAdditionalStatus ΒΆ
type InvoiceAdditionalStatus struct { None BTCPayInvoiceAdditionalStatus PaidLate BTCPayInvoiceAdditionalStatus PaidPartial BTCPayInvoiceAdditionalStatus Marked BTCPayInvoiceAdditionalStatus AddInvalid BTCPayInvoiceAdditionalStatus PaidOver BTCPayInvoiceAdditionalStatus }
func GetInvoiceAdditionalStatus ΒΆ
func GetInvoiceAdditionalStatus() *InvoiceAdditionalStatus
type InvoiceCheckout ΒΆ
type InvoiceCheckout struct { SpeedPolicy BTCPaySpeedPolicy `json:"speedPolicy,omitempty"` PaymentMethods []string `json:"paymentMethods,omitempty"` ExpirationMinutes int `json:"expirationMinutes,omitempty"` MonitoringMinutes int `json:"monitoringMinutes,omitempty"` PaymentTolerance float64 `json:"paymentTolerance,omitempty"` RedirectURL string `json:"redirectURL,omitempty"` DefaultLanguage string `json:"defaultLanguage,omitempty"` }
type InvoiceCheckoutPage ΒΆ
type InvoiceCheckoutPage struct {
Page []byte
}
type InvoiceMetadata ΒΆ
type InvoiceMetadata map[string]interface{}
type InvoicePaymentMethodResponse ΒΆ
type InvoicePaymentMethodResponse struct { PaymentMethod string `json:"paymentMethod"` Destination string `json:"destination"` PaymentLink string `json:"paymentLink,omitempty"` Rate string `json:"rate"` PaymentMethodPaid string `json:"paymentMethodPaid"` TotalPaid string `json:"totalPaid"` Due string `json:"due"` Amount string `json:"amount"` NetworkFee string `json:"networkFee"` Payments []Payment `json:"payments"` }
type InvoiceRequest ΒΆ
type InvoiceRequest struct { Amount string `json:"amount"` Currency string `json:"currency,omitempty"` Metadata InvoiceMetadata `json:"metadata,omitempty"` InvoiceCheckout InvoiceCheckout `json:"checkout,omitempty"` }
type InvoiceResponse ΒΆ
type InvoiceResponse struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` Metadata InvoiceMetadata `json:"metadata,omitempty"` Checkout InvoiceCheckout `json:"checkout,omitempty"` ID InvoiceID `json:"id"` CheckoutLink string `json:"checkoutLink"` CreatedTime int64 `json:"createdTime"` ExpirationTime int64 `json:"expirationTime"` MonitoringTime int64 `json:"monitoringTime"` Status BTCPayInvoiceStatus `json:"status"` AdditionalStatus BTCPayInvoiceAdditionalStatus `json:"additionalStatus"` }
type InvoiceStatus ΒΆ
type InvoiceStatus struct { New BTCPayInvoiceStatus Processing BTCPayInvoiceStatus Expired BTCPayInvoiceStatus Invalid BTCPayInvoiceStatus Settled BTCPayInvoiceStatus }
func GetInvoiceStatus ΒΆ
func GetInvoiceStatus() *InvoiceStatus
type InvoiceStatusMark ΒΆ
type InvoiceStatusMark struct { MarkInvalid BTCPayInvoiceStatusMark MarkComplete BTCPayInvoiceStatusMark }
func GetInvoiceStatusMark ΒΆ
func GetInvoiceStatusMark() *InvoiceStatusMark
type InvoiceUpdate ΒΆ
type InvoiceUpdate struct {
Metadata InvoiceMetadata `json:"metadata,omitempty"`
}
type LanguageCodesRespose ΒΆ
type MarkInvoiceStatusRequest ΒΆ
type MarkInvoiceStatusRequest struct {
Status BTCPayInvoiceStatusMark `json:"status"`
}
type NetworkFeeMode ΒΆ
type NetworkFeeMode struct { MultiplePaymentsOnly BTCPayNetworkFeeMode Always BTCPayNetworkFeeMode Never BTCPayNetworkFeeMode }
func GetNetworkFeeMode ΒΆ
func GetNetworkFeeMode() *NetworkFeeMode
type Notification ΒΆ
type Notification struct { ID NotificationID Client *Client }
func (*Notification) GetNotification ΒΆ
func (n *Notification) GetNotification(ctx context.Context) (*NotificationResponse, int, error)
func (*Notification) RemoveNotification ΒΆ
func (n *Notification) RemoveNotification(ctx context.Context) (int, error)
func (*Notification) UpdateNotification ΒΆ
func (n *Notification) UpdateNotification(ctx context.Context, updateNotification ...*UpdateNotification) (*NotificationResponse, int, error)
type NotificationID ΒΆ
type NotificationID string
type NotificationResponse ΒΆ
type NotificationResponse struct { ID NotificationID `json:"id"` Body string `json:"body"` Link string `json:"link"` CreatedTime int64 `json:"createdTime"` Seen bool `json:"seen"` }
type PaymentRequest ΒΆ
type PaymentRequest struct { Store *Store Client *Client ID PaymentRequestID }
func (*PaymentRequest) ArchivePaymentRequest ΒΆ
func (p *PaymentRequest) ArchivePaymentRequest(ctx context.Context) (int, error)
func (*PaymentRequest) GetPaymentRequest ΒΆ
func (p *PaymentRequest) GetPaymentRequest(ctx context.Context) (*PaymentRequestResponse, int, error)
func (*PaymentRequest) UpdatePaymentRequest ΒΆ
func (p *PaymentRequest) UpdatePaymentRequest(ctx context.Context, paymentRequestUpdate *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
type PaymentRequestID ΒΆ
type PaymentRequestID string
type PaymentRequestRequest ΒΆ
type PaymentRequestRequest struct { Amount float64 `json:"amount"` Title string `json:"title"` Currency string `json:"currency"` Email string `json:"email,omitempty"` Description string `json:"description,omitempty"` ExpiryDate int64 `json:"expiryDate,omitempty"` EmbeddedCSS string `json:"embeddedCSS,omitempty"` CustomCSSLink string `json:"customCSSLink,omitempty"` AllowCustomPaymentAmounts bool `json:"allowCustomPaymentAmounts,omitempty"` }
type PaymentRequestResponse ΒΆ
type PaymentRequestResponse struct { ID PaymentRequestID `json:"id"` Status BTCPayPaymentRequestStatus `json:"status"` Created string `json:"created"` Archived bool `json:"archived"` PaymentRequestRequest }
type PaymentRequestStatus ΒΆ
type PaymentRequestStatus struct { Pending BTCPayInvoiceStatus Completed BTCPayInvoiceStatus Expired BTCPayInvoiceStatus }
func GetPaymentRequestStatus ΒΆ
func GetPaymentRequestStatus() *PaymentRequestStatus
type PaymentStatus ΒΆ
type PaymentStatus struct { New BTCPayPaymentStatus Processing BTCPayPaymentStatus Expired BTCPayPaymentStatus Invalid BTCPayPaymentStatus Settled BTCPayPaymentStatus }
func GetPaymentStatus ΒΆ
func GetPaymentStatus() *PaymentStatus
type Payout ΒΆ
func (*Payout) ApprovePayout ΒΆ
func (p *Payout) ApprovePayout(ctx context.Context, payoutApproveRequest *PayoutApproveRequest) (*PayoutResponse, int, error)
type PayoutApproveRequest ΒΆ
type PayoutRequest ΒΆ
type PayoutResponse ΒΆ
type PayoutResponse struct { ID PayoutID `json:"id"` Revision int64 `json:"revision"` PullPaymentID PullPaymentID `json:"pullPaymentId"` Date string `json:"date"` Destination string `json:"destination"` Amount string `json:"amount"` PaymentMethod string `json:"paymentMethod"` PaymentMethodAmount string `json:"paymentMethodAmount"` State BTCPayPayoutStatus `json:"state"` }
type PayoutStatus ΒΆ
type PayoutStatus struct { AwaitingApproval BTCPayPayoutStatus AwaitingPayment BTCPayPayoutStatus InProgress BTCPayPayoutStatus Completed BTCPayPayoutStatus Cancelled BTCPayPayoutStatus }
func GetPayoutStatus ΒΆ
func GetPayoutStatus() *PayoutStatus
type Permission ΒΆ
type Permission struct { Unrestricted BTCPayPermission UserCanviewprofile BTCPayPermission UserCanmodifyprofile BTCPayPermission UserCanmanagenotificationsforuser BTCPayPermission UserCanviewnotificationsforuser BTCPayPermission ServerCancreateuser BTCPayPermission ServerCanmodifyserversettings BTCPayPermission ServerCanuseinternallightningnode BTCPayPermission ServerCancreatelightninginvoiceinternalnode BTCPayPermission StoreCanmodifystoresettings BTCPayPermission StoreWebhooksCanmodifywebhooks BTCPayPermission StoreCanviewstoresettings BTCPayPermission StoreCancreateinvoice BTCPayPermission StoreCanviewinvoices BTCPayPermission StoreCanmodifypaymentrequests BTCPayPermission StoreCanviewpaymentrequests BTCPayPermission StoreCanuselightningnode BTCPayPermission StoreCancreatelightninginvoice BTCPayPermission CustomPermission BTCPayPermission }
func GetPermission ΒΆ
func GetPermission() *Permission
type PullPayment ΒΆ
type PullPayment struct { Store *Store Client *Client ID PullPaymentID }
func (*PullPayment) ArchivePullPayment ΒΆ
func (p *PullPayment) ArchivePullPayment(ctx context.Context) (int, error)
func (*PullPayment) CreatePayout ΒΆ
func (p *PullPayment) CreatePayout(ctx context.Context, payoutRequest *PayoutRequest) (*PayoutResponse, int, error)
func (*PullPayment) GetPayouts ΒΆ
func (p *PullPayment) GetPayouts(ctx context.Context, includeCancelled ...bool) ([]*PayoutResponse, int, error)
func (*PullPayment) GetPullPayment ΒΆ
func (p *PullPayment) GetPullPayment(ctx context.Context) (*PullPaymentResponse, int, error)
type PullPaymentID ΒΆ
type PullPaymentID string
type PullPaymentRequest ΒΆ
type PullPaymentRequest struct { Name string `json:"name,omitempty"` Amount string `json:"amount"` Currency string `json:"currency"` Period int64 `json:"period,omitempty"` StartsAt int64 `json:"startsAt,omitempty"` ExpiresAt int64 `json:"expiresAt,omitempty"` PaymentMethods []string `json:"paymentMethods"` }
type PullPaymentResponse ΒΆ
type ServerInfoResponse ΒΆ
type ServerInfoResponse struct { Version string `json:"version"` Onion string `json:"onion"` SupportedPaymentMethods []string `json:"supportedPaymentMethods"` FullySynched bool `json:"fullySynched"` SyncStatus []ServerSyncStatus `json:"syncStatus"` }
type ServerNodeInformation ΒΆ
type ServerSyncStatus ΒΆ
type ServerSyncStatus struct { CryptoCode string `json:"cryptoCode"` NodeInformation ServerNodeInformation `json:"nodeInformation,omitempty"` ChainHeight int64 `json:"chainHeight"` SyncHeight int64 `json:"syncHeight,omitempty"` }
type SpeedPolicy ΒΆ
type SpeedPolicy struct { HighSpeed BTCPaySpeedPolicy MediumSpeed BTCPaySpeedPolicy LowMediumSpeed BTCPaySpeedPolicy LowSpeed BTCPaySpeedPolicy }
func GetSpeedPolicy ΒΆ
func GetSpeedPolicy() *SpeedPolicy
type Store ΒΆ
func (*Store) ApprovePayout ΒΆ
func (s *Store) ApprovePayout(ctx context.Context, payoutID *PayoutID, payoutApproveRequest *PayoutApproveRequest) (*PayoutResponse, int, error)
func (*Store) ArchiveInvoice ΒΆ
func (*Store) ArchivePaymentRequest ΒΆ
func (*Store) ArchivePullPayment ΒΆ
func (*Store) CancelPayout ΒΆ
func (*Store) CreateInvoice ΒΆ
func (s *Store) CreateInvoice(ctx context.Context, invoiceRequest *InvoiceRequest) (*InvoiceResponse, int, error)
func (*Store) CreatePaymentRequest ΒΆ
func (s *Store) CreatePaymentRequest(ctx context.Context, paymentRequestRequest *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
func (*Store) CreatePullPayment ΒΆ
func (s *Store) CreatePullPayment(ctx context.Context, pullPaymentRequest *PullPaymentRequest) (*PullPaymentResponse, int, error)
func (*Store) GetInvoice ΒΆ
func (*Store) GetInvoicePaymentMethod ΒΆ
func (*Store) GetInvoices ΒΆ
func (*Store) GetPaymentRequest ΒΆ
func (s *Store) GetPaymentRequest(ctx context.Context, paymentRequestID *PaymentRequestID) (*PaymentRequestResponse, int, error)
func (*Store) GetPaymentRequests ΒΆ
func (*Store) GetPullPayments ΒΆ
func (*Store) MarkInvoiceStatus ΒΆ
func (s *Store) MarkInvoiceStatus(ctx context.Context, invoiceID *InvoiceID, markInvoiceStatusRequest *MarkInvoiceStatusRequest) (*InvoiceResponse, int, error)
func (*Store) UnarchiveInvoice ΒΆ
func (*Store) UpdateInvoice ΒΆ
func (s *Store) UpdateInvoice(ctx context.Context, invoiceID *InvoiceID, invoiceUpdate *InvoiceUpdate) (*InvoiceResponse, int, error)
func (*Store) UpdatePaymentRequest ΒΆ
func (s *Store) UpdatePaymentRequest(ctx context.Context, paymentRequestID *PaymentRequestID, paymentRequestUpdate *PaymentRequestRequest) (*PaymentRequestResponse, int, error)
func (*Store) UpdateStore ΒΆ
func (s *Store) UpdateStore(ctx context.Context, storeUpdate *StoreUpdate) (*StoreResponse, int, error)
type StoreRequest ΒΆ
type StoreRequest struct { Name string `json:"name"` Website string `json:"website,omitempty"` InvoiceExpiration int64 `json:"invoiceExpiration,omitempty"` MonitoringExpiration int64 `json:"monitoringExpiration,omitempty"` SpeedPolicy BTCPaySpeedPolicy `json:"speedPolicy,omitempty"` LightningDescriptionTemplate string `json:"lightningDescriptionTemplate,omitempty"` PaymentTolerance float64 `json:"paymentTolerance,omitempty"` AnyoneCanCreateInvoice bool `json:"anyoneCanCreateInvoice,omitempty"` RequiresRefundEmail bool `json:"requiresRefundEmail,omitempty"` LightningAmountInSatoshi bool `json:"lightningAmountInSatoshi,omitempty"` LightningPrivateRouteHints bool `json:"lightningPrivateRouteHints,omitempty"` OnChainWithLnInvoiceFallback bool `json:"onChainWithLnInvoiceFallback,omitempty"` RedirectAutomatically bool `json:"redirectAutomatically,omitempty"` ShowRecommendedFee bool `json:"showRecommendedFee,omitempty"` RecommendedFeeBlockTarget int32 `json:"recommendedFeeBlockTarget,omitempty"` DefaultLang string `json:"defaultLang,omitempty"` CustomLogo string `json:"customLogo,omitempty"` CustomCSS string `json:"customCSS,omitempty"` HtmlTitle string `json:"htmlTitle,omitempty"` NetworkFeeMode BTCPayNetworkFeeMode `json:"networkFeeMode,omitempty"` PayJoinEnabled bool `json:"payJoinEnabled,omitempty"` DefaultPaymentMethod string `json:"defaultPaymentMethod,omitempty"` }
type StoreResponse ΒΆ
type StoreResponse struct { Name string `json:"name"` Website string `json:"website"` InvoiceExpiration int64 `json:"invoiceExpiration"` MonitoringExpiration int64 `json:"monitoringExpiration"` SpeedPolicy BTCPaySpeedPolicy `json:"speedPolicy"` LightningDescriptionTemplate string `json:"lightningDescriptionTemplate,omitempty"` PaymentTolerance float64 `json:"paymentTolerance"` AnyoneCanCreateInvoice bool `json:"anyoneCanCreateInvoice"` RequiresRefundEmail bool `json:"requiresRefundEmail"` LightningAmountInSatoshi bool `json:"lightningAmountInSatoshi"` LightningPrivateRouteHints bool `json:"lightningPrivateRouteHints"` OnChainWithLnInvoiceFallback bool `json:"onChainWithLnInvoiceFallback"` RedirectAutomatically bool `json:"redirectAutomatically"` ShowRecommendedFee bool `json:"showRecommendedFee"` RecommendedFeeBlockTarget int32 `json:"recommendedFeeBlockTarget"` DefaultLang string `json:"defaultLang"` CustomLogo string `json:"customLogo,omitempty"` CustomCSS string `json:"customCSS,omitempty"` HtmlTitle string `json:"htmlTitle,omitempty"` NetworkFeeMode BTCPayNetworkFeeMode `json:"networkFeeMode"` PayJoinEnabled bool `json:"payJoinEnabled"` DefaultPaymentMethod string `json:"defaultPaymentMethod"` ID StoreID `json:"id"` }
type StoreUpdate ΒΆ
type StoreUpdate struct { Name string `json:"name,omitempty"` Website string `json:"website,omitempty"` InvoiceExpiration int64 `json:"invoiceExpiration,omitempty"` MonitoringExpiration int64 `json:"monitoringExpiration,omitempty"` SpeedPolicy BTCPaySpeedPolicy `json:"speedPolicy,omitempty"` LightningDescriptionTemplate string `json:"lightningDescriptionTemplate,omitempty"` PaymentTolerance float64 `json:"paymentTolerance,omitempty"` AnyoneCanCreateInvoice bool `json:"anyoneCanCreateInvoice,omitempty"` RequiresRefundEmail bool `json:"requiresRefundEmail,omitempty"` LightningAmountInSatoshi bool `json:"lightningAmountInSatoshi,omitempty"` LightningPrivateRouteHints bool `json:"lightningPrivateRouteHints,omitempty"` OnChainWithLnInvoiceFallback bool `json:"onChainWithLnInvoiceFallback,omitempty"` RedirectAutomatically bool `json:"redirectAutomatically,omitempty"` ShowRecommendedFee bool `json:"showRecommendedFee,omitempty"` RecommendedFeeBlockTarget int32 `json:"recommendedFeeBlockTarget,omitempty"` DefaultLang string `json:"defaultLang,omitempty"` CustomLogo string `json:"customLogo,omitempty"` CustomCSS string `json:"customCSS,omitempty"` HtmlTitle string `json:"htmlTitle,omitempty"` NetworkFeeMode BTCPayNetworkFeeMode `json:"networkFeeMode,omitempty"` PayJoinEnabled bool `json:"payJoinEnabled,omitempty"` DefaultPaymentMethod string `json:"defaultPaymentMethod,omitempty"` ID StoreID `json:"id,omitempty"` }
type UpdateNotification ΒΆ
type UpdateNotification struct {
Seen bool `json:"seen"`
}