Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResource ¶
func CreateResource(params CreateResourceParams)
func VerifyPayment ¶
func VerifyPayment(params PaymentParams) error
Types ¶
type BuildPaymentParams ¶
type CreateResourceParams ¶
type CreateResourceParams struct {
}
type PaymentParams ¶
type PaymentParams struct {
Facilitator string
Payload X402Payload `json:"paymentPayload"`
Requirement X402Requirements `json:"paymentRequirements"`
}
type PaymentResult ¶
type PaymentResult struct {
Success bool `json:"success"`
InvalidReason *string `json:"invalidReason"`
Error *string `json:"error"`
Payer string `json:"payer"`
Transaction string `json:"transaction"`
Network string `json:"network"`
}
func SettlePayment ¶
func SettlePayment(params PaymentParams) (*PaymentResult, error)
type PaymentTransation ¶
type X402Payload ¶
type X402Payload struct {
X402Version int `json:"x402Version"`
Error string `json:"error"`
Resource X402Resource `json:"resource"`
Accepts []X402Requirements `json:"accepts"`
}
func BuildPayment ¶
func BuildPayment(params BuildPaymentParams) (*X402Payload, error)
type X402Requirements ¶
type X402Resource ¶
Click to show internal directories.
Click to hide internal directories.