Documentation
¶
Index ¶
- Constants
- type AdditionalPaymentInfo
- type AdditionalWithdrawalInfo
- func (m *AdditionalWithdrawalInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *AdditionalWithdrawalInfo) MarshalBinary() ([]byte, error)
- func (m *AdditionalWithdrawalInfo) UnmarshalBinary(b []byte) error
- func (m *AdditionalWithdrawalInfo) Validate(formats strfmt.Registry) error
- type CreatePaymentLinkRequest
- func (m *CreatePaymentLinkRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *CreatePaymentLinkRequest) MarshalBinary() ([]byte, error)
- func (m *CreatePaymentLinkRequest) UnmarshalBinary(b []byte) error
- func (m *CreatePaymentLinkRequest) Validate(formats strfmt.Registry) error
- type CreatePaymentRequest
- type Customer
- type CustomerDetails
- type CustomerPayment
- type CustomersPagination
- type ErrorResponse
- type ErrorResponseItem
- type MerchantBalance
- type MerchantBalanceList
- type Payment
- type PaymentAdditionalInfo
- type PaymentLink
- type PaymentLinksPagination
- func (m *PaymentLinksPagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *PaymentLinksPagination) MarshalBinary() ([]byte, error)
- func (m *PaymentLinksPagination) UnmarshalBinary(b []byte) error
- func (m *PaymentLinksPagination) Validate(formats strfmt.Registry) error
- type PaymentsPagination
Constants ¶
const ( // CreatePaymentLinkRequestCurrencyUSD captures enum value "USD" CreatePaymentLinkRequestCurrencyUSD string = "USD" // CreatePaymentLinkRequestCurrencyEUR captures enum value "EUR" CreatePaymentLinkRequestCurrencyEUR string = "EUR" )
const ( // CreatePaymentLinkRequestSuccessActionRedirect captures enum value "redirect" CreatePaymentLinkRequestSuccessActionRedirect string = "redirect" // CreatePaymentLinkRequestSuccessActionShowMessage captures enum value "showMessage" CreatePaymentLinkRequestSuccessActionShowMessage string = "showMessage" )
const ( // CreatePaymentRequestCurrencyUSD captures enum value "USD" CreatePaymentRequestCurrencyUSD string = "USD" // CreatePaymentRequestCurrencyEUR captures enum value "EUR" CreatePaymentRequestCurrencyEUR string = "EUR" )
const ( // CustomerPaymentCurrencyUSD captures enum value "USD" CustomerPaymentCurrencyUSD string = "USD" // CustomerPaymentCurrencyEUR captures enum value "EUR" CustomerPaymentCurrencyEUR string = "EUR" )
const ( // CustomerPaymentStatusPending captures enum value "pending" CustomerPaymentStatusPending string = "pending" // CustomerPaymentStatusInProgress captures enum value "inProgress" CustomerPaymentStatusInProgress string = "inProgress" // CustomerPaymentStatusSuccess captures enum value "success" CustomerPaymentStatusSuccess string = "success" // CustomerPaymentStatusFailed captures enum value "failed" CustomerPaymentStatusFailed string = "failed" )
const ( // PaymentStatusPending captures enum value "pending" PaymentStatusPending string = "pending" // PaymentStatusInProgress captures enum value "inProgress" PaymentStatusInProgress string = "inProgress" // PaymentStatusSuccess captures enum value "success" PaymentStatusSuccess string = "success" // PaymentStatusFailed captures enum value "failed" PaymentStatusFailed string = "failed" )
const ( // PaymentTypePayment captures enum value "payment" PaymentTypePayment string = "payment" // PaymentTypeWithdrawal captures enum value "withdrawal" PaymentTypeWithdrawal string = "withdrawal" )
const ( // PaymentLinkCurrencyUSD captures enum value "USD" PaymentLinkCurrencyUSD string = "USD" // PaymentLinkCurrencyEUR captures enum value "EUR" PaymentLinkCurrencyEUR string = "EUR" )
const ( // PaymentLinkSuccessActionRedirect captures enum value "redirect" PaymentLinkSuccessActionRedirect string = "redirect" // PaymentLinkSuccessActionShowMessage captures enum value "showMessage" PaymentLinkSuccessActionShowMessage string = "showMessage" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalPaymentInfo ¶
type AdditionalPaymentInfo struct {
// Customer's Email
// Example: user@gmail.com
// Required: true
CustomerEmail *string `json:"customerEmail"`
// Customer's selected crypto currency
// Example: USDT (Ethereum)
// Required: true
SelectedCurrency *string `json:"selectedCurrency"`
// Service fee in customer's selected crypto currency
// Example: 1.20
// Required: true
ServiceFee *string `json:"serviceFee"`
}
AdditionalPaymentInfo Additional payment info
swagger:model additionalPaymentInfo
func (*AdditionalPaymentInfo) ContextValidate ¶
ContextValidate validates this additional payment info based on context it is used
func (*AdditionalPaymentInfo) MarshalBinary ¶
func (m *AdditionalPaymentInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdditionalPaymentInfo) UnmarshalBinary ¶
func (m *AdditionalPaymentInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AdditionalWithdrawalInfo ¶
type AdditionalWithdrawalInfo struct {
// Address UUID
// Example: dac3a5f5-abc1-4bb2-97e7-db51360e218c
// Required: true
AddressID string `json:"addressId"`
// Balance UUID
// Example: 918c5aa6-bdad-4cc8-8aa0-de059c618a05
// Required: true
BalanceID string `json:"balanceId"`
// Link to blockchain explorer
// Example: https://etherscan.io/tx/0xdf147859a6e66961326ac91f4bd5e9980432040031e5eb7108603d51b81ae005
// Required: true
ExplorerLink *string `json:"explorerLink"`
// Withdrawal Fee
// Example: 1.20
// Required: true
ServiceFee string `json:"serviceFee"`
// Transaction Hash
// Example: 0xdf147859a6e66961326ac91f4bd5e9980432040031e5eb7108603d51b81ae005
// Required: true
TransactionHash *string `json:"transactionHash"`
}
AdditionalWithdrawalInfo Additional withdrawal info
swagger:model additionalWithdrawalInfo
func (*AdditionalWithdrawalInfo) ContextValidate ¶
func (m *AdditionalWithdrawalInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this additional withdrawal info based on context it is used
func (*AdditionalWithdrawalInfo) MarshalBinary ¶
func (m *AdditionalWithdrawalInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AdditionalWithdrawalInfo) UnmarshalBinary ¶
func (m *AdditionalWithdrawalInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CreatePaymentLinkRequest ¶
type CreatePaymentLinkRequest struct {
// Fiat ticker for payment template.
// Required: true
// Enum: [USD EUR]
Currency string `json:"currency"`
// Optional payment description visible for a customer in payment screen
// Example: White T-shirt size M
Description *string `json:"description"`
// Name
// Example: My Link
// Required: true
// Max Length: 64
// Min Length: 4
Name string `json:"name"`
// Price in fiat currency
// Example: 29.9
// Required: true
// Minimum: 0.01
Price float64 `json:"price"`
// Redirect URL after successful customer's payment
// Example: https://my-site.com/success?order=abc123
RedirectURL *string `json:"redirectUrl"`
// Action type after OxygenPay receives incoming payment from a customer.
// - `redirectUrl` displays "Back to site" button with provided .redirectUrl.
// - `showMessage` displays "Show message" with content provided in .successMessage.
//
// Required: true
// Enum: [redirect showMessage]
SuccessAction string `json:"successAction"`
// message after successful customer's payment
// Example: Thank you!
// Max Length: 250
// Min Length: 4
SuccessMessage *string `json:"successMessage"`
}
CreatePaymentLinkRequest Payment Link object
swagger:model createPaymentLinkRequest
func (*CreatePaymentLinkRequest) ContextValidate ¶
func (m *CreatePaymentLinkRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this create payment link request based on context it is used
func (*CreatePaymentLinkRequest) MarshalBinary ¶
func (m *CreatePaymentLinkRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CreatePaymentLinkRequest) UnmarshalBinary ¶
func (m *CreatePaymentLinkRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CreatePaymentRequest ¶
type CreatePaymentRequest struct {
// Fiat currency
// Required: true
// Enum: [USD EUR]
Currency string `json:"currency"`
// Optional payment description
// Example: White T-shirt size M
// Max Length: 128
Description *string `json:"description,omitempty"`
// To provide request idempotency order UUID should be generated on your side.
// Should be unique for each payment
//
// Example: 123e4567-e89b-12d3-a456-426655440000
// Required: true
// Format: uuid
ID strfmt.UUID `json:"id"`
// Indicates that this is a test payment.
// Test payments are processed in testnets (e.g. Ethereum Goerli)
//
IsTest bool `json:"isTest,omitempty"`
// Optional order ID from your internal system
// Example: customer#123#order#456
OrderID *string `json:"orderId"`
// Price in fiat currency
// Example: 29.9
// Required: true
// Minimum: 0.01
Price float64 `json:"price"`
// A "back to store" button URL. Visible to a customer after the system receives unconfirmed transaction.
// If not provided, defaults to merchant's website url.
//
// Example: https://my-store.com/success
RedirectURL *string `json:"redirectUrl"`
}
CreatePaymentRequest create payment request
swagger:model createPaymentRequest
func (*CreatePaymentRequest) ContextValidate ¶
ContextValidate validates this create payment request based on context it is used
func (*CreatePaymentRequest) MarshalBinary ¶
func (m *CreatePaymentRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CreatePaymentRequest) UnmarshalBinary ¶
func (m *CreatePaymentRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Customer ¶
type Customer struct {
// CreatedAt
// Format: datetime
CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
// details
Details *CustomerDetails `json:"details,omitempty"`
// Email
// Example: customer@example.com
Email string `json:"email,omitempty"`
// Customer UUID
// Example: A9B04890-7FB9-42C6-A63B-9163968E4580
ID string `json:"id,omitempty"`
}
Customer customer
swagger:model customer
func (*Customer) ContextValidate ¶
ContextValidate validate this customer based on the context it is used
func (*Customer) MarshalBinary ¶
MarshalBinary interface implementation
func (*Customer) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type CustomerDetails ¶
type CustomerDetails struct {
// payments
Payments []*CustomerPayment `json:"payments"`
// Number of successful payments
SuccessfulPayments int64 `json:"successfulPayments"`
}
CustomerDetails Customer Details. Available only in `getCustomerDetails` endpoint
swagger:model CustomerDetails
func (*CustomerDetails) ContextValidate ¶
ContextValidate validate this customer details based on the context it is used
func (*CustomerDetails) MarshalBinary ¶
func (m *CustomerDetails) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CustomerDetails) UnmarshalBinary ¶
func (m *CustomerDetails) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CustomerPayment ¶
type CustomerPayment struct {
// Created timestamp
// Example: 2022-11-23 19:49:21.386201 +0000 UTC
// Format: datetime
CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`
// Fiat currency
// Enum: [USD EUR]
Currency string `json:"currency,omitempty"`
// Order UUID
// Example: 123e4567-e89b-12d3-a456-426655440000
ID string `json:"id,omitempty"`
// Payment price
// Example: 29.9
Price string `json:"price,omitempty"`
// Payment status
// Enum: [pending inProgress success failed]
Status string `json:"status,omitempty"`
}
CustomerPayment Payment object
swagger:model customerPayment
func (*CustomerPayment) ContextValidate ¶
ContextValidate validates this customer payment based on context it is used
func (*CustomerPayment) MarshalBinary ¶
func (m *CustomerPayment) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CustomerPayment) UnmarshalBinary ¶
func (m *CustomerPayment) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CustomersPagination ¶
type CustomersPagination struct {
// cursor
// Example: 8c857501-e67d-4a0b-98d9-46e461b42c09
// Required: true
Cursor string `json:"cursor"`
// limit
// Example: 50
// Required: true
Limit int64 `json:"limit"`
// results
// Required: true
Results []*Customer `json:"results"`
}
CustomersPagination customers pagination
swagger:model customersPagination
func (*CustomersPagination) ContextValidate ¶
ContextValidate validate this customers pagination based on the context it is used
func (*CustomersPagination) MarshalBinary ¶
func (m *CustomersPagination) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CustomersPagination) UnmarshalBinary ¶
func (m *CustomersPagination) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ErrorResponse ¶
type ErrorResponse struct {
// Errors list
Errors []*ErrorResponseItem `json:"errors,omitempty"`
// Error Message
// Example: Error message
Message string `json:"message,omitempty"`
// Error status
// Example: something_wrong
Status string `json:"status,omitempty"`
}
ErrorResponse error response
swagger:model errorResponse
func (*ErrorResponse) ContextValidate ¶
ContextValidate validate this error response based on the context it is used
func (*ErrorResponse) MarshalBinary ¶
func (m *ErrorResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ErrorResponse) UnmarshalBinary ¶
func (m *ErrorResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ErrorResponseItem ¶
type ErrorResponseItem struct {
// Error field
// Example: field
Field string `json:"field,omitempty"`
// Error Message
// Example: Error message
Message string `json:"message,omitempty"`
}
ErrorResponseItem error response item
swagger:model errorResponseItem
func (*ErrorResponseItem) ContextValidate ¶
ContextValidate validates this error response item based on context it is used
func (*ErrorResponseItem) MarshalBinary ¶
func (m *ErrorResponseItem) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ErrorResponseItem) UnmarshalBinary ¶
func (m *ErrorResponseItem) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MerchantBalance ¶
type MerchantBalance struct {
// Assets amount in balance currency
// Example: 50.40
Amount string `json:"amount"`
// Blockchain network
// Example: ETH
Blockchain string `json:"blockchain"`
// Blockchain name
// Example: Ethereum
BlockchainName string `json:"blockchainName"`
// Currency name
// Example: USDT
Currency string `json:"currency"`
// Balance identifier
// Example: 123e4567-e89b-12d3-a456-426655440000
ID string `json:"id"`
// Indicates whether balance is test or not
IsTest bool `json:"isTest"`
// Minimal withdrawal amount in USD
// Example: 50
MinimalWithdrawalAmountUSD string `json:"minimalWithdrawalAmountUSD"`
// Balance name
// Example: USDT (Ethereum)
Name string `json:"name"`
// Currency ticker
// Example: ETH_USDT
Ticker string `json:"ticker"`
// Assets amount in USD
// Example: 50.40
UsdAmount string `json:"usdAmount"`
}
MerchantBalance merchant balance
swagger:model merchantBalance
func (*MerchantBalance) ContextValidate ¶
ContextValidate validates this merchant balance based on context it is used
func (*MerchantBalance) MarshalBinary ¶
func (m *MerchantBalance) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MerchantBalance) UnmarshalBinary ¶
func (m *MerchantBalance) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type MerchantBalanceList ¶
type MerchantBalanceList struct {
// results
Results []*MerchantBalance `json:"results"`
}
MerchantBalanceList merchant balance list
swagger:model merchantBalanceList
func (*MerchantBalanceList) ContextValidate ¶
ContextValidate validate this merchant balance list based on the context it is used
func (*MerchantBalanceList) MarshalBinary ¶
func (m *MerchantBalanceList) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*MerchantBalanceList) UnmarshalBinary ¶
func (m *MerchantBalanceList) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Payment ¶
type Payment struct {
// additional info
AdditionalInfo *PaymentAdditionalInfo `json:"additionalInfo,omitempty"`
// Created timestamp
// Example: 2022-11-23 19:49:21.386201 +0000 UTC
// Required: true
// Format: datetime
CreatedAt strfmt.DateTime `json:"createdAt"`
// Fiat ticker for payments and crypto for withdrawals
//
// Example: USD
// Required: true
Currency string `json:"currency"`
// Optional payment description that customer will see in payment screen
// Example: White T-shirt size M
Description *string `json:"description"`
// Order UUID generated on your side
// Example: 123e4567-e89b-12d3-a456-426655440000
// Required: true
ID string `json:"id"`
// Indicates that this is a test payment.
// Test payments are processed in testnets (e.g. Ethereum Goerli)
//
// Required: true
IsTest bool `json:"isTest"`
// Optional order ID from your system.
// Example: order#123
OrderID *string `json:"orderId"`
// URL for client payment screen
// Example: https://pay.o2pay.co/payment/00000000-0000-0000-0000-000000000000
PaymentURL string `json:"paymentUrl"`
// Payment price or withdrawal amount
// Example: 29.9
// Required: true
Price string `json:"price"`
// Redirect URL after success client's payment
// Example: https://my-site.com/success?order=abc123
RedirectURL string `json:"redirectUrl"`
// Payment status
// Required: true
// Enum: [pending inProgress success failed]
Status string `json:"status"`
// Payment type
// Required: true
// Enum: [payment withdrawal]
Type string `json:"type"`
}
Payment Payment object
swagger:model payment
func (*Payment) ContextValidate ¶
ContextValidate validate this payment based on the context it is used
func (*Payment) MarshalBinary ¶
MarshalBinary interface implementation
func (*Payment) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type PaymentAdditionalInfo ¶
type PaymentAdditionalInfo struct {
// payment
Payment *AdditionalPaymentInfo `json:"payment,omitempty"`
// withdrawal
Withdrawal *AdditionalWithdrawalInfo `json:"withdrawal,omitempty"`
}
PaymentAdditionalInfo Represents additional context for payment or withdrawal
swagger:model PaymentAdditionalInfo
func (*PaymentAdditionalInfo) ContextValidate ¶
ContextValidate validate this payment additional info based on the context it is used
func (*PaymentAdditionalInfo) MarshalBinary ¶
func (m *PaymentAdditionalInfo) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PaymentAdditionalInfo) UnmarshalBinary ¶
func (m *PaymentAdditionalInfo) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PaymentLink ¶
type PaymentLink struct {
// Created At timestamp
// Example: 2022-11-23 19:49:21.386201 +0000 UTC
// Required: true
// Format: datetime
CreatedAt strfmt.DateTime `json:"createdAt"`
// Fiat ticker for payment template.
// Required: true
// Enum: [USD EUR]
Currency string `json:"currency"`
// Optional payment description visible for a customer in payment screen
// Example: White T-shirt size M
Description *string `json:"description"`
// Link's UUID
// Example: 123e4567-e89b-12d3-a456-426655440000
// Required: true
ID string `json:"id"`
// Name
// Example: My Link
// Required: true
Name string `json:"name"`
// Payment price
// Example: 29.9
// Required: true
Price string `json:"price"`
// Redirect URL after successful customer's payment
// Example: https://my-site.com/success?order=abc123
RedirectURL *string `json:"redirectUrl"`
// Action type after OxygenPay receives incoming payment from a customer.
// - `redirectUrl` displays "Back to site" button with provided .redirectUrl.
// - `showMessage` displays "Show message" with content provided in .successMessage.
//
// Required: true
// Enum: [redirect showMessage]
SuccessAction string `json:"successAction"`
// message after successful customer's payment
SuccessMessage *string `json:"successMessage"`
// Link's URL
// Example: https://pay.o2pay.co/link/ufaiCu6J
// Required: true
URL string `json:"url"`
}
PaymentLink Payment Link object
swagger:model paymentLink
func (*PaymentLink) ContextValidate ¶
ContextValidate validates this payment link based on context it is used
func (*PaymentLink) MarshalBinary ¶
func (m *PaymentLink) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PaymentLink) UnmarshalBinary ¶
func (m *PaymentLink) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PaymentLinksPagination ¶
type PaymentLinksPagination struct {
// results
// Required: true
Results []*PaymentLink `json:"results"`
}
PaymentLinksPagination payment links pagination
swagger:model paymentLinksPagination
func (*PaymentLinksPagination) ContextValidate ¶
func (m *PaymentLinksPagination) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validate this payment links pagination based on the context it is used
func (*PaymentLinksPagination) MarshalBinary ¶
func (m *PaymentLinksPagination) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PaymentLinksPagination) UnmarshalBinary ¶
func (m *PaymentLinksPagination) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PaymentsPagination ¶
type PaymentsPagination struct {
// cursor
// Example: 8c857501-e67d-4a0b-98d9-46e461b42c09
// Required: true
Cursor string `json:"cursor"`
// limit
// Example: 50
// Required: true
Limit int64 `json:"limit"`
// results
// Required: true
Results []*Payment `json:"results"`
}
PaymentsPagination payments pagination
swagger:model paymentsPagination
func (*PaymentsPagination) ContextValidate ¶
ContextValidate validate this payments pagination based on the context it is used
func (*PaymentsPagination) MarshalBinary ¶
func (m *PaymentsPagination) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PaymentsPagination) UnmarshalBinary ¶
func (m *PaymentsPagination) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
Source Files
¶
- additional_payment_info.go
- additional_withdrawal_info.go
- create_payment_link_request.go
- create_payment_request.go
- customer.go
- customer_payment.go
- customers_pagination.go
- error_response.go
- error_response_item.go
- merchant_balance.go
- merchant_balance_list.go
- payment.go
- payment_link.go
- payment_links_pagination.go
- payments_pagination.go