Documentation ¶
Overview ¶
Package processout offers bindings for the ProcessOut API — https://www.processout.com
The full documentation of the API, along with Go examples, can be found on our website: https://docs.processout.com
It is recommended to use the versionned version of the package (with the import path that starts with gopkg.in) instead of the GitHub repository.
To get started, you just need your API credentials, that you can find in your project's settings. Here is a simple example that creates an invoice and prints its URL:
p := processout.New("<project-id>", "<project-secret>") iv, err := p.Invoices.Create(&processout.Invoice{ Name: "Test item", Amount: "10.00", Currency: "USD", }) if err != nil { panic(err) } fmt.Println(iv.URL)
Index ¶
- Constants
- Variables
- type Activities
- type Activity
- type AuthorizationRequest
- type AuthorizationRequests
- func (s AuthorizationRequests) Create(authorizationRequest *AuthorizationRequest, customerID string, ...) (*AuthorizationRequest, *Error)
- func (s AuthorizationRequests) Customer(authorizationRequest *AuthorizationRequest, options ...Options) (*Customer, *Error)
- func (s AuthorizationRequests) Find(authorizationRequestID string, options ...Options) (*AuthorizationRequest, *Error)
- type Customer
- type CustomerAction
- type CustomerActions
- type Customers
- func (s Customers) All(options ...Options) ([]*Customer, *Error)
- func (s Customers) Create(customer *Customer, options ...Options) (*Customer, *Error)
- func (s Customers) Delete(customer *Customer, options ...Options) *Error
- func (s Customers) Find(customerID string, options ...Options) (*Customer, *Error)
- func (s Customers) Save(customer *Customer, options ...Options) (*Customer, *Error)
- func (s Customers) Subscriptions(customer *Customer, options ...Options) ([]*Subscription, *Error)
- func (s Customers) Tokens(customer *Customer, options ...Options) ([]*Token, *Error)
- func (s Customers) Transactions(customer *Customer, options ...Options) ([]*Transaction, *Error)
- type Error
- type Event
- type Events
- type Gatewaies
- type Gateway
- type GatewayConfiguration
- type GatewayConfigurations
- type GatewayRequest
- type Invoice
- type Invoices
- func (s Invoices) All(options ...Options) ([]*Invoice, *Error)
- func (s Invoices) AssignCustomer(invoice *Invoice, customerID string, options ...Options) (*Customer, *Error)
- func (s Invoices) Authorize(invoice *Invoice, source string, options ...Options) (*Transaction, *CustomerAction, *Error)
- func (s Invoices) Capture(invoice *Invoice, source string, options ...Options) (*Transaction, *CustomerAction, *Error)
- func (s Invoices) Create(invoice *Invoice, options ...Options) (*Invoice, *Error)
- func (s Invoices) Customer(invoice *Invoice, options ...Options) (*Customer, *Error)
- func (s Invoices) Find(invoiceID string, options ...Options) (*Invoice, *Error)
- func (s Invoices) Transaction(invoice *Invoice, options ...Options) (*Transaction, *Error)
- func (s Invoices) Void(invoice *Invoice, options ...Options) *Error
- type Options
- type ProcessOut
- type Product
- type Products
- func (s Products) All(options ...Options) ([]*Product, *Error)
- func (s Products) Create(product *Product, options ...Options) (*Product, *Error)
- func (s Products) Delete(product *Product, options ...Options) *Error
- func (s Products) Find(productID string, options ...Options) (*Product, *Error)
- func (s Products) Invoice(product *Product, options ...Options) (*Invoice, *Error)
- func (s Products) Save(product *Product, options ...Options) (*Product, *Error)
- type Project
- type Projects
- type Refund
- type Refunds
- type Subscription
- type Subscriptions
- func (s Subscriptions) Activate(subscription *Subscription, source string, options ...Options) (*Subscription, *CustomerAction, *Error)
- func (s Subscriptions) All(options ...Options) ([]*Subscription, *Error)
- func (s Subscriptions) Create(subscription *Subscription, customerID string, options ...Options) (*Subscription, *CustomerAction, *Error)
- func (s Subscriptions) Customer(subscription *Subscription, options ...Options) (*Customer, *Error)
- func (s Subscriptions) End(subscription *Subscription, reason string, options ...Options) *Error
- func (s Subscriptions) Find(subscriptionID string, options ...Options) (*Subscription, *Error)
- func (s Subscriptions) Invoice(subscription *Subscription, options ...Options) (*Invoice, *Error)
- func (s Subscriptions) Transactions(subscription *Subscription, options ...Options) ([]*Transaction, *Error)
- func (s Subscriptions) Update(subscription *Subscription, options ...Options) (*Subscription, *CustomerAction, *Error)
- func (s Subscriptions) UpdateSource(subscription *Subscription, source string, options ...Options) (*Subscription, *CustomerAction, *Error)
- type Token
- type Tokens
- func (s Tokens) Create(token *Token, customerID, source string, options ...Options) (*Token, *Error)
- func (s Tokens) CreateFromRequest(token *Token, customerID, target, source string, options ...Options) (*Token, *CustomerAction, *Error)
- func (s Tokens) Find(customerID, tokenID string, options ...Options) (*Token, *CustomerAction, *Error)
- type Transaction
- type Transactions
- type Webhook
- type Webhooks
Constants ¶
const (
// APIVersion is the version of the API this package uses
APIVersion = "1.3.0.0"
)
Variables ¶
var (
// Host is the URL where API requests are made
Host = "https://api.processout.com"
)
Functions ¶
This section is empty.
Types ¶
type Activities ¶
type Activities struct {
// contains filtered or unexported fields
}
Activitys manages the Activity struct
type Activity ¶
type Activity struct { // ID : ID of the activity ID string `json:"id"` // Project : Project to which the activity belongs Project *Project `json:"project"` // Title : Title of the activity Title string `json:"title"` // Content : Content of the activity Content string `json:"content"` // Level : Level of the activity Level int `json:"level"` // CreatedAt : Date at which the transaction was created CreatedAt time.Time `json:"created_at"` }
type AuthorizationRequest ¶
type AuthorizationRequest struct { // ID : ID of the authorization ID string `json:"id"` // Project : Project to which the authorization request belongs Project *Project `json:"project"` // Customer : Customer linked to the authorization request Customer *Customer `json:"customer"` // Token : Token linked to the authorization request, once authorized Token *Token `json:"token"` // URL : URL to which you may redirect your customer to proceed with the authorization URL string `json:"url"` // Authorized : Whether or not the authorization request was authorized Authorized bool `json:"authorized"` // Name : Name of the authorization Name string `json:"name"` // Currency : Currency of the authorization Currency string `json:"currency"` // ReturnURL : URL where the customer will be redirected upon authorization ReturnURL string `json:"return_url"` // CancelURL : URL where the customer will be redirected if the authorization was canceled CancelURL string `json:"cancel_url"` // Custom : Custom variable passed along in the events/webhooks Custom string `json:"custom"` // Sandbox : Define whether or not the authorization is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the authorization was created CreatedAt time.Time `json:"created_at"` }
type AuthorizationRequests ¶
type AuthorizationRequests struct {
// contains filtered or unexported fields
}
AuthorizationRequests manages the AuthorizationRequest struct
func (AuthorizationRequests) Create ¶
func (s AuthorizationRequests) Create(authorizationRequest *AuthorizationRequest, customerID string, options ...Options) (*AuthorizationRequest, *Error)
Create : Create a new authorization request for the given customer ID.
func (AuthorizationRequests) Customer ¶
func (s AuthorizationRequests) Customer(authorizationRequest *AuthorizationRequest, options ...Options) (*Customer, *Error)
Customer : Get the customer linked to the authorization request.
func (AuthorizationRequests) Find ¶
func (s AuthorizationRequests) Find(authorizationRequestID string, options ...Options) (*AuthorizationRequest, *Error)
Find : Find an authorization request by its ID.
type Customer ¶
type Customer struct { // ID : ID of the customer ID string `json:"id"` // Project : Project to which the customer belongs Project *Project `json:"project"` // Balance : Customer balance. Can be positive or negative. The balance is automatically applied to subscription invoices and is solely used for this purpose Balance string `json:"balance"` // Email : Email of the customer Email string `json:"email"` // FirstName : First name of the customer FirstName string `json:"first_name"` // LastName : Last name of the customer LastName string `json:"last_name"` // Address1 : Address of the customer Address1 string `json:"address1"` // Address2 : Secondary address of the customer Address2 string `json:"address2"` // City : City of the customer City string `json:"city"` // State : State of the customer State string `json:"state"` // Zip : ZIP code of the customer Zip string `json:"zip"` // CountryCode : Country code of the customer CountryCode string `json:"country_code"` // Metadata : Metadata related to the customer, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // HasPin : Wether the customer has a PIN set or not HasPin bool `json:"has_pin"` // Sandbox : Define whether or not the customer is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the customer was created CreatedAt time.Time `json:"created_at"` }
type CustomerAction ¶
type CustomerActions ¶
type CustomerActions struct {
// contains filtered or unexported fields
}
CustomerActions manages the CustomerAction struct
type Customers ¶
type Customers struct {
// contains filtered or unexported fields
}
Customers manages the Customer struct
func (Customers) Subscriptions ¶
func (s Customers) Subscriptions(customer *Customer, options ...Options) ([]*Subscription, *Error)
Subscriptions : Get the subscriptions belonging to the customer.
func (Customers) Transactions ¶ added in v2.4.2
func (s Customers) Transactions(customer *Customer, options ...Options) ([]*Transaction, *Error)
Transactions : Get the transactions belonging to the customer.
type Error ¶ added in v2.3.0
type Error struct { Code string // contains filtered or unexported fields }
Error represents an error coming from the ProcessOut API. It inherits error and adds a Code field, corresponding to the error code coming from the API
type Event ¶
type Event struct { // ID : ID of the event ID string `json:"id"` // Project : Project to which the event belongs Project *Project `json:"project"` // Name : Name of the event Name string `json:"name"` // Data : Data object associated to the event Data interface{} `json:"data"` // Sandbox : Define whether or not the event is in sandbox environment Sandbox bool `json:"sandbox"` // FiredAt : Date at which the event was fired FiredAt time.Time `json:"fired_at"` }
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
Events manages the Event struct
type Gatewaies ¶ added in v2.1.0
type Gatewaies struct {
// contains filtered or unexported fields
}
Gateways manages the Gateway struct
type Gateway ¶ added in v2.1.0
type Gateway struct { // ID : ID of the gateway ID string `json:"id"` // Name : Name of the payment gateway Name string `json:"name"` // DisplayName : Name of the payment gateway that can be displayed DisplayName string `json:"display_name"` // LogoURL : Logo URL of the payment gateway LogoURL string `json:"logo_url"` // URL : URL of the payment gateway URL string `json:"url"` // Flows : Supported flow by the gateway (one-off, subscription or tokenization) Flows []string `json:"flows"` // Tags : Gateway tags. Mainly used to filter gateways depending on their attributes (e-wallets and such) Tags []string `json:"tags"` // Description : Description of the payment gateway Description string `json:"description"` }
type GatewayConfiguration ¶ added in v2.1.0
type GatewayConfiguration struct { // ID : ID of the gateway configuration ID string `json:"id"` // Project : Project to which the gateway configuration belongs Project *Project `json:"project"` // Gateway : Gateway that the configuration configures Gateway *Gateway `json:"gateway"` // Enabled : Define whether or not the gateway configuration is enabled Enabled bool `json:"enabled"` // PublicKeys : Public keys of the payment gateway configuration (key-value pair) PublicKeys map[string]string `json:"public_keys"` }
type GatewayConfigurations ¶ added in v2.1.0
type GatewayConfigurations struct {
// contains filtered or unexported fields
}
GatewayConfigurations manages the GatewayConfiguration struct
type GatewayRequest ¶ added in v2.2.3
type GatewayRequest struct { GatewayConfigurationUID string `json:"gateway_configuration_id"` URL string `json:"url"` Method string `json:"method"` Headers map[string]string `json:"headers"` Body string `json:"body"` }
GatewayRequest is the struture representing an abstracted payment gateway request
func NewGatewayRequest ¶ added in v2.2.3
func NewGatewayRequest(gatewayConfigurationID string, req *http.Request) *GatewayRequest
NewGatewayRequest creates a new GatewayRequest from the given gateway configuration ID and request
func (*GatewayRequest) String ¶ added in v2.2.3
func (gr *GatewayRequest) String() string
String encodes the GatewayRequest to a source readable by ProcessOut
type Invoice ¶
type Invoice struct { // ID : ID of the invoice ID string `json:"id"` // Project : Project to which the invoice belongs Project *Project `json:"project"` // Transaction : Transaction generated by the invoice Transaction *Transaction `json:"transaction"` // Customer : Customer linked to the invoice, if any Customer *Customer `json:"customer"` // Subscription : Subscription to which the invoice is linked to, if any Subscription *Subscription `json:"subscription"` // URL : URL to which you may redirect your customer to proceed with the payment URL string `json:"url"` // Name : Name of the invoice Name string `json:"name"` // Amount : Amount to be paid Amount string `json:"amount"` // Currency : Currency of the invoice Currency string `json:"currency"` // Metadata : Metadata related to the invoice, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // RequestEmail : Choose whether or not to request the email during the checkout process RequestEmail bool `json:"request_email"` // RequestShipping : Choose whether or not to request the shipping address during the checkout process RequestShipping bool `json:"request_shipping"` // ReturnURL : URL where the customer will be redirected upon payment ReturnURL string `json:"return_url"` // CancelURL : URL where the customer will be redirected if the paymen was canceled CancelURL string `json:"cancel_url"` // Sandbox : Define whether or not the invoice is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the invoice was created CreatedAt time.Time `json:"created_at"` }
type Invoices ¶
type Invoices struct {
// contains filtered or unexported fields
}
Invoices manages the Invoice struct
func (Invoices) AssignCustomer ¶
func (s Invoices) AssignCustomer(invoice *Invoice, customerID string, options ...Options) (*Customer, *Error)
AssignCustomer : Assign a customer to the invoice.
func (Invoices) Authorize ¶
func (s Invoices) Authorize(invoice *Invoice, source string, options ...Options) (*Transaction, *CustomerAction, *Error)
Authorize : Authorize the invoice using the given source (customer or token)
func (Invoices) Capture ¶
func (s Invoices) Capture(invoice *Invoice, source string, options ...Options) (*Transaction, *CustomerAction, *Error)
Capture : Capture the invoice using the given source (customer or token)
func (Invoices) Transaction ¶
func (s Invoices) Transaction(invoice *Invoice, options ...Options) (*Transaction, *Error)
Transaction : Get the transaction of the invoice.
type Options ¶
type Options struct { IdempotencyKey string Expand []string Filter string Limit uint64 Page uint64 DisableLogging bool }
Options represents the options available when doing a request to the ProcessOut API
type ProcessOut ¶
type ProcessOut struct { // APIVersion is the version of the API to use APIVersion string Activities *Activities AuthorizationRequests *AuthorizationRequests Customers *Customers Tokens *Tokens Events *Events Gatewaies *Gatewaies GatewayConfigurations *GatewayConfigurations Invoices *Invoices CustomerActions *CustomerActions Products *Products Projects *Projects Refunds *Refunds Subscriptions *Subscriptions Transactions *Transactions Webhooks *Webhooks // contains filtered or unexported fields }
ProcessOut wraps all the components of the package in a single structure
func New ¶
func New(projectID, projectSecret string) *ProcessOut
New creates a new struct *ProcessOut with the given API credentials. It initializes all the resources available so they can be used immediately.
type Product ¶ added in v2.5.0
type Product struct { // ID : ID of the product ID string `json:"id"` // URL : URL to which you may redirect your customer to proceed with the payment URL string `json:"url"` // Name : Name of the product Name string `json:"name"` // Amount : Amount of the product Amount string `json:"amount"` // Currency : Currency of the product Currency string `json:"currency"` // Metadata : Metadata related to the product, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // RequestEmail : Choose whether or not to request the email during the checkout process RequestEmail bool `json:"request_email"` // RequestShipping : Choose whether or not to request the shipping address during the checkout process RequestShipping bool `json:"request_shipping"` // ReturnURL : URL where the customer will be redirected upon payment ReturnURL string `json:"return_url"` // CancelURL : URL where the customer will be redirected if the paymen was canceled CancelURL string `json:"cancel_url"` // Sandbox : Define whether or not the product is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the product was created CreatedAt time.Time `json:"created_at"` }
type Products ¶ added in v2.5.0
type Products struct {
// contains filtered or unexported fields
}
Products manages the Product struct
type Project ¶
type Project struct { // ID : ID of the project ID string `json:"id"` // Name : Name of the project Name string `json:"name"` // LogoURL : Name of the project LogoURL string `json:"logo_url"` // Email : Email of the project Email string `json:"email"` // CreatedAt : Date at which the project was created CreatedAt time.Time `json:"created_at"` }
type Projects ¶
type Projects struct {
// contains filtered or unexported fields
}
Projects manages the Project struct
func (Projects) GatewayConfigurations ¶ added in v2.1.0
func (s Projects) GatewayConfigurations(project *Project, options ...Options) ([]*GatewayConfiguration, *Error)
GatewayConfigurations : Get all the gateway configurations of the project
type Refund ¶
type Refund struct { // ID : ID of the refund ID string `json:"id"` // Transaction : Transaction to which the refund is applied Transaction *Transaction `json:"transaction"` // Reason : Reason for the refund. Either customer_request, duplicate or fraud Reason string `json:"reason"` // Information : Custom details regarding the refund Information string `json:"information"` // Amount : Amount to be refunded. Must not be greater than the amount still available on the transaction Amount string `json:"amount"` // Metadata : Metadata related to the refund, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // Sandbox : Define whether or not the refund is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the refund was done CreatedAt time.Time `json:"created_at"` }
type Refunds ¶
type Refunds struct {
// contains filtered or unexported fields
}
Refunds manages the Refund struct
type Subscription ¶
type Subscription struct { // ID : ID of the subscription ID string `json:"id"` // Project : Project to which the subscription belongs Project *Project `json:"project"` // Customer : Customer linked to the subscription Customer *Customer `json:"customer"` // Token : Token linked to the subscription, once started Token *Token `json:"token"` // URL : URL to which you may redirect your customer to authorize the subscription URL string `json:"url"` // Name : Name of the subscription Name string `json:"name"` // Amount : Amount of the subscription Amount string `json:"amount"` // Currency : Currency of the subscription Currency string `json:"currency"` // Metadata : Metadata related to the subscription, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // ReturnURL : URL where the customer will be redirected when he activates the subscription ReturnURL string `json:"return_url"` // CancelURL : URL where the customer will be redirected when he canceles the subscription CancelURL string `json:"cancel_url"` // Interval : The subscription interval, formatted in the format "1d2w3m4y" (day, week, month, year) Interval string `json:"interval"` // TrialPeriod : The trial period. The customer will not be charged during this time span. Formatted in the format "1d2w3m4y" (day, week, month, year) TrialPeriod string `json:"trial_period"` // Activated : Weither or not the subscription is active Activated bool `json:"activated"` // Ended : Weither or not the subscription has ended (programmatically or canceled) Ended bool `json:"ended"` // EndedReason : Reason as to why the subscription ended EndedReason string `json:"ended_reason"` // Sandbox : Define whether or not the authorization is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the invoice was created CreatedAt time.Time `json:"created_at"` }
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
Subscriptions manages the Subscription struct
func (Subscriptions) Activate ¶
func (s Subscriptions) Activate(subscription *Subscription, source string, options ...Options) (*Subscription, *CustomerAction, *Error)
Activate : Activate the subscription using the provided source.
func (Subscriptions) All ¶ added in v2.5.0
func (s Subscriptions) All(options ...Options) ([]*Subscription, *Error)
All : Get all the subscriptions.
func (Subscriptions) Create ¶
func (s Subscriptions) Create(subscription *Subscription, customerID string, options ...Options) (*Subscription, *CustomerAction, *Error)
Create : Create a new subscription for the given customer.
func (Subscriptions) Customer ¶
func (s Subscriptions) Customer(subscription *Subscription, options ...Options) (*Customer, *Error)
Customer : Get the customer owning the subscription.
func (Subscriptions) End ¶
func (s Subscriptions) End(subscription *Subscription, reason string, options ...Options) *Error
End : End a subscription. The reason may be provided as well.
func (Subscriptions) Find ¶
func (s Subscriptions) Find(subscriptionID string, options ...Options) (*Subscription, *Error)
Find : Find a subscription by its ID.
func (Subscriptions) Invoice ¶
func (s Subscriptions) Invoice(subscription *Subscription, options ...Options) (*Invoice, *Error)
Invoice : Get the invoice corresponding to the last iteration of the subscription.
func (Subscriptions) Transactions ¶ added in v2.6.0
func (s Subscriptions) Transactions(subscription *Subscription, options ...Options) ([]*Transaction, *Error)
Transactions : Get the subscriptions past transactions.
func (Subscriptions) Update ¶ added in v2.4.2
func (s Subscriptions) Update(subscription *Subscription, options ...Options) (*Subscription, *CustomerAction, *Error)
Update : Update the subscription.
func (Subscriptions) UpdateSource ¶ added in v2.7.0
func (s Subscriptions) UpdateSource(subscription *Subscription, source string, options ...Options) (*Subscription, *CustomerAction, *Error)
UpdateSource : Update the subscription source.
type Token ¶
type Token struct { // ID : ID of the customer token ID string `json:"id"` // Customer : Customer linked to the token Customer *Customer `json:"customer"` // CustomerID : ID of the customer token CustomerID string `json:"customer_id"` // Metadata : Metadata related to the token, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // IsSubscriptionOnly : Define whether or not the customer token is used on a recurring invoice IsSubscriptionOnly bool `json:"is_subscription_only"` // CreatedAt : Date at which the customer token was created CreatedAt time.Time `json:"created_at"` }
type Tokens ¶
type Tokens struct {
// contains filtered or unexported fields
}
Tokens manages the Token struct
func (Tokens) Create ¶
func (s Tokens) Create(token *Token, customerID, source string, options ...Options) (*Token, *Error)
Create : Create a new token for the given customer ID.
func (Tokens) CreateFromRequest ¶ added in v2.7.0
func (s Tokens) CreateFromRequest(token *Token, customerID, target, source string, options ...Options) (*Token, *CustomerAction, *Error)
CreateFromRequest : Create a new token for the given customer ID from an authorization request.
type Transaction ¶
type Transaction struct { // ID : ID of the transaction ID string `json:"id"` // Name : Name of the transaction Name string `json:"name"` // AuthorizedAmount : Amount that was successfully authorized on the transaction AuthorizedAmount string `json:"authorized_amount"` // CapturedAmount : Amount that was successfully captured on the transaction CapturedAmount string `json:"captured_amount"` // Currency : Currency of the transaction Currency string `json:"currency"` // Status : Status of the transaction Status string `json:"status"` // Authorized : Whether the transaction was authorized or not Authorized bool `json:"authorized"` // Captured : Whether the transaction was captured or not Captured bool `json:"captured"` // ProcessoutFee : ProcessOut fee applied on the transaction ProcessoutFee string `json:"processout_fee"` // Metadata : Metadata related to the transaction, in the form of a dictionary (key-value pair) Metadata map[string]string `json:"metadata"` // Sandbox : Define whether or not the transaction is in sandbox environment Sandbox bool `json:"sandbox"` // CreatedAt : Date at which the transaction was created CreatedAt time.Time `json:"created_at"` }
type Transactions ¶
type Transactions struct {
// contains filtered or unexported fields
}
Transactions manages the Transaction struct
func (Transactions) All ¶
func (s Transactions) All(options ...Options) ([]*Transaction, *Error)
All : Get all the transactions.
func (Transactions) Find ¶
func (s Transactions) Find(transactionID string, options ...Options) (*Transaction, *Error)
Find : Find a transaction by its ID.
func (Transactions) Refunds ¶
func (s Transactions) Refunds(transaction *Transaction, options ...Options) ([]*Refund, *Error)
Refunds : Get the transaction's refunds.
type Webhook ¶
type Webhook struct { // ID : ID of the recurring invoice ID string `json:"id"` // Event : Event the webhook is linked to Event *Event `json:"event"` // RequestURL : URL to which the webhook will be posted RequestURL string `json:"request_url"` // RequestMethod : Method used to send the webhook (GET or POST) RequestMethod string `json:"request_method"` // ResponseBody : The response body the webhook received when sending its payload ResponseBody string `json:"response_body"` // ResponseCode : The response code the webhook received when sending its payload ResponseCode string `json:"response_code"` // ResponseHeaders : The response headers the webhook received when sending its payload ResponseHeaders string `json:"response_headers"` // ResponseTimeMs : The time it took for the webhook to send its payload ResponseTimeMs int `json:"response_time_ms"` // Status : The status of the webhook. 0: pending, 1: success, 2: error Status int `json:"status"` // CreatedAt : Date at which the webhook was created CreatedAt time.Time `json:"created_at"` // ReleaseAt : Date at webhook will be/is released ReleaseAt time.Time `json:"release_at"` }