Documentation ¶
Index ¶
- func NewRequestBankAccountDestination() *requestBankAccountDestination
- func NewRequestCardDestination() *requestCardDestination
- func NewRequestIdDestination() *requestIdDestination
- func NewRequestTokenDestination() *requestTokenDestination
- type AccountType
- type AuthorizationType
- type CaptureRequest
- type CaptureType
- type Client
- func (c *Client) CapturePayment(paymentId string, captureRequest CaptureRequest, idempotencyKey *string) (*payments.CaptureResponse, error)
- func (c *Client) CapturePaymentWithoutRequest(paymentId string, idempotencyKey *string) (*payments.CaptureResponse, error)
- func (c *Client) GetPaymentActions(paymentId string) (*GetPaymentActionsResponse, error)
- func (c *Client) GetPaymentDetails(paymentId string) (*GetPaymentResponse, error)
- func (c *Client) IncrementAuthorization(paymentId string, incrementAuthorizationRequest IncrementAuthorizationRequest, ...) (*IncrementAuthorizationResponse, error)
- func (c *Client) RefundPayment(paymentId string, refundRequest *payments.RefundRequest, ...) (*payments.RefundResponse, error)
- func (c *Client) RequestPayment(request PaymentRequest, idempotencyKey *string) (*PaymentResponse, error)
- func (c *Client) RequestPaymentList(request payments.QueryRequest) (*GetPaymentListResponse, error)
- func (c *Client) RequestPayout(request PayoutRequest, idempotencyKey *string) (*PayoutResponse, error)
- func (c *Client) VoidPayment(paymentId string, voidRequest *payments.VoidRequest, idempotencyKey *string) (*payments.VoidResponse, error)
- type CorporateSender
- type DestinationResponse
- type GetPaymentActionsResponse
- type GetPaymentListResponse
- type GetPaymentResponse
- type Identification
- type IdentificationType
- type IncrementAuthorizationRequest
- type IncrementAuthorizationResponse
- type IndividualSender
- type InstructionScheme
- type InstrumentSender
- type PartialAuthorization
- type PaymentAction
- type PaymentContextsPayPayResponseSource
- type PaymentInstruction
- type PaymentInstructionResponse
- type PaymentRequest
- type PaymentResponse
- type PaymentResponseBalances
- type PayoutBillingDescriptor
- type PayoutRequest
- type PayoutResponse
- type ResponseBankAccountDestination
- type ResponseCardSource
- type ResponseCurrencyAccountSource
- type Sender
- type SenderResponse
- type SenderType
- type SourceResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestBankAccountDestination ¶ added in v1.0.1
func NewRequestBankAccountDestination() *requestBankAccountDestination
func NewRequestCardDestination ¶ added in v1.0.1
func NewRequestCardDestination() *requestCardDestination
func NewRequestIdDestination ¶ added in v1.0.1
func NewRequestIdDestination() *requestIdDestination
func NewRequestTokenDestination ¶ added in v1.0.1
func NewRequestTokenDestination() *requestTokenDestination
Types ¶
type AccountType ¶
type AccountType string
const ( Savings AccountType = "savings" Current AccountType = "current" Cash AccountType = "cash" )
type AuthorizationType ¶
type AuthorizationType string
const ( FinalAuthorizationType AuthorizationType = "Final" EstimatedAuthorizationType AuthorizationType = "Estimated" IncrementalAuthorizationType AuthorizationType = "Incremental" )
type CaptureRequest ¶
type CaptureRequest struct { Amount int64 `json:"amount,omitempty"` CaptureType CaptureType `json:"capture_type,omitempty"` Reference string `json:"reference,omitempty"` Customer *common.CustomerRequest `json:"customer,omitempty"` Description string `json:"description,omitempty"` BillingDescriptor *payments.BillingDescriptor `json:"billing_descriptor,omitempty"` Shipping *payments.ShippingDetails `json:"shipping,omitempty"` Items []payments.Product `json:"items,omitempty"` Marketplace *common.MarketplaceData `json:"marketplace,omitempty"` AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"` Processing *payments.ProcessingSettings `json:"processing,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Request
type CaptureType ¶
type CaptureType string
const ( NonFinalCaptureType CaptureType = "NonFinal" FinalCaptureType CaptureType = "Final" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(configuration *configuration.Configuration, apiClient client.HttpClient) *Client
func (*Client) CapturePayment ¶
func (c *Client) CapturePayment( paymentId string, captureRequest CaptureRequest, idempotencyKey *string, ) (*payments.CaptureResponse, error)
func (*Client) CapturePaymentWithoutRequest ¶ added in v1.0.14
func (*Client) GetPaymentActions ¶
func (c *Client) GetPaymentActions(paymentId string) (*GetPaymentActionsResponse, error)
func (*Client) GetPaymentDetails ¶
func (c *Client) GetPaymentDetails(paymentId string) (*GetPaymentResponse, error)
func (*Client) IncrementAuthorization ¶ added in v1.0.13
func (c *Client) IncrementAuthorization( paymentId string, incrementAuthorizationRequest IncrementAuthorizationRequest, idempotencyKey *string, ) (*IncrementAuthorizationResponse, error)
func (*Client) RefundPayment ¶
func (c *Client) RefundPayment( paymentId string, refundRequest *payments.RefundRequest, idempotencyKey *string, ) (*payments.RefundResponse, error)
func (*Client) RequestPayment ¶
func (c *Client) RequestPayment(request PaymentRequest, idempotencyKey *string) (*PaymentResponse, error)
func (*Client) RequestPaymentList ¶
func (c *Client) RequestPaymentList(request payments.QueryRequest) (*GetPaymentListResponse, error)
func (*Client) RequestPayout ¶
func (c *Client) RequestPayout(request PayoutRequest, idempotencyKey *string) (*PayoutResponse, error)
func (*Client) VoidPayment ¶
func (c *Client) VoidPayment( paymentId string, voidRequest *payments.VoidRequest, idempotencyKey *string, ) (*payments.VoidResponse, error)
type CorporateSender ¶
type CorporateSender struct { Type SenderType `json:"type,omitempty"` CompanyName string `json:"company_name,omitempty"` Address *common.Address `json:"address,omitempty"` Reference string `json:"reference,omitempty"` ReferenceType string `json:"reference_type,omitempty"` SourceOfFunds string `json:"source_of_funds,omitempty"` Identification *common.AccountHolderIdentification `json:"identification,omitempty"` }
func NewRequestCorporateSender ¶ added in v1.0.1
func NewRequestCorporateSender() *CorporateSender
func NewRequestGovernmentSender ¶ added in v1.0.1
func NewRequestGovernmentSender() *CorporateSender
func (*CorporateSender) GetType ¶ added in v1.0.1
func (s *CorporateSender) GetType() SenderType
type DestinationResponse ¶
type DestinationResponse struct { HttpMetadata common.HttpMetadata ResponseBankAccountDestination *ResponseBankAccountDestination AlternativeResponse *common.AlternativeResponse }
func (*DestinationResponse) UnmarshalJSON ¶
func (s *DestinationResponse) UnmarshalJSON(data []byte) error
type GetPaymentActionsResponse ¶
type GetPaymentActionsResponse struct { HttpMetadata common.HttpMetadata Actions []PaymentAction `json:"actions,omitempty"` }
Response
func (*GetPaymentActionsResponse) UnmarshalJSON ¶
func (p *GetPaymentActionsResponse) UnmarshalJSON(data []byte) error
type GetPaymentListResponse ¶
type GetPaymentListResponse struct { HttpMetadata common.HttpMetadata Limit int `json:"limit,omitempty"` Skip int `json:"skip,omitempty"` TotalCount int `json:"total_count,omitempty"` Data []GetPaymentResponse `json:"data,omitempty"` }
Response
type GetPaymentResponse ¶
type GetPaymentResponse struct { HttpMetadata common.HttpMetadata Id string `json:"id,omitempty"` RequestedOn *time.Time `json:"requested_on,omitempty"` Source *SourceResponse `json:"source,omitempty"` Destination *DestinationResponse `json:"destination,omitempty"` Sender *SenderResponse `json:"sender,omitempty"` Amount int64 `json:"amount,omitempty"` Currency common.Currency `json:"currency,omitempty"` PaymentType payments.PaymentType `json:"payment_type,omitempty"` Reference string `json:"reference,omitempty"` Description string `json:"description,omitempty"` Approved bool `json:"approved,omitempty"` ExpiresOn *time.Time `json:"expires_on,omitempty"` Status payments.PaymentStatus `json:"status,omitempty"` Balances *PaymentResponseBalances `json:"balances,omitempty"` ThreeDs *payments.ThreeDsData `json:"3ds,omitempty"` Risk *payments.RiskAssessment `json:"risk,omitempty"` Customer *common.CustomerResponse `json:"customer,omitempty"` BillingDescriptor *payments.BillingDescriptor `json:"billing_descriptor,omitempty"` ShippingDetails *payments.ShippingDetails `json:"shipping,omitempty"` PaymentIp string `json:"payment_ip,omitempty"` Marketplace *common.MarketplaceData `json:"marketplace,omitempty"` AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"` Recipient *payments.PaymentRecipient `json:"recipient,omitempty"` ProcessingData *payments.ProcessingData `json:"processing,omitempty"` Items []payments.Product `json:"items,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Eci string `json:"eci,omitempty"` SchemeId string `json:"scheme_id,omitempty"` Actions []payments.PaymentActionSummary `json:"actions,omitempty"` Retry *payments.PaymentRetryResponse `json:"retry,omitempty"` PanTypeProcessed payments.PanProcessedType `json:"pan_type_processed,omitempty"` CkoNetworkTokenAvailable bool `json:"cko_network_token_available,omitempty"` ProcessedOn *time.Time `json:"processed_on,omitempty"` Instruction *PaymentInstruction `json:"instruction,omitempty"` Links map[string]common.Link `json:"_links"` }
Response
type Identification ¶
type Identification struct { Type IdentificationType `json:"type,omitempty"` Number string `json:"number,omitempty"` IssuingCountry common.Country `json:"issuing_country,omitempty"` DateOfExpiry string `json:"date_of_expiry,omitempty"` }
type IdentificationType ¶
type IdentificationType string
const ( Passport IdentificationType = "passport" DrivingLicence IdentificationType = "driving_licence" NationalId IdentificationType = "national_id" )
type IncrementAuthorizationRequest ¶ added in v1.0.13
type IncrementAuthorizationRequest struct { Amount int64 `json:"amount,omitempty"` Reference string `json:"reference,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Request
type IncrementAuthorizationResponse ¶ added in v1.0.13
type IncrementAuthorizationResponse struct { HttpMetadata common.HttpMetadata ActionId string `json:"action_id,omitempty"` Amount int64 `json:"amount,omitempty"` Currency common.Currency `json:"currency,omitempty"` Approved bool `json:"approved,omitempty"` Status payments.PaymentStatus `json:"status,omitempty"` AuthCode string `json:"auth_code,omitempty"` ResponseCode string `json:"response_code,omitempty"` ResponseSummary string `json:"response_summary,omitempty"` ExpiresOn *time.Time `json:"expires_on,omitempty"` Balances *PaymentResponseBalances `json:"balances,omitempty"` ProcessedOn *time.Time `json:"processed_on,omitempty"` Reference string `json:"reference,omitempty"` Processing *payments.PaymentProcessing `json:"processing,omitempty"` Eci string `json:"eci,omitempty"` SchemeId string `json:"scheme_id,omitempty"` Links map[string]common.Link `json:"_links"` }
Response
type IndividualSender ¶
type IndividualSender struct { Type SenderType `json:"type,omitempty"` FirstName string `json:"first_name,omitempty"` MiddleName string `json:"middle_name,omitempty"` LastName string `json:"last_name,omitempty"` Dob string `json:"dob,omitempty"` DateOfBirth string `json:"date_of_birth,omitempty"` Address *common.Address `json:"address,omitempty"` Identification *Identification `json:"identification,omitempty"` Reference string `json:"reference,omitempty"` ReferenceType string `json:"reference_type,omitempty"` SourceOfFunds string `json:"source_of_funds,omitempty"` CountryOfBirth common.Country `json:"country_of_birth,omitempty"` Nationality common.Country `json:"nationality,omitempty"` }
func NewRequestIndividualSender ¶ added in v1.0.1
func NewRequestIndividualSender() *IndividualSender
func (*IndividualSender) GetType ¶ added in v1.0.1
func (s *IndividualSender) GetType() SenderType
type InstructionScheme ¶
type InstructionScheme string
const ( SwiftInstructionScheme InstructionScheme = "swift" LocalInstructionScheme InstructionScheme = "local" InstantInstructionScheme InstructionScheme = "instant" )
type InstrumentSender ¶
type InstrumentSender struct { Type SenderType `json:"type,omitempty"` Reference string `json:"reference,omitempty"` }
func NewRequestInstrumentSender ¶ added in v1.0.1
func NewRequestInstrumentSender() *InstrumentSender
func (*InstrumentSender) GetType ¶ added in v1.0.1
func (s *InstrumentSender) GetType() SenderType
type PartialAuthorization ¶ added in v1.2.2
type PartialAuthorization struct {
Enabled bool `json:"enabled,omitempty"`
}
type PaymentAction ¶
type PaymentAction struct { Id string `json:"id,omitempty"` Type payments.ActionType `json:"type,omitempty"` ProcessedOn *time.Time `json:"processed_on,omitempty"` Amount int64 `json:"amount,omitempty"` Approved bool `json:"approved,omitempty"` AuthCode string `json:"auth_code,omitempty"` ResponseCode string `json:"response_code,omitempty"` ResponseSummary string `json:"response_summary,omitempty"` AuthorizationType AuthorizationType `json:"authorization_type,omitempty"` Reference string `json:"reference,omitempty"` Processing *payments.ProcessingSettings `json:"processing,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"` Links map[string]common.Link `json:"_links"` }
Response
type PaymentContextsPayPayResponseSource ¶ added in v1.0.18
type PaymentContextsPayPayResponseSource struct {
Type payments.SourceType `json:"type,omitempty"`
}
type PaymentInstruction ¶
type PaymentInstruction struct { Purpose string `json:"purpose,omitempty"` ChargeBearer string `json:"charge_bearer,omitempty"` Repair bool `json:"repair"` Scheme *InstructionScheme `json:"scheme,omitempty"` QuoteId string `json:"quote_id,omitempty"` SkipExpiry string `json:"skip_expiry,omitempty"` FundsTransferType payments.FundTransferType `json:"funds_transfer_type,omitempty"` Mvv string `json:"mvv,omitempty"` }
type PaymentRequest ¶
type PaymentRequest struct { PaymentContextId string `json:"payment_context_id,omitempty"` Source payments.PaymentSource `json:"source,omitempty"` Amount int64 `json:"amount,omitempty"` Currency common.Currency `json:"currency,omitempty"` PaymentType payments.PaymentType `json:"payment_type,omitempty"` MerchantInitiated bool `json:"merchant_initiated"` Reference string `json:"reference,omitempty"` Description string `json:"description,omitempty"` AuthorizationType AuthorizationType `json:"authorization_type,omitempty"` PartialAuthorization *PartialAuthorization `json:"partial_authorization,omitempty"` Capture bool `json:"capture"` CaptureOn *time.Time `json:"capture_on,omitempty"` Customer *common.CustomerRequest `json:"customer,omitempty"` BillingDescriptor *payments.BillingDescriptor `json:"billing_descriptor,omitempty"` ShippingDetails *payments.ShippingDetails `json:"shipping,omitempty"` Segment *payments.PaymentSegment `json:"segment,omitempty"` ThreeDsRequest *payments.ThreeDsRequest `json:"3ds,omitempty"` PreviousPaymentId string `json:"previous_payment_id,omitempty"` ProcessingChannelId string `json:"processing_channel_id,omitempty"` Risk *payments.RiskRequest `json:"risk,omitempty"` SuccessUrl string `json:"success_url,omitempty"` FailureUrl string `json:"failure_url,omitempty"` PaymentIp string `json:"payment_ip,omitempty"` Sender Sender `json:"sender,omitempty"` Recipient *payments.PaymentRecipient `json:"recipient,omitempty"` Marketplace *common.MarketplaceData `json:"marketplace,omitempty"` AmountAllocations []common.AmountAllocations `json:"amount_allocations,omitempty"` Processing *payments.ProcessingSettings `json:"processing,omitempty"` Items []payments.Product `json:"items,omitempty"` Retry *payments.PaymentRetryRequest `json:"retry,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Instruction *PaymentInstruction `json:"instruction,omitempty"` }
Request
type PaymentResponse ¶
type PaymentResponse struct { HttpMetadata common.HttpMetadata ActionId string `json:"action_id,omitempty"` Amount int64 `json:"amount,omitempty"` Approved bool `json:"approved,omitempty"` AuthCode string `json:"auth_code,omitempty"` Id string `json:"id,omitempty"` Currency common.Currency `json:"currency,omitempty"` Customer *common.CustomerResponse `json:"customer,omitempty"` Source *SourceResponse `json:"source,omitempty"` Status payments.PaymentStatus `json:"status,omitempty"` ThreeDs *payments.ThreeDsEnrollment `json:"3ds,omitempty"` Reference string `json:"reference,omitempty"` ResponseCode string `json:"response_code,omitempty"` ResponseSummary string `json:"response_summary,omitempty"` Risk *payments.RiskAssessment `json:"risk,omitempty"` ProcessedOn *time.Time `json:"processed_on,omitempty"` ExpiresOn *time.Time `json:"expires_on,omitempty"` Balances *PaymentResponseBalances `json:"balances,omitempty"` Processing *payments.PaymentProcessing `json:"processing,omitempty"` Eci string `json:"eci,omitempty"` SchemeId string `json:"scheme_id,omitempty"` Retry *payments.PaymentRetryResponse `json:"retry,omitempty"` Links map[string]common.Link `json:"_links"` }
Response
type PaymentResponseBalances ¶
type PaymentResponseBalances struct { TotalAuthorized int64 `json:"total_authorized,omitempty"` TotalVoided int64 `json:"total_voided,omitempty"` AvailableToVoid int64 `json:"available_to_void"` TotalCaptured int64 `json:"total_captured,omitempty"` AvailableToCapture int64 `json:"available_to_capture,omitempty"` TotalRefunded int64 `json:"total_refunded,omitempty"` AvailableToRefund int64 `json:"available_to_refund,omitempty"` }
type PayoutBillingDescriptor ¶
type PayoutBillingDescriptor struct {
Reference string `json:"reference,omitempty"`
}
type PayoutRequest ¶
type PayoutRequest struct { Source sources.PayoutSource `json:"source,omitempty"` Destination payments.Destination `json:"destination,omitempty"` Amount int64 `json:"amount,omitempty"` Currency common.Currency `json:"currency,omitempty"` Reference string `json:"reference,omitempty"` BillingDescriptor *PayoutBillingDescriptor `json:"billing_descriptor,omitempty"` Sender Sender `json:"sender,omitempty"` Instruction *PaymentInstruction `json:"instruction,omitempty"` ProcessingChannelId string `json:"processing_channel_id,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Request
type PayoutResponse ¶
type PayoutResponse struct { HttpMetadata common.HttpMetadata Id string `json:"id,omitempty"` Status payments.PaymentStatus `json:"status,omitempty"` Reference string `json:"reference,omitempty"` Instruction *PaymentInstructionResponse `json:"instruction,omitempty"` }
Response
type ResponseBankAccountDestination ¶
type ResponseBankAccountDestination struct { Type payments.DestinationType `json:"type,omitempty"` ExpiryMonth int `json:"expiry_month,omitempty"` ExpiryYear int `json:"expiry_year,omitempty"` Name string `json:"name,omitempty"` Last4 string `json:"last4,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` Bin string `json:"bin,omitempty"` CardType common.CardType `json:"card_type,omitempty"` CardCategory common.CardCategory `json:"card_category,omitempty"` Issuer string `json:"issuer,omitempty"` IssuerCountry common.Country `json:"issuer_country,omitempty"` ProductId string `json:"product_id,omitempty"` ProductType string `json:"product_type,omitempty"` }
type ResponseCardSource ¶
type ResponseCardSource struct { Type payments.SourceType `json:"type,omitempty"` Id string `json:"id,omitempty"` BillingAddress *common.Address `json:"billing_address,omitempty"` Phone *common.Phone `json:"phone,omitempty"` ExpiryMonth int `json:"expiry_month,omitempty"` ExpiryYear int `json:"expiry_year,omitempty"` Name string `json:"name,omitempty"` Scheme string `json:"scheme,omitempty"` // Deprecated: This property will be removed in the future, and should not be used. Use LocalSchemes instead. SchemeLocal string `json:"scheme_local,omitempty"` LocalSchemes []string `json:"local_schemes,omitempty"` Last4 string `json:"last4,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` Bin string `json:"bin,omitempty"` CardType common.CardType `json:"card_type,omitempty"` CardCategory common.CardCategory `json:"card_category,omitempty"` CardWalletType common.CardWalletType `json:"card_wallet_type,omitempty"` Issuer string `json:"issuer,omitempty"` IssuerCountry common.Country `json:"issuer_country,omitempty"` ProductId string `json:"product_id,omitempty"` ProductType string `json:"product_type,omitempty"` AvsCheck string `json:"avs_check,omitempty"` CvvCheck string `json:"cvv_check,omitempty"` PaymentAccountReference string `json:"payment_account_reference,omitempty"` EncryptedCardNumber string `json:"encrypted_card_number,omitempty"` }
type ResponseCurrencyAccountSource ¶
type ResponseCurrencyAccountSource struct { Type payments.SourceType `json:"type,omitempty"` Amount int `json:"amount,omitempty"` }
type Sender ¶ added in v1.0.1
type Sender interface {
GetType() SenderType
}
type SenderResponse ¶
type SenderResponse struct { HttpMetadata common.HttpMetadata PaymentCorporateSender *CorporateSender PaymentGovernmentSender *CorporateSender PaymentIndividualSender *IndividualSender PaymentInstrumentSender *InstrumentSender AlternativeResponse *common.AlternativeResponse }
func (*SenderResponse) UnmarshalJSON ¶
func (s *SenderResponse) UnmarshalJSON(data []byte) error
type SenderType ¶ added in v1.0.1
type SenderType string
const ( Individual SenderType = "individual" Corporate SenderType = "corporate" Instrument SenderType = "instrument" Government SenderType = "government" )
type SourceResponse ¶
type SourceResponse struct { ResponseCardSource *ResponseCardSource ResponseCurrencyAccountSource *ResponseCurrencyAccountSource PaymentContextsPayPayResponseSource *PaymentContextsPayPayResponseSource AlternativeResponse *common.AlternativeResponse }
func (*SourceResponse) UnmarshalJSON ¶
func (s *SourceResponse) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.