Documentation ¶
Index ¶
- Constants
- Variables
- func AddUserAgent(transport http.RoundTripper, userAgent string) http.RoundTripper
- func BuildUserAgent() string
- func Decrypt(key []byte, cipherText string) string
- func Encrypt(key []byte, plainText string) string
- func SideLoad(request SideLoadRequest, logger SideLogger) error
- type APICredentials
- type APIRequestHeaders
- type AVSResponse
- type AbstractAcknowledgement
- type Acknowledgement
- type AddTestMerchantRequest
- type Address
- type ApprovalResponse
- type Archive
- type AuthorizationRequest
- type AuthorizationResponse
- type BalanceRequest
- type BalanceResponse
- type BankAccount
- type BatchDetailsRequest
- type BatchDetailsResponse
- type BatchHistoryRequest
- type BatchHistoryResponse
- type BatchSummary
- type BooleanPromptRequest
- type BooleanPromptResponse
- type BrandingAsset
- type BrandingAssetRequest
- type BrandingAssetResponse
- type CVMType
- type CancelPaymentLinkRequest
- type CancelPaymentLinkResponse
- type CaptureRequest
- type CaptureResponse
- type CaptureSignatureRequest
- type CaptureSignatureResponse
- type CardType
- type CashDiscountRequest
- type CashDiscountResponse
- type ClearTerminalRequest
- type Client
- func (client *Client) ActivateTerminal(request TerminalActivationRequest) (*Acknowledgement, error)
- func (client *Client) AddTestMerchant(request AddTestMerchantRequest) (*MerchantProfileResponse, error)
- func (client *Client) Balance(request BalanceRequest) (*BalanceResponse, error)
- func (client *Client) BatchDetails(request BatchDetailsRequest) (*BatchDetailsResponse, error)
- func (client *Client) BatchHistory(request BatchHistoryRequest) (*BatchHistoryResponse, error)
- func (client *Client) BooleanPrompt(request BooleanPromptRequest) (*BooleanPromptResponse, error)
- func (client *Client) CancelPaymentLink(request CancelPaymentLinkRequest) (*CancelPaymentLinkResponse, error)
- func (client *Client) Capture(request CaptureRequest) (*CaptureResponse, error)
- func (client *Client) CaptureSignature(request CaptureSignatureRequest) (*CaptureSignatureResponse, error)
- func (client *Client) CashDiscount(request CashDiscountRequest) (*CashDiscountResponse, error)
- func (client *Client) Charge(request AuthorizationRequest) (*AuthorizationResponse, error)
- func (client *Client) Clear(request ClearTerminalRequest) (*Acknowledgement, error)
- func (client *Client) CloseBatch(request CloseBatchRequest) (*CloseBatchResponse, error)
- func (client *Client) Customer(request CustomerRequest) (*CustomerResponse, error)
- func (client *Client) CustomerSearch(request CustomerSearchRequest) (*CustomerSearchResponse, error)
- func (client *Client) DashboardRequest(path, method string, request, response interface{}, requestTimeout interface{}) error
- func (client *Client) DashboardUpload(path string, request UploadMetadata, reader io.Reader, response interface{}, ...) error
- func (client *Client) DeactivateTerminal(request TerminalDeactivationRequest) (*Acknowledgement, error)
- func (client *Client) DeleteBrandingAsset(request BrandingAssetRequest) (*Acknowledgement, error)
- func (client *Client) DeleteCustomer(request DeleteCustomerRequest) (*DeleteCustomerResponse, error)
- func (client *Client) DeleteMediaAsset(request MediaRequest) (*Acknowledgement, error)
- func (client *Client) DeleteMerchantPlatforms(request MerchantPlatformRequest) (*Acknowledgement, error)
- func (client *Client) DeleteQueuedTransaction(request DeleteQueuedTransactionRequest) (*DeleteQueuedTransactionResponse, error)
- func (client *Client) DeleteSlideShow(request SlideShowRequest) (*Acknowledgement, error)
- func (client *Client) DeleteSurveyQuestion(request SurveyQuestionRequest) (*Acknowledgement, error)
- func (client *Client) DeleteTestMerchant(request MerchantProfileRequest) (*Acknowledgement, error)
- func (client *Client) DeleteToken(request DeleteTokenRequest) (*DeleteTokenResponse, error)
- func (client *Client) Enroll(request EnrollRequest) (*EnrollResponse, error)
- func (client *Client) ExpireRouteCache()
- func (client *Client) GatewayGet(path string, responseEntity interface{}) error
- func (client *Client) GatewayPost(path string, requestEntity interface{}, responseEntity interface{}, ...) error
- func (client *Client) GatewayRequest(path, method string, request, response interface{}, testTx bool, ...) error
- func (client *Client) GetMerchants(request GetMerchantsRequest) (*GetMerchantsResponse, error)
- func (client *Client) GiftActivate(request GiftActivateRequest) (*GiftActivateResponse, error)
- func (client *Client) InviteMerchantUser(request InviteMerchantUserRequest) (*Acknowledgement, error)
- func (client *Client) LinkToken(request LinkTokenRequest) (*Acknowledgement, error)
- func (client *Client) ListQueuedTransactions(request ListQueuedTransactionsRequest) (*ListQueuedTransactionsResponse, error)
- func (client *Client) Locate(request LocateRequest) (*LocateResponse, error)
- func (client *Client) Media(request MediaRequest) (*MediaLibraryResponse, error)
- func (client *Client) MediaAsset(request MediaRequest) (*MediaMetadata, error)
- func (client *Client) MerchantPlatforms(request MerchantProfileRequest) (*MerchantPlatformsResponse, error)
- func (client *Client) MerchantProfile(request MerchantProfileRequest) (*MerchantProfileResponse, error)
- func (client *Client) MerchantUsers(request MerchantProfileRequest) (*MerchantUsersResponse, error)
- func (client *Client) Message(request MessageRequest) (*Acknowledgement, error)
- func (client *Client) NewTransactionDisplay(request TransactionDisplayRequest) (*Acknowledgement, error)
- func (client *Client) Ping(request PingRequest) (*PingResponse, error)
- func (client *Client) Preauth(request AuthorizationRequest) (*AuthorizationResponse, error)
- func (client *Client) Reboot(request PingRequest) (*Acknowledgement, error)
- func (client *Client) Refund(request RefundRequest) (*AuthorizationResponse, error)
- func (client *Client) RelayRequest(path, method string, request, response interface{}, testTx bool, ...) error
- func (client *Client) Reverse(request AuthorizationRequest) (*AuthorizationResponse, error)
- func (client *Client) SendPaymentLink(request PaymentLinkRequest) (*PaymentLinkResponse, error)
- func (client *Client) SlideShow(request SlideShowRequest) (*SlideShow, error)
- func (client *Client) SlideShows(request SlideShowRequest) (*SlideShowResponse, error)
- func (client *Client) SurveyQuestion(request SurveyQuestionRequest) (*SurveyQuestion, error)
- func (client *Client) SurveyQuestions(request SurveyQuestionRequest) (*SurveyQuestionResponse, error)
- func (client *Client) SurveyResults(request SurveyResultsRequest) (*SurveyQuestion, error)
- func (client *Client) TCDeleteTemplate(request TermsAndConditionsTemplateRequest) (*Acknowledgement, error)
- func (client *Client) TCEntry(request TermsAndConditionsLogRequest) (*TermsAndConditionsLogEntry, error)
- func (client *Client) TCLog(request TermsAndConditionsLogRequest) (*TermsAndConditionsLogResponse, error)
- func (client *Client) TCTemplate(request TermsAndConditionsTemplateRequest) (*TermsAndConditionsTemplate, error)
- func (client *Client) TCTemplates(request TermsAndConditionsTemplateRequest) (*TermsAndConditionsTemplateResponse, error)
- func (client *Client) TCUpdateTemplate(request TermsAndConditionsTemplate) (*TermsAndConditionsTemplate, error)
- func (client *Client) TerminalBranding(request BrandingAssetRequest) (*BrandingAssetResponse, error)
- func (client *Client) TerminalStatus(request TerminalStatusRequest) (*TerminalStatusResponse, error)
- func (client *Client) Terminals(request TerminalProfileRequest) (*TerminalProfileResponse, error)
- func (client *Client) TermsAndConditions(request TermsAndConditionsRequest) (*TermsAndConditionsResponse, error)
- func (client *Client) TextPrompt(request TextPromptRequest) (*TextPromptResponse, error)
- func (client *Client) TokenMetadata(request TokenMetadataRequest) (*TokenMetadataResponse, error)
- func (client *Client) TransactionHistory(request TransactionHistoryRequest) (*TransactionHistoryResponse, error)
- func (client *Client) TransactionStatus(request TransactionStatusRequest) (*AuthorizationResponse, error)
- func (client *Client) UnlinkToken(request UnlinkTokenRequest) (*Acknowledgement, error)
- func (client *Client) UpdateBrandingAsset(request BrandingAsset) (*BrandingAsset, error)
- func (client *Client) UpdateCustomer(request UpdateCustomerRequest) (*CustomerResponse, error)
- func (client *Client) UpdateMerchant(request MerchantProfile) (*MerchantProfileResponse, error)
- func (client *Client) UpdateMerchantPlatforms(request MerchantPlatform) (*Acknowledgement, error)
- func (client *Client) UpdateSlideShow(request SlideShow) (*SlideShow, error)
- func (client *Client) UpdateSurveyQuestion(request SurveyQuestion) (*SurveyQuestion, error)
- func (client *Client) UpdateTransactionDisplay(request TransactionDisplayRequest) (*Acknowledgement, error)
- func (client *Client) UploadMedia(request UploadMetadata, reader io.Reader) (*MediaMetadata, error)
- func (client *Client) UploadStatus(request UploadStatusRequest) (*UploadStatus, error)
- func (client *Client) Void(request VoidRequest) (*VoidResponse, error)
- type CloseBatchRequest
- type CloseBatchResponse
- type CommandLineArguments
- type ConfigSettings
- type CoreRequest
- type CoreResponse
- type CryptocurrencyResponse
- type Customer
- type CustomerRequest
- type CustomerResponse
- type CustomerSearchRequest
- type CustomerSearchResponse
- type CustomerToken
- type DeleteCustomerRequest
- type DeleteCustomerResponse
- type DeleteQueuedTransactionRequest
- type DeleteQueuedTransactionResponse
- type DeleteTokenRequest
- type DeleteTokenResponse
- type DownloadMetaData
- type EnrollRequest
- type EnrollResponse
- type FirmwareMetadata
- type GetMerchantsRequest
- type GetMerchantsResponse
- type GiftActivateRequest
- type GiftActivateResponse
- type Healthcare
- type HealthcareGroup
- type HealthcareType
- type HeartbeatResponse
- type InviteMerchantUserRequest
- type LinkTokenRequest
- type ListQueuedTransactionsRequest
- type ListQueuedTransactionsResponse
- type LocateRequest
- type LocateResponse
- type MediaLibraryResponse
- type MediaMetadata
- type MediaRequest
- type MerchantPlatform
- type MerchantPlatformRequest
- type MerchantPlatformsResponse
- type MerchantProfile
- type MerchantProfileRequest
- type MerchantProfileResponse
- type MerchantUser
- type MerchantUsersResponse
- type MessageRequest
- type PaymentAmounts
- type PaymentLinkRequest
- type PaymentLinkResponse
- type PaymentMethod
- type PaymentMethodResponse
- type PingRequest
- type PingResponse
- type PreviousTransaction
- type PromptType
- type RawPublicKey
- type ReceiptSuggestions
- type RefundRequest
- type RequestAmount
- type RoundingMode
- type RouteCache
- type SideLoadRequest
- type SideLogger
- type SignatureFormat
- type SignatureRequest
- type SignatureResponse
- type Slide
- type SlideShow
- type SlideShowRequest
- type SlideShowResponse
- type Subtotals
- type SurveyDataPoint
- type SurveyQuestion
- type SurveyQuestionRequest
- type SurveyQuestionResponse
- type SurveyResultsRequest
- type TerminalActivationRequest
- type TerminalAuthorizationRequest
- type TerminalBalanceRequest
- type TerminalBooleanPromptRequest
- type TerminalCaptureSignatureRequest
- type TerminalClearTerminalRequest
- type TerminalDeactivationRequest
- type TerminalDeleteQueuedTransactionRequest
- type TerminalEnrollRequest
- type TerminalGiftActivateRequest
- type TerminalListQueuedTransactionsRequest
- type TerminalLocateRequest
- type TerminalMessageRequest
- type TerminalPingRequest
- type TerminalProfile
- type TerminalProfileRequest
- type TerminalProfileResponse
- type TerminalReference
- type TerminalRefundRequest
- type TerminalRoute
- type TerminalRouteResponse
- type TerminalStatusRequest
- type TerminalStatusResponse
- type TerminalTerminalStatusRequest
- type TerminalTermsAndConditionsRequest
- type TerminalTermsAndConditionsResponse
- type TerminalTextPromptRequest
- type TerminalTransactionDisplayRequest
- type TerminalVolume
- type TermsAndConditionsLogEntry
- type TermsAndConditionsLogRequest
- type TermsAndConditionsLogResponse
- type TermsAndConditionsRequest
- type TermsAndConditionsResponse
- type TermsAndConditionsTemplate
- type TermsAndConditionsTemplateRequest
- type TermsAndConditionsTemplateResponse
- type TextPromptRequest
- type TextPromptResponse
- type TimeoutRequest
- type TokenMetadataRequest
- type TokenMetadataResponse
- type TransactionDisplayDiscount
- type TransactionDisplayItem
- type TransactionDisplayRequest
- type TransactionDisplayTransaction
- type TransactionHistoryRequest
- type TransactionHistoryResponse
- type TransactionStatus
- type TransactionStatusRequest
- type UnlinkTokenRequest
- type UpdateCustomerRequest
- type UploadMetadata
- type UploadStatus
- type UploadStatusRequest
- type VoidRequest
- type VoidResponse
- type WhiteListedCard
Constants ¶
const ( DefaultGatewayHost = "https://api.blockchyp.com" DefaultDashboardHost = "https://dashboard.blockchyp.com" DefaultTestGatewayHost = "https://test.blockchyp.com" DefaultHTTPS = true DefaultRouteCacheTTL = 60 * time.Minute DefaultGatewayTimeout = 20 * time.Second DefaultTerminalTimeout = 2 * time.Minute )
Default client configuration constants.
const ( ConfigDir = "blockchyp" ConfigFile = "blockchyp.json" )
Default filesystem configuration.
const ( ResponseUnknownTerminal = "Unknown Terminal" ResponseTimedOut = "Request Timed Out" )
Clientside response constants.
const ( SignatureFormatNone = "" SignatureFormatPNG = "png" SignatureFormatJPG = "jpg" SignatureFormatGIF = "gif" )
SignatureFormats.
const ( PromptTypeAmount = "amount" PromptTypeEmail = "email" PromptTypePhone = "phone" PromptTypeCustomerNumber = "customer-number" PromptTypeRewardsNumber = "rewards-number" PromptTypeFirstName = "first-name" PromptTypeLastName = "last-name" )
PromptTypes.
const ( AVSResponseNotApplicable AVSResponse = "" AVSResponseNotSupported = "not_supported" AVSResponseRetry = "retry" AVSResponseNoMatch = "no_match" AVSResponseAddressMatch = "address_match" AVSResponsePostalCodeMatch = "zip_match" AVSResponseAddressAndPostalCodeMatch = "match" )
AVSResponse types.
const ( HealthcareTypeHealthcare = "healthcare" HealthcareTypePrescription = "prescription" HealthcareTypeVision = "vision" HealthcareTypeClinic = "clinic" HealthcareTypeDental = "dental" )
HealthcareTypes.
const ( RoundingModeUp = "up" RoundingModeNearest = "nearest" RoundingModeDown = "down" )
RoundingMode types
Variables ¶
var ErrInvalidAsyncRequest = errors.New("async requests must be terminal requests")
ErrInvalidAsyncRequest is returned when a request cannot be called asynchronously.
var ErrNoChange = errors.New("route unchanged")
ErrNoChange is returned when a route refresh does not produce a new route.
var ErrUnknownTerminal = errors.New("unknown terminal")
ErrUnknownTerminal is returned when there is no route to a given terminal.
var Version string
Version contains the version at build time
Functions ¶
func AddUserAgent ¶
func AddUserAgent(transport http.RoundTripper, userAgent string) http.RoundTripper
AddUserAgent adds a user agent header to an http.RoundTripper.
func BuildUserAgent ¶
func BuildUserAgent() string
BuildUserAgent assembles a user agent header for use with requests to the gateway and terminals.
func Decrypt ¶
Decrypt performs AES 256/CBC/PKCS7 decryption on the given cipherText with the given key.
func Encrypt ¶
Encrypt performs AES 256/CBC/PKCS7 encryption on the given plain text with the given key.
func SideLoad ¶ added in v1.24.25
func SideLoad(request SideLoadRequest, logger SideLogger) error
SideLoad loads firmware updates onto a terminal elsewhere on the local network
Types ¶
type APICredentials ¶
type APICredentials struct { APIKey string `json:"apiKey"` BearerToken string `json:"bearerToken"` SigningKey string `json:"signingKey"` }
APICredentials models gateway credentials.
type APIRequestHeaders ¶
type APIRequestHeaders struct { Timestamp string Nonce string BearerToken string APIKey string Signature string }
APIRequestHeaders models the http headers required for BlockChyp API requests.
type AVSResponse ¶
type AVSResponse string
AVSResponse indicates the result of address verification.
type AbstractAcknowledgement ¶
type AbstractAcknowledgement struct { // Success indicates whether or not the request succeeded. Success bool // Error is the error, if an error occurred. Error string // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string }
AbstractAcknowledgement contains fields which should be returned with standard requests.
func (AbstractAcknowledgement) From ¶
func (r AbstractAcknowledgement) From(raw interface{}) (result AbstractAcknowledgement, ok bool)
From creates an instance of AbstractAcknowledgement with values from a generic type.
type Acknowledgement ¶
type Acknowledgement struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` }
Acknowledgement contains a basic api acknowledgement.
type AddTestMerchantRequest ¶
type AddTestMerchantRequest struct { // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // DBAName the DBA name for the test merchant. DBAName string `json:"dbaName"` // CompanyName is the corporate name for the test merchant. CompanyName string `json:"companyName"` // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` }
AddTestMerchantRequest models basic information needed to create a test merchant.
type Address ¶
type Address struct { // Address1 is the first line of the street address. Address1 string `json:"address1"` // Address2 is the second line of the street address. Address2 string `json:"address2"` // City is the city associated with the street address. City string `json:"city"` // StateOrProvince is the state or province associated with the street // address. StateOrProvince string `json:"stateOrProvince"` // PostalCode is the postal code associated with the street address. PostalCode string `json:"postalCode"` // CountryCode is the ISO country code associated with the street address. CountryCode string `json:"countryCode"` // Latitude is the latitude component of the address's GPS coordinates. Latitude float64 `json:"latitude"` // Longitude is the longitude component of the address's GPS coordinates. Longitude float64 `json:"longitude"` }
Address models a physical address.
type ApprovalResponse ¶
type ApprovalResponse struct { // Approved indicates that the transaction was approved. Approved bool // AuthCode is the auth code from the payment network. AuthCode string // AuthResponseCode is the code returned by the terminal or the card issuer // to indicate the disposition of the message. AuthResponseCode string }
ApprovalResponse contains response fields for an approved transaction.
func (ApprovalResponse) From ¶
func (r ApprovalResponse) From(raw interface{}) (result ApprovalResponse, ok bool)
From creates an instance of ApprovalResponse with values from a generic type.
type Archive ¶ added in v1.24.25
type Archive struct { ArchiveIdentifier string `json:"archiveIdentifier"` DownloadURL string `json:"downloadUrl"` Packages []string `json:"packages"` IncrementalURLs []string `json:"incrementalUrls"` }
Archive models a single archive package
type AuthorizationRequest ¶
type AuthorizationRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token is the payment token to be used for this transaction. This should be // used for recurring transactions. Token string `json:"token,omitempty"` // Track1 contains track 1 magnetic stripe data. Track1 string `json:"track1,omitempty"` // Track2 contains track 2 magnetic stripe data. Track2 string `json:"track2,omitempty"` // PAN contains the primary account number. We recommend using the terminal // or e-commerce tokenization libraries instead of passing account numbers in // directly, as this would put your application in PCI scope. PAN string `json:"pan,omitempty"` // RoutingNumber is the ACH routing number for ACH transactions. RoutingNumber string `json:"routingNumber,omitempty"` // CardholderName is the cardholder name. Only required if the request // includes a primary account number or track data. CardholderName string `json:"cardholderName,omitempty"` // ExpMonth is the card expiration month for use with PAN based transactions. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year for use with PAN based transactions. ExpYear string `json:"expYear,omitempty"` // CVV is the card CVV for use with PAN based transactions. CVV string `json:"cvv,omitempty"` // Address is the cardholder address for use with address verification. Address string `json:"address,omitempty"` // PostalCode is the cardholder postal code for use with address // verification. PostalCode string `json:"postalCode,omitempty"` // ManualEntry specifies that the payment entry method is a manual keyed // transaction. If this is true, no other payment method will be accepted. ManualEntry bool `json:"manualEntry,omitempty"` // KSN is the key serial number used for DUKPT encryption. KSN string `json:"ksn,omitempty"` // PINBlock is the encrypted pin block. PINBlock string `json:"pinBlock,omitempty"` // CardType designates categories of cards: credit, debit, EBT. CardType CardType `json:"cardType,omitempty"` // PaymentType designates brands of payment methods: Visa, Discover, etc. PaymentType string `json:"paymentType,omitempty"` // TransactionID is the ID of the previous transaction being referenced. TransactionID string `json:"transactionId"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the requested amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool `json:"surcharge"` // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool `json:"cashDiscount"` // SigFile is a location on the filesystem which a customer signature should // be written to. SigFile string `json:"sigFile,omitempty"` // SigFormat specifies the image format to be used for returning signatures. SigFormat SignatureFormat `json:"sigFormat,omitempty"` // SigWidth is the width that the signature image should be scaled to, // preserving the aspect ratio. If not provided, the signature is returned in // the terminal's max resolution. SigWidth int `json:"sigWidth,omitempty"` // DisableSignature specifies whether or not signature prompt should be // skipped on the terminal. The terminal will indicate whether or not a // signature is required by the card in the receipt suggestions response. DisableSignature bool `json:"disableSignature,omitempty"` // TipAmount is the tip amount. TipAmount string `json:"tipAmount,omitempty"` // TaxAmount is the tax amount. TaxAmount string `json:"taxAmount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // OnlineAuthCode is used to validate online gift card authorizations. OnlineAuthCode string `json:"onlineAuthCode,omitempty"` // Enroll indicates that the payment method should be added to the token // vault alongside the authorization. Enroll bool `json:"enroll,omitempty"` // Description contains a narrative description of the transaction. Description string `json:"description,omitempty"` // PromptForTip indicates that the terminal should request a tip from the // user before starting the transaction. PromptForTip bool `json:"promptForTip,omitempty"` // CashBackEnabled indicates that cash back should be enabled for supported // cards. CashBackEnabled bool `json:"cashBackEnabled,omitempty"` // AltPrices is a map of alternate currencies and the price in each currency. // Use only if you want to set your own exchange rate for a crypto // transaction. AltPrices map[string]string `json:"altPrices,omitempty"` // Customer contains customer information. Customer *Customer `json:"customer"` // RoundingMode indicates how partial pennies should be rounded for // calculated values like surcharges. Rounding up is the default behavior. RoundingMode *RoundingMode `json:"roundingMode"` // Healthcare contains details for HSA/FSA transactions. Healthcare *Healthcare `json:"healthcare,omitempty"` // Cryptocurrency indicates that the transaction should be a cryptocurrency // transaction. Value should be a crypto currency code (ETH, BTC) or ANY to // prompt the user to choose from supported cryptocurrencies. Cryptocurrency *string `json:"cryptocurrency,omitempty"` // CryptoNetwork is an optional parameter that can be used to force a crypto // transaction onto a level one or level two network. Valid values are L1 and // L2. Defaults to L1. CryptoNetwork *string `json:"cryptoNetwork,omitempty"` // CryptoReceiveAddress can be used to specify a specific receive address for // a crypto transaction. Disabled by default. This should only be used by // sophisticated users with access to properly configured hot wallets. CryptoReceiveAddress *string `json:"cryptoReceiveAddress,omitempty"` // PaymentRequestLabel can optionally add a label to the payment request if // the target cryptocurrency supports labels. Defaults to the merchant's DBA // Name. PaymentRequestLabel *string `json:"paymentRequestLabel,omitempty"` // PaymentRequestMessage can optionally add a message to the payment request // if the target cryptocurrency supports labels. Defaults to empty. PaymentRequestMessage *string `json:"paymentRequestMessage,omitempty"` // SimulateChipRejection instructs the terminal to simulate a post auth chip // rejection that would trigger an automatic reversal. SimulateChipRejection bool `json:"simulateChipRejection,omitempty"` // SimulateOutOfOrderReversal instructs the terminal to simulate an out of // order automatic reversal. SimulateOutOfOrderReversal bool `json:"simulateOutOfOrderReversal,omitempty"` // AsyncReversals causes auto-reversals on the terminal to be executed // asyncronously. Use with caution and in conjunction with the transaction // status API. AsyncReversals bool `json:"asyncReversals,omitempty"` }
AuthorizationRequest contains an authorization request for a charge, preauth, or reverse transaction.
type AuthorizationResponse ¶
type AuthorizationResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Approved indicates that the transaction was approved. Approved bool `json:"approved"` // AuthCode is the auth code from the payment network. AuthCode string `json:"authCode,omitempty"` // AuthResponseCode is the code returned by the terminal or the card issuer // to indicate the disposition of the message. AuthResponseCode string `json:"authResponseCode,omitempty"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // PartialAuth indicates whether or not the transaction was approved for a // partial amount. PartialAuth bool `json:"partialAuth"` // AltCurrency indicates whether or not an alternate currency was used. AltCurrency bool `json:"altCurrency"` // FSAAuth indicates whether or not a request was settled on an FSA card. FSAAuth bool `json:"fsaAuth"` // CurrencyCode is the currency code used for the transaction. CurrencyCode string `json:"currencyCode"` // RequestedAmount is the requested amount. RequestedAmount string `json:"requestedAmount"` // AuthorizedAmount is the authorized amount. May not match the requested // amount in the event of a partial auth. AuthorizedAmount string `json:"authorizedAmount"` // RemainingBalance is the remaining balance on the payment method. RemainingBalance string `json:"remainingBalance"` // TipAmount is the tip amount. TipAmount string `json:"tipAmount"` // TaxAmount is the tax amount. TaxAmount string `json:"taxAmount"` // RequestedCashBackAmount is the cash back amount the customer requested // during the transaction. RequestedCashBackAmount string `json:"requestedCashBackAmount"` // AuthorizedCashBackAmount is the amount of cash back authorized by the // gateway. This amount will be the entire amount requested, or zero. AuthorizedCashBackAmount string `json:"authorizedCashBackAmount"` // Confirmed indicates that the transaction has met the standard criteria for // confirmation on the network. (For example, 6 confirmations for level one // bitcoin.) Confirmed bool `json:"confirmed"` // CryptoAuthorizedAmount is the amount submitted to the blockchain. CryptoAuthorizedAmount string `json:"cryptoAuthorizedAmount"` // CryptoNetworkFee is the network level fee assessed for the transaction // denominated in cryptocurrency. This fee goes to channel operators and // crypto miners, not BlockChyp. CryptoNetworkFee string `json:"cryptoNetworkFee"` // Cryptocurrency is the three letter cryptocurrency code used for the // transactions. Cryptocurrency string `json:"cryptocurrency"` // CryptoNetwork indicates whether or not the transaction was processed on // the level one or level two network. CryptoNetwork string `json:"cryptoNetwork"` // CryptoReceiveAddress the address on the crypto network the transaction was // sent to. CryptoReceiveAddress string `json:"cryptoReceiveAddress"` // CryptoBlock hash or other identifier that identifies the block on the // cryptocurrency network, if available or relevant. CryptoBlock string `json:"cryptoBlock"` // CryptoTransactionID hash or other transaction identifier that identifies // the transaction on the cryptocurrency network, if available or relevant. CryptoTransactionID string `json:"cryptoTransactionId"` // CryptoPaymentRequest is the payment request URI used for the transaction, // if available. CryptoPaymentRequest string `json:"cryptoPaymentRequest"` // CryptoStatus is used for additional status information related to crypto // transactions. CryptoStatus string `json:"cryptoStatus"` // Token is the payment token, if the payment was enrolled in the vault. Token string `json:"token,omitempty"` // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string `json:"entryMethod,omitempty"` // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string `json:"paymentType,omitempty"` // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string `json:"network,omitempty"` // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string `json:"logo,omitempty"` // MaskedPAN is the masked primary account number. MaskedPAN string `json:"maskedPan,omitempty"` // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string `json:"publicKey,omitempty"` // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool `json:"ScopeAlert,omitempty"` // CardHolder is the cardholder name. CardHolder string `json:"cardHolder,omitempty"` // ExpMonth is the card expiration month in MM format. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year in YY format. ExpYear string `json:"expYear,omitempty"` // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse `json:"avsResponse"` // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions `json:"receiptSuggestions"` // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer `json:"customer"` // Customers contains customer data, if any. Customers []Customer `json:"customers"` // SigFile contains the hex encoded signature data. SigFile string `json:"sigFile,omitempty"` // WhiteListedCard contains card BIN ranges can be whitelisted so that they // are read instead of being processed directly. This is useful for // integration with legacy gift card systems. WhiteListedCard *WhiteListedCard `json:"whiteListedCard"` // StoreAndForward indicates that the transaction was flagged for store and // forward due to network problems. StoreAndForward bool `json:"storeAndForward"` // Status indicates the current status of a transaction. Status string `json:"status"` }
AuthorizationResponse contains the response to an authorization request.
type BalanceRequest ¶
type BalanceRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token is the payment token to be used for this transaction. This should be // used for recurring transactions. Token string `json:"token,omitempty"` // Track1 contains track 1 magnetic stripe data. Track1 string `json:"track1,omitempty"` // Track2 contains track 2 magnetic stripe data. Track2 string `json:"track2,omitempty"` // PAN contains the primary account number. We recommend using the terminal // or e-commerce tokenization libraries instead of passing account numbers in // directly, as this would put your application in PCI scope. PAN string `json:"pan,omitempty"` // RoutingNumber is the ACH routing number for ACH transactions. RoutingNumber string `json:"routingNumber,omitempty"` // CardholderName is the cardholder name. Only required if the request // includes a primary account number or track data. CardholderName string `json:"cardholderName,omitempty"` // ExpMonth is the card expiration month for use with PAN based transactions. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year for use with PAN based transactions. ExpYear string `json:"expYear,omitempty"` // CVV is the card CVV for use with PAN based transactions. CVV string `json:"cvv,omitempty"` // Address is the cardholder address for use with address verification. Address string `json:"address,omitempty"` // PostalCode is the cardholder postal code for use with address // verification. PostalCode string `json:"postalCode,omitempty"` // ManualEntry specifies that the payment entry method is a manual keyed // transaction. If this is true, no other payment method will be accepted. ManualEntry bool `json:"manualEntry,omitempty"` // KSN is the key serial number used for DUKPT encryption. KSN string `json:"ksn,omitempty"` // PINBlock is the encrypted pin block. PINBlock string `json:"pinBlock,omitempty"` // CardType designates categories of cards: credit, debit, EBT. CardType CardType `json:"cardType,omitempty"` // PaymentType designates brands of payment methods: Visa, Discover, etc. PaymentType string `json:"paymentType,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
BalanceRequest contains a request for the remaining balance on a payment type.
type BalanceResponse ¶
type BalanceResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // Token is the payment token, if the payment was enrolled in the vault. Token string `json:"token,omitempty"` // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string `json:"entryMethod,omitempty"` // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string `json:"paymentType,omitempty"` // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string `json:"network,omitempty"` // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string `json:"logo,omitempty"` // MaskedPAN is the masked primary account number. MaskedPAN string `json:"maskedPan,omitempty"` // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string `json:"publicKey,omitempty"` // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool `json:"ScopeAlert,omitempty"` // CardHolder is the cardholder name. CardHolder string `json:"cardHolder,omitempty"` // ExpMonth is the card expiration month in MM format. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year in YY format. ExpYear string `json:"expYear,omitempty"` // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse `json:"avsResponse"` // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions `json:"receiptSuggestions"` // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer `json:"customer"` // Customers contains customer data, if any. Customers []Customer `json:"customers"` // RemainingBalance remaining balance on the payment method. RemainingBalance string `json:"remainingBalance,omitempty"` }
BalanceResponse contains the response to a balance request.
type BankAccount ¶
type BankAccount struct { // ID is the account identifier to be used with authorization requests. ID string `json:"id"` // Name is the name of the account. Name string `json:"name"` // Purpose is the purpose of the account. Purpose string `json:"purpose"` // MaskedAccountNumber is the masked account number. MaskedAccountNumber string `json:"maskedAccountNumber"` }
BankAccount models meta data about a merchant bank account.
type BatchDetailsRequest ¶
type BatchDetailsRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // BatchID id for the batch to be retrieved. BatchID string `json:"batchId"` }
BatchDetailsRequest models a request for details about a single batch.
type BatchDetailsResponse ¶
type BatchDetailsResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates that the response came from the test gateway. Test bool `json:"test"` // BatchID batch identifier. BatchID string `json:"batchId"` // EntryMethod entry method for the batch, if any. EntryMethod string `json:"entryMethod"` // DestinationAccountID merchant deposit account into which proceeds should // be deposited. DestinationAccountID string `json:"destinationAccountId"` // CapturedAmount is the new captured amount. CapturedAmount string `json:"capturedAmount"` // OpenPreauths preauths from this batch still open. OpenPreauths string `json:"openPreauths"` // TotalVolume is the total volume from this batch. TotalVolume string `json:"totalVolume"` // TransactionCount is the total number of transactions in this batch. TransactionCount int `json:"transactionCount"` // GiftCardsSold is the total volume of gift cards sold. GiftCardsSold string `json:"giftCardsSold"` // GiftCardVolume is the total volume of gift cards transactions. GiftCardVolume string `json:"giftCardVolume"` // ExpectedDeposit is the expected volume for this batch, usually captured // volume less gift card volume. ExpectedDeposit string `json:"expectedDeposit"` // Open flag indicating whether or not the batch is open. Open bool `json:"open"` // OpenDate date and time of the first transaction for this batch. OpenDate time.Time `json:"openDate"` // CloseDate date and time the batch was closed. CloseDate time.Time `json:"closeDate"` // VolumeByTerminal merchant's batch history in descending order. VolumeByTerminal []TerminalVolume `json:"volumeByTerminal"` }
BatchDetailsResponse models a response for details about a single batch.
type BatchHistoryRequest ¶
type BatchHistoryRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // StartDate optional start date filter for batch history. StartDate time.Time `json:"startDate"` // EndDate optional end date filter for batch history. EndDate time.Time `json:"endDate"` // MaxResults max results to be returned by this request. Defaults to the // system max of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for results to be returned. StartIndex int `json:"startIndex"` }
BatchHistoryRequest models a batch history request.
type BatchHistoryResponse ¶
type BatchHistoryResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates that the response came from the test gateway. Test bool `json:"test"` // StartDate start date if filtered by start date. StartDate time.Time `json:"startDate"` // EndDate end date if filtered by end date. EndDate time.Time `json:"endDate"` // Batches merchant's batch history in descending order. Batches []BatchSummary `json:"batches"` // MaxResults max results from the original request echoed back. MaxResults int `json:"maxResults"` // StartIndex starting index from the original request echoed back. StartIndex int `json:"startIndex"` // TotalResultCount total number of results accessible through paging. TotalResultCount int `json:"totalResultCount"` }
BatchHistoryResponse models response to a batch history request.
type BatchSummary ¶
type BatchSummary struct { // BatchID batch identifier. BatchID string `json:"batchId"` // EntryMethod entry method for the batch, if any. EntryMethod string `json:"entryMethod"` // DestinationAccountID merchant deposit account into which proceeds should // be deposited. DestinationAccountID string `json:"destinationAccountId"` // CapturedAmount is the new captured amount. CapturedAmount string `json:"capturedAmount"` // OpenPreauths is the amount of preauths opened during the batch that have // not been captured. OpenPreauths string `json:"openPreauths"` // CurrencyCode is the currency the batch was settled in. CurrencyCode string `json:"currencyCode"` // Open flag indicating whether or not the batch is open. Open bool `json:"open"` // OpenDate date and time of the first transaction for this batch. OpenDate time.Time `json:"openDate"` // CloseDate date and time the batch was closed. CloseDate time.Time `json:"closeDate"` }
BatchSummary models high level information about a single batch.
type BooleanPromptRequest ¶
type BooleanPromptRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // YesCaption is the preferred caption for the 'yes' button. YesCaption string `json:"yesCaption"` // NoCaption is the preferred caption for the 'no' button. NoCaption string `json:"noCaption"` // Prompt is the text to be displayed on the terminal. Prompt string `json:"prompt"` }
BooleanPromptRequest contains a simple yes no prompt request.
type BooleanPromptResponse ¶
type BooleanPromptResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Response is the boolean prompt response. Response bool `json:"response"` }
BooleanPromptResponse contains the response to a boolean prompt request.
type BrandingAsset ¶
type BrandingAsset struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID id used to track a branding asset. ID string `json:"id"` // OwnerID is the id owner of the tenant who owns the branding asset. OwnerID string `json:"ownerId"` // TerminalID is the terminal id if this branding asset is specific to a // single terminal. TerminalID string `json:"terminalId"` // TerminalGroupID is the terminal group id if this branding asset is // specific to a terminal group. TerminalGroupID string `json:"terminalGroupId"` // MerchantID is the merchant id associated with this branding asset. MerchantID string `json:"merchantId"` // OrganizationID is the organization id associated with this branding asset. OrganizationID string `json:"organizationId"` // PartnerID is the partner id associated with this branding asset. PartnerID string `json:"partnerId"` // SlideShowID is the slide show associated with this branding asset, if any. // A branding asset can reference a slide show or media asset, but not both. SlideShowID string `json:"slideShowId"` // MediaID is the media id associated with this branding asset, if any. A // branding asset can reference a slide show or media asset, but not both. MediaID string `json:"mediaId"` // Padded applies standard margins to images displayed on terminals. Usually // the best option for logos. Padded bool `json:"padded"` // StartDate is the start date if this asset should be displayed based on a // schedule. Format: MM/DD/YYYY. StartDate string `json:"startDate"` // EndDate is the end date if this asset should be displayed based on a // schedule. Format: MM/DD/YYYY. EndDate string `json:"endDate"` // DaysOfWeek is an array of days of the week during which a branding asset // should be enabled. Days of the week are coded as integers starting with // Sunday (0) and ending with Saturday (6). DaysOfWeek []time.Weekday `json:"daysOfWeek"` // StartTime is the start date if this asset should be displayed based on a // schedule. Format: MM/DD/YYYY. StartTime string `json:"startTime"` // EndTime is the end date if this asset should be displayed based on a // schedule. Format: MM/DD/YYYY. EndTime string `json:"endTime"` // Ordinal is the ordinal number marking the position of this asset within // the branding stack. Ordinal int `json:"ordinal"` // Enabled enables the asset for display. Enabled bool `json:"enabled"` // Preview if true, the asset will be displayed in the merchant portal, but // not on merchant terminal hardware. Developers will usually want this to // always be false. Preview bool `json:"preview"` // UserID id of the user who created this branding asset, if applicable. UserID string `json:"userId"` // UserName name of the user who created this branding asset, if applicable. UserName string `json:"userName"` // Thumbnail the fully qualified URL of the thumbnail image for this branding // asset. Thumbnail string `json:"thumbnail"` // LastModified is the time and date this asset was last modified. LastModified string `json:"lastModified"` // Notes is a field for notes related to a branding asset. Notes string `json:"notes"` // Editable if true, the API credentials used to retrieve the branding asset // record can be used to update it. Editable bool `json:"editable"` // AssetType is the type of branding asset. AssetType string `json:"assetType"` // OwnerType is the type of user or tenant that owns this asset. OwnerType string `json:"ownerType"` // OwnerTypeCaption is a recommended caption for displaying the owner. Takes // into account multiple organization types. OwnerTypeCaption string `json:"ownerTypeCaption"` // OwnerName is the name of the tenant or entity that owns the branding // asset. OwnerName string `json:"ownerName"` // PreviewImage is the recommended image to be displayed when rendering a // preview of this branding asset. PreviewImage string `json:"previewImage"` // NarrativeEffectiveDates is a compact narrative string explaining the // effective date and time rules for a branding asset. NarrativeEffectiveDates string `json:"narrativeEffectiveDates"` // NarrativeDisplayPeriod is a compact narrative string explaining the // display period for a branding asset. NarrativeDisplayPeriod string `json:"narrativeDisplayPeriod"` }
BrandingAsset models the priority and display settings for terminal media.
type BrandingAssetRequest ¶
type BrandingAssetRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // AssetID id used to track a branding asset. AssetID string `json:"assetId"` }
BrandingAssetRequest models a request to retrieve or manipulate terminal slide shows.
type BrandingAssetResponse ¶
type BrandingAssetResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // OwnerID is the id owner of this branding stack. OwnerID string `json:"ownerId"` // OwnerType is the type of user or tenant that owns this branding stack. OwnerType string `json:"ownerType"` // OwnerName is the name of the entity or tenant that owns this branding // stack. OwnerName string `json:"ownerName"` // LevelName is the owner level currently being displayed. LevelName string `json:"levelName"` // NarrativeTime is a narrative description of the current simulate time. NarrativeTime string `json:"narrativeTime"` // ActiveAsset is the asset currently displayed on the terminal. ActiveAsset BrandingAsset `json:"activeAsset"` // Results enumerates all branding assets in a given credential scope. Results []BrandingAsset `json:"results"` }
BrandingAssetResponse models a branding asset response.
type CancelPaymentLinkRequest ¶
type CancelPaymentLinkRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // LinkCode is the payment link code to cancel. LinkCode string `json:"linkCode"` }
CancelPaymentLinkRequest cancels a pending payment link. Payment links that have already been used cannot be canceled and the request will be rejected.
type CancelPaymentLinkResponse ¶
type CancelPaymentLinkResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` }
CancelPaymentLinkResponse indicates success or failure of a payment link cancellation.
type CaptureRequest ¶
type CaptureRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TransactionID is the ID of the previous transaction being referenced. TransactionID string `json:"transactionId"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the requested amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool `json:"surcharge"` // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool `json:"cashDiscount"` // TipAmount is the tip amount. TipAmount string `json:"tipAmount,omitempty"` // TaxAmount is the tax amount. TaxAmount string `json:"taxAmount,omitempty"` }
CaptureRequest contains the information needed to capture a preauth.
type CaptureResponse ¶
type CaptureResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Approved indicates that the transaction was approved. Approved bool `json:"approved"` // AuthCode is the auth code from the payment network. AuthCode string `json:"authCode,omitempty"` // AuthResponseCode is the code returned by the terminal or the card issuer // to indicate the disposition of the message. AuthResponseCode string `json:"authResponseCode,omitempty"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // PartialAuth indicates whether or not the transaction was approved for a // partial amount. PartialAuth bool `json:"partialAuth"` // AltCurrency indicates whether or not an alternate currency was used. AltCurrency bool `json:"altCurrency"` // FSAAuth indicates whether or not a request was settled on an FSA card. FSAAuth bool `json:"fsaAuth"` // CurrencyCode is the currency code used for the transaction. CurrencyCode string `json:"currencyCode"` // RequestedAmount is the requested amount. RequestedAmount string `json:"requestedAmount"` // AuthorizedAmount is the authorized amount. May not match the requested // amount in the event of a partial auth. AuthorizedAmount string `json:"authorizedAmount"` // RemainingBalance is the remaining balance on the payment method. RemainingBalance string `json:"remainingBalance"` // TipAmount is the tip amount. TipAmount string `json:"tipAmount"` // TaxAmount is the tax amount. TaxAmount string `json:"taxAmount"` // RequestedCashBackAmount is the cash back amount the customer requested // during the transaction. RequestedCashBackAmount string `json:"requestedCashBackAmount"` // AuthorizedCashBackAmount is the amount of cash back authorized by the // gateway. This amount will be the entire amount requested, or zero. AuthorizedCashBackAmount string `json:"authorizedCashBackAmount"` // Token is the payment token, if the payment was enrolled in the vault. Token string `json:"token,omitempty"` // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string `json:"entryMethod,omitempty"` // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string `json:"paymentType,omitempty"` // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string `json:"network,omitempty"` // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string `json:"logo,omitempty"` // MaskedPAN is the masked primary account number. MaskedPAN string `json:"maskedPan,omitempty"` // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string `json:"publicKey,omitempty"` // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool `json:"ScopeAlert,omitempty"` // CardHolder is the cardholder name. CardHolder string `json:"cardHolder,omitempty"` // ExpMonth is the card expiration month in MM format. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year in YY format. ExpYear string `json:"expYear,omitempty"` // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse `json:"avsResponse"` // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions `json:"receiptSuggestions"` // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer `json:"customer"` // Customers contains customer data, if any. Customers []Customer `json:"customers"` }
CaptureResponse contains the response to a capture request.
type CaptureSignatureRequest ¶
type CaptureSignatureRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // SigFile is a location on the filesystem which a customer signature should // be written to. SigFile string `json:"sigFile,omitempty"` // SigFormat specifies the image format to be used for returning signatures. SigFormat SignatureFormat `json:"sigFormat,omitempty"` // SigWidth is the width that the signature image should be scaled to, // preserving the aspect ratio. If not provided, the signature is returned in // the terminal's max resolution. SigWidth int `json:"sigWidth,omitempty"` // DisableSignature specifies whether or not signature prompt should be // skipped on the terminal. The terminal will indicate whether or not a // signature is required by the card in the receipt suggestions response. DisableSignature bool `json:"disableSignature,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
CaptureSignatureRequest contains a request for customer signature data.
type CaptureSignatureResponse ¶
type CaptureSignatureResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // SigFile contains the hex encoded signature data. SigFile string `json:"sigFile,omitempty"` }
CaptureSignatureResponse contains customer signature data.
type CashDiscountRequest ¶
type CashDiscountRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the requested amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool `json:"surcharge"` // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool `json:"cashDiscount"` // RoundingMode indicates how partial pennies should be rounded for // calculated values like surcharges. Rounding up is the default behavior. RoundingMode *RoundingMode `json:"roundingMode"` }
CashDiscountRequest computes the cash discount for a cash discount if enabled.
type CashDiscountResponse ¶
type CashDiscountResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the new calculated total amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is the normal surcharge for a transaction. Will only be returned // if an offsetting cash discount is also returned. Surcharge string `json:"surcharge"` // CashDiscount is the cash discount. Will not be returned in surcharge only // mode. CashDiscount string `json:"cashDiscount"` }
CashDiscountResponse models the results of a cash discount calculation.
type ClearTerminalRequest ¶
type ClearTerminalRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
ClearTerminalRequest contains the information needed to enroll a new payment method in the token vault.
type Client ¶
type Client struct { Credentials APICredentials GatewayHost string DashboardHost string TestGatewayHost string HTTPS bool RouteCache string GatewayTimeout time.Duration TerminalTimeout time.Duration LogRequests bool // contains filtered or unexported fields }
Client is the main interface used by application developers.
func NewClient ¶
func NewClient(creds APICredentials) Client
NewClient returns a default Client configured with the given credentials.
func (*Client) ActivateTerminal ¶
func (client *Client) ActivateTerminal(request TerminalActivationRequest) (*Acknowledgement, error)
ActivateTerminal activates a terminal.
func (*Client) AddTestMerchant ¶
func (client *Client) AddTestMerchant(request AddTestMerchantRequest) (*MerchantProfileResponse, error)
AddTestMerchant adds a test merchant account.
func (*Client) Balance ¶
func (client *Client) Balance(request BalanceRequest) (*BalanceResponse, error)
Balance checks the remaining balance on a payment method.
func (*Client) BatchDetails ¶
func (client *Client) BatchDetails(request BatchDetailsRequest) (*BatchDetailsResponse, error)
BatchDetails returns the batch details for a single batch.
func (*Client) BatchHistory ¶
func (client *Client) BatchHistory(request BatchHistoryRequest) (*BatchHistoryResponse, error)
BatchHistory returns the batch history for a merchant.
func (*Client) BooleanPrompt ¶
func (client *Client) BooleanPrompt(request BooleanPromptRequest) (*BooleanPromptResponse, error)
BooleanPrompt asks the consumer a yes/no question.
func (*Client) CancelPaymentLink ¶
func (client *Client) CancelPaymentLink(request CancelPaymentLinkRequest) (*CancelPaymentLinkResponse, error)
CancelPaymentLink cancels a payment link.
func (*Client) Capture ¶
func (client *Client) Capture(request CaptureRequest) (*CaptureResponse, error)
Capture captures a preauthorization.
func (*Client) CaptureSignature ¶
func (client *Client) CaptureSignature(request CaptureSignatureRequest) (*CaptureSignatureResponse, error)
CaptureSignature captures and returns a signature.
func (*Client) CashDiscount ¶
func (client *Client) CashDiscount(request CashDiscountRequest) (*CashDiscountResponse, error)
CashDiscount calculates the discount for actual cash transactions.
func (*Client) Charge ¶
func (client *Client) Charge(request AuthorizationRequest) (*AuthorizationResponse, error)
Charge executes a standard direct preauth and capture.
func (*Client) Clear ¶
func (client *Client) Clear(request ClearTerminalRequest) (*Acknowledgement, error)
Clear clears the line item display and any in progress transaction.
func (*Client) CloseBatch ¶
func (client *Client) CloseBatch(request CloseBatchRequest) (*CloseBatchResponse, error)
CloseBatch closes the current credit card batch.
func (*Client) Customer ¶
func (client *Client) Customer(request CustomerRequest) (*CustomerResponse, error)
Customer retrieves a customer by id.
func (*Client) CustomerSearch ¶
func (client *Client) CustomerSearch(request CustomerSearchRequest) (*CustomerSearchResponse, error)
CustomerSearch searches the customer database.
func (*Client) DashboardRequest ¶
func (client *Client) DashboardRequest(path, method string, request, response interface{}, requestTimeout interface{}) error
DashboardRequest sends a gateway request with the default timeout.
func (*Client) DashboardUpload ¶
func (client *Client) DashboardUpload(path string, request UploadMetadata, reader io.Reader, response interface{}, requestTimeout interface{}) error
DashboardUpload performs a file upload
func (*Client) DeactivateTerminal ¶
func (client *Client) DeactivateTerminal(request TerminalDeactivationRequest) (*Acknowledgement, error)
DeactivateTerminal deactivates a terminal.
func (*Client) DeleteBrandingAsset ¶
func (client *Client) DeleteBrandingAsset(request BrandingAssetRequest) (*Acknowledgement, error)
DeleteBrandingAsset deletes a branding asset.
func (*Client) DeleteCustomer ¶
func (client *Client) DeleteCustomer(request DeleteCustomerRequest) (*DeleteCustomerResponse, error)
DeleteCustomer deletes a customer record.
func (*Client) DeleteMediaAsset ¶
func (client *Client) DeleteMediaAsset(request MediaRequest) (*Acknowledgement, error)
DeleteMediaAsset deletes a media asset.
func (*Client) DeleteMerchantPlatforms ¶
func (client *Client) DeleteMerchantPlatforms(request MerchantPlatformRequest) (*Acknowledgement, error)
DeleteMerchantPlatforms deletes a boarding platform configuration.
func (*Client) DeleteQueuedTransaction ¶
func (client *Client) DeleteQueuedTransaction(request DeleteQueuedTransactionRequest) (*DeleteQueuedTransactionResponse, error)
DeleteQueuedTransaction deletes a queued transaction from the terminal.
func (*Client) DeleteSlideShow ¶
func (client *Client) DeleteSlideShow(request SlideShowRequest) (*Acknowledgement, error)
DeleteSlideShow deletes a single slide show.
func (*Client) DeleteSurveyQuestion ¶
func (client *Client) DeleteSurveyQuestion(request SurveyQuestionRequest) (*Acknowledgement, error)
DeleteSurveyQuestion deletes a survey question.
func (*Client) DeleteTestMerchant ¶
func (client *Client) DeleteTestMerchant(request MerchantProfileRequest) (*Acknowledgement, error)
DeleteTestMerchant deletes a test merchant account. Supports partner scoped API credentials only. Live merchant accounts cannot be deleted.
func (*Client) DeleteToken ¶
func (client *Client) DeleteToken(request DeleteTokenRequest) (*DeleteTokenResponse, error)
DeleteToken deletes a payment token.
func (*Client) Enroll ¶
func (client *Client) Enroll(request EnrollRequest) (*EnrollResponse, error)
Enroll adds a new payment method to the token vault.
func (*Client) ExpireRouteCache ¶
func (client *Client) ExpireRouteCache()
ExpireRouteCache invalidates the route cache to for testing.
func (*Client) GatewayGet ¶
GatewayGet retrieves a get request from the api gateway.
func (*Client) GatewayPost ¶
func (client *Client) GatewayPost(path string, requestEntity interface{}, responseEntity interface{}, testTx bool) error
GatewayPost posts a request to the api gateway.
func (*Client) GatewayRequest ¶
func (client *Client) GatewayRequest(path, method string, request, response interface{}, testTx bool, requestTimeout interface{}) error
GatewayRequest sends a gateway request with the default timeout.
func (*Client) GetMerchants ¶
func (client *Client) GetMerchants(request GetMerchantsRequest) (*GetMerchantsResponse, error)
GetMerchants adds a test merchant account.
func (*Client) GiftActivate ¶
func (client *Client) GiftActivate(request GiftActivateRequest) (*GiftActivateResponse, error)
GiftActivate activates or recharges a gift card.
func (*Client) InviteMerchantUser ¶
func (client *Client) InviteMerchantUser(request InviteMerchantUserRequest) (*Acknowledgement, error)
InviteMerchantUser invites a user to join a merchant account.
func (*Client) LinkToken ¶
func (client *Client) LinkToken(request LinkTokenRequest) (*Acknowledgement, error)
LinkToken links a token to a customer record.
func (*Client) ListQueuedTransactions ¶
func (client *Client) ListQueuedTransactions(request ListQueuedTransactionsRequest) (*ListQueuedTransactionsResponse, error)
ListQueuedTransactions returns a list of queued transactions on a terminal.
func (*Client) Locate ¶
func (client *Client) Locate(request LocateRequest) (*LocateResponse, error)
Locate returns routing and location data for a payment terminal.
func (*Client) Media ¶
func (client *Client) Media(request MediaRequest) (*MediaLibraryResponse, error)
Media returns the media library for a given partner, merchant, or organization.
func (*Client) MediaAsset ¶
func (client *Client) MediaAsset(request MediaRequest) (*MediaMetadata, error)
MediaAsset returns the media details for a single media asset.
func (*Client) MerchantPlatforms ¶
func (client *Client) MerchantPlatforms(request MerchantProfileRequest) (*MerchantPlatformsResponse, error)
MerchantPlatforms list all merchant platforms configured for a gateway merchant.
func (*Client) MerchantProfile ¶
func (client *Client) MerchantProfile(request MerchantProfileRequest) (*MerchantProfileResponse, error)
MerchantProfile returns profile information for a merchant.
func (*Client) MerchantUsers ¶
func (client *Client) MerchantUsers(request MerchantProfileRequest) (*MerchantUsersResponse, error)
MerchantUsers list all active users and pending invites for a merchant account.
func (*Client) Message ¶
func (client *Client) Message(request MessageRequest) (*Acknowledgement, error)
Message displays a short message on the terminal.
func (*Client) NewTransactionDisplay ¶
func (client *Client) NewTransactionDisplay(request TransactionDisplayRequest) (*Acknowledgement, error)
NewTransactionDisplay displays a new transaction on the terminal.
func (*Client) Ping ¶
func (client *Client) Ping(request PingRequest) (*PingResponse, error)
Ping tests connectivity with a payment terminal.
func (*Client) Preauth ¶
func (client *Client) Preauth(request AuthorizationRequest) (*AuthorizationResponse, error)
Preauth executes a preauthorization intended to be captured later.
func (*Client) Reboot ¶
func (client *Client) Reboot(request PingRequest) (*Acknowledgement, error)
Reboot reboot a payment terminal.
func (*Client) Refund ¶
func (client *Client) Refund(request RefundRequest) (*AuthorizationResponse, error)
Refund executes a refund.
func (*Client) RelayRequest ¶
func (client *Client) RelayRequest(path, method string, request, response interface{}, testTx bool, requestTimeout interface{}) error
RelayRequest sends a request to the gateway to be relayed to a terminal.
func (*Client) Reverse ¶
func (client *Client) Reverse(request AuthorizationRequest) (*AuthorizationResponse, error)
Reverse executes a manual time out reversal.
We love time out reversals. Don't be afraid to use them whenever a request to a BlockChyp terminal times out. You have up to two minutes to reverse any transaction. The only caveat is that you must assign transactionRef values when you build the original request. Otherwise, we have no real way of knowing which transaction you're trying to reverse because we may not have assigned it an id yet. And if we did assign it an id, you wouldn't know what it is because your request to the terminal timed out before you got a response.
func (*Client) SendPaymentLink ¶
func (client *Client) SendPaymentLink(request PaymentLinkRequest) (*PaymentLinkResponse, error)
SendPaymentLink creates and send a payment link to a customer.
func (*Client) SlideShow ¶
func (client *Client) SlideShow(request SlideShowRequest) (*SlideShow, error)
SlideShow returns a single slide show with slides.
func (*Client) SlideShows ¶
func (client *Client) SlideShows(request SlideShowRequest) (*SlideShowResponse, error)
SlideShows returns a collection of slide shows.
func (*Client) SurveyQuestion ¶
func (client *Client) SurveyQuestion(request SurveyQuestionRequest) (*SurveyQuestion, error)
SurveyQuestion returns a single survey question with response data.
func (*Client) SurveyQuestions ¶
func (client *Client) SurveyQuestions(request SurveyQuestionRequest) (*SurveyQuestionResponse, error)
SurveyQuestions returns all survey questions for a given merchant.
func (*Client) SurveyResults ¶
func (client *Client) SurveyResults(request SurveyResultsRequest) (*SurveyQuestion, error)
SurveyResults returns results for a single survey question.
func (*Client) TCDeleteTemplate ¶
func (client *Client) TCDeleteTemplate(request TermsAndConditionsTemplateRequest) (*Acknowledgement, error)
TCDeleteTemplate deletes a single terms and conditions template.
func (*Client) TCEntry ¶
func (client *Client) TCEntry(request TermsAndConditionsLogRequest) (*TermsAndConditionsLogEntry, error)
TCEntry returns a single detailed Terms and Conditions entry.
func (*Client) TCLog ¶
func (client *Client) TCLog(request TermsAndConditionsLogRequest) (*TermsAndConditionsLogResponse, error)
TCLog returns up to 250 entries from the Terms and Conditions log.
func (*Client) TCTemplate ¶
func (client *Client) TCTemplate(request TermsAndConditionsTemplateRequest) (*TermsAndConditionsTemplate, error)
TCTemplate returns a single terms and conditions template.
func (*Client) TCTemplates ¶
func (client *Client) TCTemplates(request TermsAndConditionsTemplateRequest) (*TermsAndConditionsTemplateResponse, error)
TCTemplates returns a list of terms and conditions templates associated with a merchant account.
func (*Client) TCUpdateTemplate ¶
func (client *Client) TCUpdateTemplate(request TermsAndConditionsTemplate) (*TermsAndConditionsTemplate, error)
TCUpdateTemplate updates or creates a terms and conditions template.
func (*Client) TerminalBranding ¶
func (client *Client) TerminalBranding(request BrandingAssetRequest) (*BrandingAssetResponse, error)
TerminalBranding returns the terminal branding stack for a given set of API credentials.
func (*Client) TerminalStatus ¶
func (client *Client) TerminalStatus(request TerminalStatusRequest) (*TerminalStatusResponse, error)
TerminalStatus returns the current status of a terminal.
func (*Client) Terminals ¶
func (client *Client) Terminals(request TerminalProfileRequest) (*TerminalProfileResponse, error)
Terminals returns all terminals associated with the merchant account.
func (*Client) TermsAndConditions ¶
func (client *Client) TermsAndConditions(request TermsAndConditionsRequest) (*TermsAndConditionsResponse, error)
TermsAndConditions prompts the user to accept terms and conditions.
func (*Client) TextPrompt ¶
func (client *Client) TextPrompt(request TextPromptRequest) (*TextPromptResponse, error)
TextPrompt asks the consumer a text based question.
func (*Client) TokenMetadata ¶
func (client *Client) TokenMetadata(request TokenMetadataRequest) (*TokenMetadataResponse, error)
TokenMetadata retrieves payment token metadata.
func (*Client) TransactionHistory ¶
func (client *Client) TransactionHistory(request TransactionHistoryRequest) (*TransactionHistoryResponse, error)
TransactionHistory returns the transaction history for a merchant.
func (*Client) TransactionStatus ¶
func (client *Client) TransactionStatus(request TransactionStatusRequest) (*AuthorizationResponse, error)
TransactionStatus retrieves the current status of a transaction.
func (*Client) UnlinkToken ¶
func (client *Client) UnlinkToken(request UnlinkTokenRequest) (*Acknowledgement, error)
UnlinkToken removes a link between a customer and a token.
func (*Client) UpdateBrandingAsset ¶
func (client *Client) UpdateBrandingAsset(request BrandingAsset) (*BrandingAsset, error)
UpdateBrandingAsset updates a branding asset.
func (*Client) UpdateCustomer ¶
func (client *Client) UpdateCustomer(request UpdateCustomerRequest) (*CustomerResponse, error)
UpdateCustomer updates or creates a customer record.
func (*Client) UpdateMerchant ¶
func (client *Client) UpdateMerchant(request MerchantProfile) (*MerchantProfileResponse, error)
UpdateMerchant adds or updates a merchant account. Can be used to create or update test merchants. Only gateway partners may create new live merchants.
func (*Client) UpdateMerchantPlatforms ¶
func (client *Client) UpdateMerchantPlatforms(request MerchantPlatform) (*Acknowledgement, error)
UpdateMerchantPlatforms list all merchant platforms configured for a gateway merchant.
func (*Client) UpdateSlideShow ¶
UpdateSlideShow updates or creates a slide show.
func (*Client) UpdateSurveyQuestion ¶
func (client *Client) UpdateSurveyQuestion(request SurveyQuestion) (*SurveyQuestion, error)
UpdateSurveyQuestion updates or creates a survey question.
func (*Client) UpdateTransactionDisplay ¶
func (client *Client) UpdateTransactionDisplay(request TransactionDisplayRequest) (*Acknowledgement, error)
UpdateTransactionDisplay appends items to an existing transaction display. Subtotal, Tax, and Total are overwritten by the request. Items with the same description are combined into groups.
func (*Client) UploadMedia ¶
func (client *Client) UploadMedia(request UploadMetadata, reader io.Reader) (*MediaMetadata, error)
UploadMedia uploads a media asset to the media library.
func (*Client) UploadStatus ¶
func (client *Client) UploadStatus(request UploadStatusRequest) (*UploadStatus, error)
UploadStatus retrieves the current status of a file upload.
func (*Client) Void ¶
func (client *Client) Void(request VoidRequest) (*VoidResponse, error)
Void discards a previous transaction.
type CloseBatchRequest ¶
type CloseBatchRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // BatchID optional batch id. BatchID string `json:"batchId"` }
CloseBatchRequest contains the information needed to manually close a credit card batch.
type CloseBatchResponse ¶
type CloseBatchResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // Batches is a collection of batches closed during the batch close // operation. Batches []BatchSummary `json:"batches"` }
CloseBatchResponse contains the response to a close batch request.
type CommandLineArguments ¶
type CommandLineArguments struct { Type string `args:"type"` //deprecated - use cmd instead Command string `args:"cmd"` ManualEntry bool `arg:"manual"` ConfigFile string `arg:"f"` GatewayHost string `arg:"gateway"` DashboardHost string `arg:"dashboard"` TestGatewayHost string `arg:"testGateway"` Dashboard string `arg:"dashboard"` Test bool `arg:"test"` APIKey string `arg:"apiKey"` BearerToken string `arg:"bearerToken"` SigningKey string `arg:"signingKey"` TransactionRef string `arg:"txRef"` Description string `arg:"desc"` TerminalName string `arg:"terminal"` Token string `arg:"token"` Amount string `arg:"amount"` PromptForTip bool `arg:"promptForTip"` Message string `arg:"message"` TipAmount string `arg:"tip"` TaxAmount string `arg:"tax"` TaxExempt bool `arg:"taxExempt"` CurrencyCode string `arg:"currency"` TransactionID string `arg:"txId"` RouteCache string `arg:"routeCache"` OutputFile string `arg:"out"` SigFormat string `arg:"sigFormat"` SigWidth int `arg:"sigWidth"` SigFile string `arg:"sigFile"` HTTPS bool `arg:"secure"` Version bool `arg:"version"` DisplayTotal string `arg:"displayTotal"` DisplayTax string `arg:"displayTax"` DisplaySubtotal string `arg:"displaySubtotal"` LineItemID string `arg:"lineItemId"` LineItemDescription string `arg:"lineItemDescription"` LineItemPrice string `arg:"lineItemPrice"` LineItemQty string `arg:"lineItemQty"` LineItemExtended string `arg:"lineItemExtended"` LineItemDiscountDescription string `arg:"lineItemDiscountDescription"` LineItemDiscountAmount string `arg:"lineItemDiscountAmount"` Prompt string `arg:"prompt"` PromptType string `arg:"promptType"` YesCaption string `arg:"yesCaption"` NoCaption string `arg:"noCaption"` EBT bool `arg:"ebt"` Debit bool `arg:"debit"` TCAlias string `arg:"tcAlias"` TCName string `arg:"tcName"` TCContent string `arg:"tcContent"` Timeout int `arg:"timeout"` WaitForRemovedCard bool `arg:"waitForRemovedCard"` Force bool `arg:"force"` SigRequired bool `arg:"sigRequired"` CashBackEnabled bool `arg:"cashback"` Enroll bool `arg:"enroll"` EnrollOnly bool `arg:"enrollOnly"` DisableSignature bool `arg:"disableSignature"` CustomerID string `arg:"customerId"` CustomerRef string `arg:"customerRef"` FirstName string `arg:"firstName"` LastName string `arg:"lastName"` CompanyName string `arg:"companyName"` EMailAddress string `arg:"email"` SMSNumber string `arg:"sms"` PAN string `arg:"pan"` ExpiryMonth string `arg:"expMonth"` ExpiryYear string `arg:"expYear"` Subject string `arg:"subject"` AutoSend bool `arg:"autoSend"` OrderRef string `arg:"orderRef"` Query string `arg:"query"` CallbackURL string `arg:"callbackUrl"` Surcharge bool `arg:"surcharge"` CashDiscount bool `arg:"cashDiscount"` PostalCode string `arg:"postalCode"` Address string `arg:"address"` Cashier bool `arg:"cashier"` StartDate string `arg:"startDate"` EndDate string `arg:"endDate"` BatchID string `arg:"batchId"` MaxResults int `arg:"maxResults"` StartIndex int `arg:"startIndex"` Queue bool `arg:"queue"` Async bool `arg:"async"` LogRequests bool `arg:"logRequests"` LinkCode string `arg:"linkCode"` Cryptocurrency string `arg:"crypto"` CryptoNetwork string `arg:"cryptoNetwork"` CryptoReceiveAddress string `arg:"receiveAddress"` Label string `arg:"label"` DBAName string `arg:"dbaName"` MerchantID string `arg:"merchantId"` TerminalID string `arg:"terminalId"` Code string `arg:"code"` TemplateID string `arg:"templateId"` LogEntryID string `arg:"logEntryId"` QuestionID string `arg:"questionId"` IncludeResponseData bool `arg:"includeResponseData"` QuestionType string `arg:"questionType"` QuestionText string `arg:"questionText"` Enabled bool `arg:"enabled"` Ordinal int `arg:"ordinal"` File string `arg:"file"` UploadID string `arg:"uploadId"` MediaID string `arg:"mediaId"` Name string `arg:"name"` Delay int `arg:"delay"` SlideShowID string `arg:"slideShowId"` AssetID string `arg:"assetId"` JSON string `args:"json"` JSONFile string `args:"jsonFile"` Profile string `args:"profile"` QRCodeBinary bool `args:"qrcodeBinary"` QRCodeSize int `args:"qrcodeSize"` DaysToExpiration int `args:"daysToExpiration"` ResetConnection bool `args:"resetConnection"` RoundingMode string `args:"roundingMode"` Channel string `args:"channel"` Full bool `args:"full"` Archive string `args:"archive"` Dist string `args:"dist"` Incremental bool `args:"incremental"` ChipRejection bool `args:"chipRejection"` OutOfOrderReversal bool `args:"outOfOrderReversal"` AsyncReversals bool `args:"asyncReversals"` }
CommandLineArguments contains arguments which are passed in at runtime.
type ConfigSettings ¶
type ConfigSettings struct { APIKey string `json:"apiKey"` BearerToken string `json:"bearerToken"` SigningKey string `json:"signingKey"` GatewayHost string `json:"gatewayHost"` DashboardHost string `json:"dashboardHost"` TestGatewayHost string `json:"testGatewayHost"` Secure bool `json:"https"` RouteCacheTTL int `json:"routeCacheTTL"` GatewayTimeout int `json:"gatewayTimeout"` TerminalTimeout int `json:"terminalTimeout"` }
ConfigSettings contains configuration options for the CLI.
func LoadConfigSettings ¶
func LoadConfigSettings(args CommandLineArguments) (*ConfigSettings, error)
LoadConfigSettings loads settings from the command line and/or the configuration file.
type CoreRequest ¶
type CoreRequest struct { // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool // Force causes a transaction to override any in-progress transactions. Force bool // OrderRef is an identifier from an external point of sale system. OrderRef string // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string }
CoreRequest contains core request fields for a transaction.
func (CoreRequest) From ¶
func (r CoreRequest) From(raw interface{}) (result CoreRequest, ok bool)
From creates an instance of CoreRequest with values from a generic type.
type CoreResponse ¶
type CoreResponse struct { // TransactionID is the ID assigned to the transaction. TransactionID string // BatchID is the ID assigned to the batch. BatchID string // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string // TransactionType is the type of transaction. TransactionType string // Timestamp is the timestamp of the transaction. Timestamp string // TickBlock is the hash of the last tick block. TickBlock string // Test indicates that the transaction was processed on the test gateway. Test bool // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string }
CoreResponse contains core response fields for a transaction.
func (CoreResponse) From ¶
func (r CoreResponse) From(raw interface{}) (result CoreResponse, ok bool)
From creates an instance of CoreResponse with values from a generic type.
type CryptocurrencyResponse ¶
type CryptocurrencyResponse struct { // Confirmed indicates that the transaction has met the standard criteria for // confirmation on the network. (For example, 6 confirmations for level one // bitcoin.) Confirmed bool // CryptoAuthorizedAmount is the amount submitted to the blockchain. CryptoAuthorizedAmount string // CryptoNetworkFee is the network level fee assessed for the transaction // denominated in cryptocurrency. This fee goes to channel operators and // crypto miners, not BlockChyp. CryptoNetworkFee string // Cryptocurrency is the three letter cryptocurrency code used for the // transactions. Cryptocurrency string // CryptoNetwork indicates whether or not the transaction was processed on // the level one or level two network. CryptoNetwork string // CryptoReceiveAddress the address on the crypto network the transaction was // sent to. CryptoReceiveAddress string // CryptoBlock hash or other identifier that identifies the block on the // cryptocurrency network, if available or relevant. CryptoBlock string // CryptoTransactionID hash or other transaction identifier that identifies // the transaction on the cryptocurrency network, if available or relevant. CryptoTransactionID string // CryptoPaymentRequest is the payment request URI used for the transaction, // if available. CryptoPaymentRequest string // CryptoStatus is used for additional status information related to crypto // transactions. CryptoStatus string }
CryptocurrencyResponse contains response details for a cryptocurrency transaction.
func (CryptocurrencyResponse) From ¶
func (r CryptocurrencyResponse) From(raw interface{}) (result CryptocurrencyResponse, ok bool)
From creates an instance of CryptocurrencyResponse with values from a generic type.
type Customer ¶
type Customer struct { // ID BlockChyp assigned customer id. ID string `json:"id"` // CustomerRef optional customer ref that can be used for the client's // system's customer id. CustomerRef string `json:"customerRef"` // FirstName customer's first name. FirstName string `json:"firstName"` // LastName customer's last name. LastName string `json:"lastName"` // CompanyName customer's company name. CompanyName string `json:"companyName"` // EmailAddress customer's email address. EmailAddress string `json:"emailAddress"` // SmsNumber customer's SMS or mobile number. SmsNumber string `json:"smsNumber"` // PaymentMethods model saved payment methods associated with a customer. PaymentMethods []CustomerToken `json:"paymentMethods"` }
Customer models a customer record.
type CustomerRequest ¶
type CustomerRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // CustomerID BlockChyp assigned customer id. CustomerID string `json:"customerId"` // CustomerRef optional customer ref that can be used for the client's // system's customer id. CustomerRef string `json:"customerRef"` }
CustomerRequest models a customer data request.
type CustomerResponse ¶
type CustomerResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Customer the customer record. Customer *Customer `json:"customer"` }
CustomerResponse models a customer data response.
type CustomerSearchRequest ¶
type CustomerSearchRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Query search query for customer searches. Query string `json:"query"` }
CustomerSearchRequest models a customer data search request.
type CustomerSearchResponse ¶
type CustomerSearchResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Customers the customer results matching the search query. Customers []Customer `json:"customers"` }
CustomerSearchResponse models customer search results.
type CustomerToken ¶
type CustomerToken struct { // Token BlockChyp assigned customer id. Token string `json:"token"` // MaskedPAN masked primary account number. MaskedPAN string `json:"maskedPan"` // ExpiryMonth expiration month. ExpiryMonth string `json:"expiryMonth"` // ExpiryYear expiration month. ExpiryYear string `json:"expiryYear"` // PaymentType payment type. PaymentType string `json:"paymentType"` // Customers models customer records associated with a payment token. Customers []Customer `json:"customers"` }
CustomerToken models a customer token.
type DeleteCustomerRequest ¶
type DeleteCustomerRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // CustomerID the ID of the customer to delete. CustomerID string `json:"customerId"` }
DeleteCustomerRequest deletes a customer record.
type DeleteCustomerResponse ¶
type DeleteCustomerResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` }
DeleteCustomerResponse is the response to a delete customer request.
type DeleteQueuedTransactionRequest ¶
type DeleteQueuedTransactionRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // TransactionRef contains a transaction reference string of the transaction // to delete. Passing `*` will clear all queued transactions. TransactionRef string `json:"transactionRef"` }
DeleteQueuedTransactionRequest deletes one or all transactions from a terminal queue.
type DeleteQueuedTransactionResponse ¶
type DeleteQueuedTransactionResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` }
DeleteQueuedTransactionResponse is the response to a delete queued transaction request.
type DeleteTokenRequest ¶
type DeleteTokenRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token the token to delete. Token string `json:"token"` }
DeleteTokenRequest deletes a payment token.
type DeleteTokenResponse ¶
type DeleteTokenResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` }
DeleteTokenResponse is the response to a delete token request.
type DownloadMetaData ¶ added in v1.24.25
type DownloadMetaData struct { URL string `json:"url"` Packages []string `json:"packages"` IncrementalURLs []string `json:"incrementalUrls"` Acknowledgement }
DownloadMetaData contains data required to download and install an archive.
type EnrollRequest ¶
type EnrollRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token is the payment token to be used for this transaction. This should be // used for recurring transactions. Token string `json:"token,omitempty"` // Track1 contains track 1 magnetic stripe data. Track1 string `json:"track1,omitempty"` // Track2 contains track 2 magnetic stripe data. Track2 string `json:"track2,omitempty"` // PAN contains the primary account number. We recommend using the terminal // or e-commerce tokenization libraries instead of passing account numbers in // directly, as this would put your application in PCI scope. PAN string `json:"pan,omitempty"` // RoutingNumber is the ACH routing number for ACH transactions. RoutingNumber string `json:"routingNumber,omitempty"` // CardholderName is the cardholder name. Only required if the request // includes a primary account number or track data. CardholderName string `json:"cardholderName,omitempty"` // ExpMonth is the card expiration month for use with PAN based transactions. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year for use with PAN based transactions. ExpYear string `json:"expYear,omitempty"` // CVV is the card CVV for use with PAN based transactions. CVV string `json:"cvv,omitempty"` // Address is the cardholder address for use with address verification. Address string `json:"address,omitempty"` // PostalCode is the cardholder postal code for use with address // verification. PostalCode string `json:"postalCode,omitempty"` // ManualEntry specifies that the payment entry method is a manual keyed // transaction. If this is true, no other payment method will be accepted. ManualEntry bool `json:"manualEntry,omitempty"` // KSN is the key serial number used for DUKPT encryption. KSN string `json:"ksn,omitempty"` // PINBlock is the encrypted pin block. PINBlock string `json:"pinBlock,omitempty"` // CardType designates categories of cards: credit, debit, EBT. CardType CardType `json:"cardType,omitempty"` // PaymentType designates brands of payment methods: Visa, Discover, etc. PaymentType string `json:"paymentType,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // EntryMethod is the method by which the payment card was entered (MSR, // CHIP, KEYED, etc.). EntryMethod string `json:"entryMethod,omitempty"` // Customer customer with which the new token should be associated. Customer *Customer `json:"customer"` }
EnrollRequest contains the information needed to enroll a new payment method in the token vault.
type EnrollResponse ¶
type EnrollResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Approved indicates that the transaction was approved. Approved bool `json:"approved"` // AuthCode is the auth code from the payment network. AuthCode string `json:"authCode,omitempty"` // AuthResponseCode is the code returned by the terminal or the card issuer // to indicate the disposition of the message. AuthResponseCode string `json:"authResponseCode,omitempty"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // Token is the payment token, if the payment was enrolled in the vault. Token string `json:"token,omitempty"` // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string `json:"entryMethod,omitempty"` // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string `json:"paymentType,omitempty"` // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string `json:"network,omitempty"` // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string `json:"logo,omitempty"` // MaskedPAN is the masked primary account number. MaskedPAN string `json:"maskedPan,omitempty"` // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string `json:"publicKey,omitempty"` // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool `json:"ScopeAlert,omitempty"` // CardHolder is the cardholder name. CardHolder string `json:"cardHolder,omitempty"` // ExpMonth is the card expiration month in MM format. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year in YY format. ExpYear string `json:"expYear,omitempty"` // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse `json:"avsResponse"` // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions `json:"receiptSuggestions"` // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer `json:"customer"` // Customers contains customer data, if any. Customers []Customer `json:"customers"` // SigFile contains the hex encoded signature data. SigFile string `json:"sigFile,omitempty"` }
EnrollResponse contains the response to an enroll request.
type FirmwareMetadata ¶ added in v1.24.25
type FirmwareMetadata struct { Archives []string `json:"archives"` Packages []string `json:"packages"` Acknowledgement }
FirmwareMetadata models a firmware metadata response
type GetMerchantsRequest ¶
type GetMerchantsRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test indicates whether or not to return test or live merchants. Test bool `json:"test"` // MaxResults max to be returned in a single page. Defaults to the system max // of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for paged results. Defaults to zero. StartIndex int `json:"startIndex"` }
GetMerchantsRequest models a request for merchant information.
type GetMerchantsResponse ¶
type GetMerchantsResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates whether or not these results are for test or live // merchants. Test bool `json:"test"` // MaxResults max to be returned in a single page. Defaults to the system max // of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for paged results. Defaults to zero. StartIndex int `json:"startIndex"` // ResultCount total number of results accessible through paging. ResultCount int `json:"resultCount"` // Merchants merchants in the current page of results. Merchants []MerchantProfileResponse `json:"merchants"` }
GetMerchantsResponse contains the results for a merchant list request.
type GiftActivateRequest ¶
type GiftActivateRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the requested amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool `json:"surcharge"` // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool `json:"cashDiscount"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
GiftActivateRequest contains the information needed to activate or recharge a gift card.
type GiftActivateResponse ¶
type GiftActivateResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // Approved indicates that the card was activated. Approved bool `json:"approved"` // Amount is the amount of the transaction. Amount string `json:"amount"` // CurrentBalance is the current balance of the gift card. CurrentBalance string `json:"currentBalance"` // CurrencyCode is the currency code used for the transaction. CurrencyCode string `json:"currencyCode"` // PublicKey is the public key of the activated card. PublicKey string `json:"publicKey"` // MaskedPAN is the masked card identifier. MaskedPAN string `json:"maskedPan,omitempty"` }
GiftActivateResponse contains the response to a gift activate request.
type Healthcare ¶
type Healthcare struct { // Types is a list of healthcare categories in the transaction. Types []HealthcareGroup `json:"types"` // IIASVerified indicates that the purchased items were verified against an // Inventory Information Approval System (IIAS). IIASVerified bool `json:"iiasVerified"` // IIASExempt indicates that the transaction is exempt from IIAS // verification. IIASExempt bool `json:"iiasExempt"` }
Healthcare contains fields for HSA/FSA transactions.
type HealthcareGroup ¶
type HealthcareGroup struct { // Type the type of healthcare cost. Type HealthcareType `json:"type"` // Amount is the amount of this type. Amount string `json:"amount"` // ProviderID the provider ID used for Mastercard and Discover IIAS requests. ProviderID string `json:"providerId"` // ServiceTypeCode the service type code used for Mastercard and Discover // IIAS requests. ServiceTypeCode string `json:"serviceTypeCode"` // PayerOrCarrierID thr payer ID/carrier ID used for Mastercard and Discover // IIAS requests. PayerOrCarrierID string `json:"payerOrCarrierId"` // ApprovalRejectReasonCode the approval or reject reason code used for // Mastercard and Discover IIAS requests. ApprovalRejectReasonCode string `json:"approvalRejectReasonCode"` }
HealthcareGroup is a group of fields for a specific type of healthcare.
type HeartbeatResponse ¶
type HeartbeatResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Timestamp is the timestamp of the heartbeat. Timestamp time.Time `json:"timestamp"` // Clockchain is the public key of the clockchain. This is blockchain stuff // that you don't really need to worry about. It is a base 58 encoded and // compressed eliptic curve public key. For the production clockchain, this // will always be: '3cuhsckVUd9HzMjbdUSW17aY5kCcm1d6YAphJMUwmtXRj7WLyU'. Clockchain string `json:"clockchain"` // LatestTick is the hash of the last tick block. LatestTick string `json:"latestTick"` // MerchantPublicKey is the public key for the merchant's blockchain. MerchantPublicKey string `json:"merchantPk"` }
HeartbeatResponse contains the response to a basic API health check. If the security context permits it, the response may also include the public key of the current merchant.
type InviteMerchantUserRequest ¶
type InviteMerchantUserRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // MerchantID is the merchant id. Optional for merchant scoped requests. MerchantID string `json:"merchantId"` // Email is the email address of the user. Email string `json:"email"` // FirstName is the first name of the new user. FirstName string `json:"firstName"` // LastName is the last name of the new user. LastName string `json:"lastName"` // Roles an optional array of role codes that will be assigned to the user. // If omitted defaults to the default merchant role. Roles []string `json:"roles"` }
InviteMerchantUserRequest models a request for adding a new user to a merchant account.
type LinkTokenRequest ¶
type LinkTokenRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token the token to delete. Token string `json:"token"` // CustomerID BlockChyp assigned customer id. CustomerID string `json:"customerId"` }
LinkTokenRequest links a payment token with a customer record.
type ListQueuedTransactionsRequest ¶
type ListQueuedTransactionsRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
ListQueuedTransactionsRequest returns a list of queued transactions on a terminal.
type ListQueuedTransactionsResponse ¶
type ListQueuedTransactionsResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionRefs is a list of queued transactions on the terminal. TransactionRefs []string `json:"transactionRefs"` }
ListQueuedTransactionsResponse contains a list of queued transactions on a terminal.
type LocateRequest ¶
type LocateRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
LocateRequest contains information needed to retrieve location information for a terminal.
type LocateResponse ¶
type LocateResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // TerminalName is the name assigned to the terminal at activation. TerminalName string `json:"terminalName"` // IPAddress is the local IP address of the terminal. IPAddress string `json:"ipAddress"` // CloudRelay indicates whether or not the terminal is running in cloud relay // mode. CloudRelay bool `json:"cloudRelay"` // PublicKey is the terminal's public key. PublicKey string `json:"publicKey"` }
LocateResponse contains the response to a locate request.
type MediaLibraryResponse ¶
type MediaLibraryResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // MaxResults max to be returned in a single page. Defaults to the system max // of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for paged results. Defaults to zero. StartIndex int `json:"startIndex"` // ResultCount total number of results accessible through paging. ResultCount int `json:"resultCount"` // Results enumerates all media assets available in the context. Results []MediaMetadata `json:"results"` }
MediaLibraryResponse models a media library response.
type MediaMetadata ¶
type MediaMetadata struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID id used to identify the media asset. ID string `json:"id"` // OriginalFile is the original filename assigned to the media asset. OriginalFile string `json:"originalFile"` // Name is the descriptive name of the media asset. Name string `json:"name"` // Description is a description of the media asset and its purpose. Description string `json:"description"` // Tags is an array of tags associated with a media asset. Tags []string `json:"tags"` // FileURL is the url for the full resolution versio of the media file. FileURL string `json:"fileUrl"` // ThumbnailURL is the url for to the thumbnail of an image. ThumbnailURL string `json:"thumbnailUrl"` // Video is an identifier used to flag video files. Video bool `json:"video"` }
MediaMetadata models a request to retrieve survey results.
type MediaRequest ¶
type MediaRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // MediaID id used to track a media asset. MediaID string `json:"mediaId"` }
MediaRequest models a request to retrieve or manipulate media assets.
type MerchantPlatform ¶
type MerchantPlatform struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // ID primary identifier for a given platform configuration. ID string `json:"id"` // Disabled indicates that a platform configuration is disabled. Disabled bool `json:"disabled"` // PlatformCode is BlockChyp's code for the boarding platform. PlatformCode string `json:"platformCode"` // Priority is the platform's priority in a multi platform setup. Priority int `json:"priority"` // RegistrationID is an optional field specifying the merchant's card brand // registration record. RegistrationID string `json:"registrationId"` // MerchantID is the merchant's primary identifier. MerchantID string `json:"merchantId"` // AcquirerMid specifies the merchant id assigned by the acquiring bank. AcquirerMid string `json:"acquirerMid"` // Notes free form notes description the purpose or intent behind the // platform configuration. Notes string `json:"notes"` // EntryMethod is the optional entry method code if a platform should only be // used for specific entry methods. Leave blank for 'all'. EntryMethod string `json:"entryMethod"` // DateCreated is the date the platform configuration was first created. DateCreated string `json:"dateCreated"` // LastChange is the date the platform configuration was last modified. LastChange string `json:"lastChange"` // ConfigMap is a map of configuration values specific to the boarding // platform. These are not published. Contact your BlockChyp rep for // supported values. ConfigMap map[string]string `json:"configMap,omitempty"` }
MerchantPlatform contains details about a merchant board platform configuration.
type MerchantPlatformRequest ¶
type MerchantPlatformRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // PlatformID is the platform configuration id. PlatformID string `json:"platformId"` }
MerchantPlatformRequest models a request related to a platform configuration.
type MerchantPlatformsResponse ¶
type MerchantPlatformsResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates whether or not these results are for test or live // merchants. Test bool `json:"test"` // Results enumerates merchant platform settings. Results []MerchantPlatform `json:"results"` }
MerchantPlatformsResponse contains the results for a merchant platforms inquiry.
type MerchantProfile ¶
type MerchantProfile struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test indicates that the response came from the test gateway. Test bool `json:"test"` // MerchantID is the merchant id. MerchantID string `json:"merchantId"` // CompanyName is the merchant's company name. CompanyName string `json:"companyName"` // DBAName is the dba name of the merchant. DBAName string `json:"dbaName"` // InvoiceName is the name the merchant prefers on payment link invoices. InvoiceName string `json:"invoiceName"` // ContactName is the contact name for the merchant. ContactName string `json:"contactName"` // ContactNumber is the contact number for the merchant. ContactNumber string `json:"contactNumber"` // LocationName is the location name. LocationName string `json:"locationName"` // StoreNumber is the store number. StoreNumber string `json:"storeNumber"` // PartnerRef is the partner assigne reference for this merchant. PartnerRef string `json:"partnerRef"` // TimeZone is the merchant's local time zone. TimeZone string `json:"timeZone"` // BatchCloseTime is the batch close time in the merchant's time zone. BatchCloseTime string `json:"batchCloseTime"` // TerminalUpdateTime is the terminal firmware update time. TerminalUpdateTime string `json:"terminalUpdateTime"` // AutoBatchClose flag indicating whether or not the batch automatically // closes. AutoBatchClose bool `json:"autoBatchClose"` // DisableBatchEmails flag indicating whether or not batch closure emails // should be automatically sent. DisableBatchEmails bool `json:"disableBatchEmails"` // PINEnabled flag indicating whether or not pin entry is enabled. PINEnabled bool `json:"pinEnabled"` // CashBackEnabled flag indicating whether or not cash back is enabled. CashBackEnabled bool `json:"cashBackEnabled"` // StoreAndForwardEnabled flag indicating whether or not store and forward is // enabled. StoreAndForwardEnabled bool `json:"storeAndForwardEnabled"` // PartialAuthEnabled flag indicating whether or not partial authorizations // are supported for this merchant. PartialAuthEnabled bool `json:"partialAuthEnabled"` // SplitBankAccountsEnabled flag indicating whether or not this merchant // support split settlement. SplitBankAccountsEnabled bool `json:"splitBankAccountsEnabled"` // StoreAndForwardFloorLimit floor limit for store and forward transactions. StoreAndForwardFloorLimit string `json:"storeAndForwardFloorLimit"` // PublicKey is the blockchyp public key for this merchant. PublicKey string `json:"publicKey"` // Status is the underwriting/processing status for the the merchant. Status string `json:"status"` // CashDiscountEnabled enables cash discount or surcharging. CashDiscountEnabled bool `json:"cashDiscountEnabled"` // SurveyTimeout is the post transaction survey timeout in seconds. SurveyTimeout int `json:"surveyTimeout"` // CooldownTimeout is time a transaction result is displayed on a terminal // before the terminal is automatically cleared in seconds. CooldownTimeout int `json:"cooldownTimeout"` // TipEnabled indicates that tips are enabled for a merchant account. TipEnabled bool `json:"tipEnabled"` // PromptForTip indicates that tips should be automatically prompted for // after charge and preauth transactions. PromptForTip bool `json:"promptForTip"` // TipDefaults three default values for tips. Can be provided as a percentage // if a percent sign is provided. Otherwise the values are assumed to be // basis points. TipDefaults []string `json:"tipDefaults"` // CashbackPresets four default values for cashback prompts. CashbackPresets []string `json:"cashbackPresets"` // EBTEnabled indicates that EBT cards are enabled. EBTEnabled bool `json:"ebtEnabled"` // FreeRangeRefundsEnabled indicates that refunds without transaction // references are permitted. FreeRangeRefundsEnabled bool `json:"freeRangeRefundsEnabled"` // PINBypassEnabled indicates that pin bypass is enabled. PINBypassEnabled bool `json:"pinBypassEnabled"` // GiftCardsDisabled indicates that gift cards are disabled. GiftCardsDisabled bool `json:"giftCardsDisabled"` // TCDisabled disables terms and conditions pages in the merchant UI. TCDisabled bool `json:"tcDisabled"` // DigitalSignaturesEnabled indicates that digital signature capture is // enabled. DigitalSignaturesEnabled bool `json:"digitalSignaturesEnabled"` // DigitalSignatureReversal indicates that transactions should auto-reverse // when signatures are refused. DigitalSignatureReversal bool `json:"digitalSignatureReversal"` // BillingAddress is the address to be used for billing correspondence. BillingAddress Address `json:"billingAddress"` // ShippingAddress is the address to be used for shipping. ShippingAddress Address `json:"shippingAddress"` // Visa indicates that Visa cards are supported. Visa bool `json:"visa"` // MasterCard indicates that MasterCard is supported. MasterCard bool `json:"masterCard"` // AMEX indicates that American Express is supported. AMEX bool `json:"amex"` // Discover indicates that Discover cards are supported. Discover bool `json:"discover"` // JCB indicates that JCB (Japan Card Bureau) cards are supported. JCB bool `json:"jcb"` // UnionPay indicates that China Union Pay cards are supported. UnionPay bool `json:"unionPay"` // ContactlessEMV indicates that contactless EMV cards are supported. ContactlessEMV bool `json:"contactlessEmv"` // ManualEntryEnabled indicates that manual card entry is enabled. ManualEntryEnabled bool `json:"manualEntryEnabled"` // ManualEntryPromptZip requires a zip code to be entered for manually // entered transactions. ManualEntryPromptZip bool `json:"manualEntryPromptZip"` // ManualEntryPromptStreetNumber requires a street number to be entered for // manually entered transactions. ManualEntryPromptStreetNumber bool `json:"manualEntryPromptStreetNumber"` // GatewayOnly indicates that this merchant is boarded on BlockChyp in // gateway only mode. GatewayOnly bool `json:"gatewayOnly"` // BankAccounts bank accounts for split bank account merchants. BankAccounts []BankAccount `json:"bankAccounts"` }
MerchantProfile models a merchant profile.
type MerchantProfileRequest ¶
type MerchantProfileRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // MerchantID is the merchant id. Optional for merchant scoped requests. MerchantID string `json:"merchantId"` }
MerchantProfileRequest models a request for information about the merchant profile.
type MerchantProfileResponse ¶
type MerchantProfileResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates that the response came from the test gateway. Test bool `json:"test"` // MerchantID is the merchant id. MerchantID string `json:"merchantId"` // CompanyName is the merchant's company name. CompanyName string `json:"companyName"` // DBAName is the dba name of the merchant. DBAName string `json:"dbaName"` // InvoiceName is the name the merchant prefers on payment link invoices. InvoiceName string `json:"invoiceName"` // ContactName is the contact name for the merchant. ContactName string `json:"contactName"` // ContactNumber is the contact number for the merchant. ContactNumber string `json:"contactNumber"` // LocationName is the location name. LocationName string `json:"locationName"` // StoreNumber is the store number. StoreNumber string `json:"storeNumber"` // PartnerRef is the partner assigne reference for this merchant. PartnerRef string `json:"partnerRef"` // TimeZone is the merchant's local time zone. TimeZone string `json:"timeZone"` // BatchCloseTime is the batch close time in the merchant's time zone. BatchCloseTime string `json:"batchCloseTime"` // TerminalUpdateTime is the terminal firmware update time. TerminalUpdateTime string `json:"terminalUpdateTime"` // AutoBatchClose flag indicating whether or not the batch automatically // closes. AutoBatchClose bool `json:"autoBatchClose"` // DisableBatchEmails flag indicating whether or not batch closure emails // should be automatically sent. DisableBatchEmails bool `json:"disableBatchEmails"` // PINEnabled flag indicating whether or not pin entry is enabled. PINEnabled bool `json:"pinEnabled"` // CashBackEnabled flag indicating whether or not cash back is enabled. CashBackEnabled bool `json:"cashBackEnabled"` // StoreAndForwardEnabled flag indicating whether or not store and forward is // enabled. StoreAndForwardEnabled bool `json:"storeAndForwardEnabled"` // PartialAuthEnabled flag indicating whether or not partial authorizations // are supported for this merchant. PartialAuthEnabled bool `json:"partialAuthEnabled"` // SplitBankAccountsEnabled flag indicating whether or not this merchant // support split settlement. SplitBankAccountsEnabled bool `json:"splitBankAccountsEnabled"` // StoreAndForwardFloorLimit floor limit for store and forward transactions. StoreAndForwardFloorLimit string `json:"storeAndForwardFloorLimit"` // PublicKey is the blockchyp public key for this merchant. PublicKey string `json:"publicKey"` // Status is the underwriting/processing status for the the merchant. Status string `json:"status"` // CashDiscountEnabled enables cash discount or surcharging. CashDiscountEnabled bool `json:"cashDiscountEnabled"` // SurveyTimeout is the post transaction survey timeout in seconds. SurveyTimeout int `json:"surveyTimeout"` // CooldownTimeout is time a transaction result is displayed on a terminal // before the terminal is automatically cleared in seconds. CooldownTimeout int `json:"cooldownTimeout"` // TipEnabled indicates that tips are enabled for a merchant account. TipEnabled bool `json:"tipEnabled"` // PromptForTip indicates that tips should be automatically prompted for // after charge and preauth transactions. PromptForTip bool `json:"promptForTip"` // TipDefaults three default values for tips. Can be provided as a percentage // if a percent sign is provided. Otherwise the values are assumed to be // basis points. TipDefaults []string `json:"tipDefaults"` // CashbackPresets four default values for cashback prompts. CashbackPresets []string `json:"cashbackPresets"` // EBTEnabled indicates that EBT cards are enabled. EBTEnabled bool `json:"ebtEnabled"` // FreeRangeRefundsEnabled indicates that refunds without transaction // references are permitted. FreeRangeRefundsEnabled bool `json:"freeRangeRefundsEnabled"` // PINBypassEnabled indicates that pin bypass is enabled. PINBypassEnabled bool `json:"pinBypassEnabled"` // GiftCardsDisabled indicates that gift cards are disabled. GiftCardsDisabled bool `json:"giftCardsDisabled"` // TCDisabled disables terms and conditions pages in the merchant UI. TCDisabled bool `json:"tcDisabled"` // DigitalSignaturesEnabled indicates that digital signature capture is // enabled. DigitalSignaturesEnabled bool `json:"digitalSignaturesEnabled"` // DigitalSignatureReversal indicates that transactions should auto-reverse // when signatures are refused. DigitalSignatureReversal bool `json:"digitalSignatureReversal"` // BillingAddress is the address to be used for billing correspondence. BillingAddress Address `json:"billingAddress"` // ShippingAddress is the address to be used for shipping. ShippingAddress Address `json:"shippingAddress"` // Visa indicates that Visa cards are supported. Visa bool `json:"visa"` // MasterCard indicates that MasterCard is supported. MasterCard bool `json:"masterCard"` // AMEX indicates that American Express is supported. AMEX bool `json:"amex"` // Discover indicates that Discover cards are supported. Discover bool `json:"discover"` // JCB indicates that JCB (Japan Card Bureau) cards are supported. JCB bool `json:"jcb"` // UnionPay indicates that China Union Pay cards are supported. UnionPay bool `json:"unionPay"` // ContactlessEMV indicates that contactless EMV cards are supported. ContactlessEMV bool `json:"contactlessEmv"` // ManualEntryEnabled indicates that manual card entry is enabled. ManualEntryEnabled bool `json:"manualEntryEnabled"` // ManualEntryPromptZip requires a zip code to be entered for manually // entered transactions. ManualEntryPromptZip bool `json:"manualEntryPromptZip"` // ManualEntryPromptStreetNumber requires a street number to be entered for // manually entered transactions. ManualEntryPromptStreetNumber bool `json:"manualEntryPromptStreetNumber"` // GatewayOnly indicates that this merchant is boarded on BlockChyp in // gateway only mode. GatewayOnly bool `json:"gatewayOnly"` // BankAccounts bank accounts for split bank account merchants. BankAccounts []BankAccount `json:"bankAccounts"` }
MerchantProfileResponse models a response for a single merchant profile.
type MerchantUser ¶
type MerchantUser struct { // Test indicates whether or not these results are for test or live // merchants. Test bool `json:"test"` // ID is the user's primary key. ID string `json:"id"` // FirstName is the user's first name. FirstName string `json:"firstName"` // LastName is the user's last name. LastName string `json:"lastName"` // Email is the user's email address. Email string `json:"email"` // Status is the user account status. Status string `json:"status"` // Type is the type of user account. Type string `json:"type"` // Roles are the role codes assigned to this user. Roles []string `json:"roles"` // Locked indicates whether or not this user account is locked. Locked bool `json:"locked"` }
MerchantUser contains details about a merchant user.
type MerchantUsersResponse ¶
type MerchantUsersResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates whether or not these results are for test or live // merchants. Test bool `json:"test"` // Results users and pending invites associated with the merchant. Results []MerchantUser `json:"results"` }
MerchantUsersResponse contains the results for a merchant users list.
type MessageRequest ¶
type MessageRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // Message is the message to be displayed on the terminal. Message string `json:"message"` }
MessageRequest contains a message to be displayed on the terminal screen.
type PaymentAmounts ¶
type PaymentAmounts struct { // PartialAuth indicates whether or not the transaction was approved for a // partial amount. PartialAuth bool // AltCurrency indicates whether or not an alternate currency was used. AltCurrency bool // FSAAuth indicates whether or not a request was settled on an FSA card. FSAAuth bool // CurrencyCode is the currency code used for the transaction. CurrencyCode string // RequestedAmount is the requested amount. RequestedAmount string // AuthorizedAmount is the authorized amount. May not match the requested // amount in the event of a partial auth. AuthorizedAmount string // RemainingBalance is the remaining balance on the payment method. RemainingBalance string // TipAmount is the tip amount. TipAmount string // TaxAmount is the tax amount. TaxAmount string // RequestedCashBackAmount is the cash back amount the customer requested // during the transaction. RequestedCashBackAmount string // AuthorizedCashBackAmount is the amount of cash back authorized by the // gateway. This amount will be the entire amount requested, or zero. AuthorizedCashBackAmount string }
PaymentAmounts contains response details about tender amounts.
func (PaymentAmounts) From ¶
func (r PaymentAmounts) From(raw interface{}) (result PaymentAmounts, ok bool)
From creates an instance of PaymentAmounts with values from a generic type.
type PaymentLinkRequest ¶
type PaymentLinkRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the requested amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool `json:"surcharge"` // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool `json:"cashDiscount"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // AutoSend automatically send the link via an email. AutoSend bool `json:"autoSend"` // Enroll indicates that the payment method should be added to the token // vault alongside the authorization. Enroll bool `json:"enroll,omitempty"` // EnrollOnly indicates that the link should be used to enroll a token only. // Can only be used in cashier mode. EnrollOnly bool `json:"enrollOnly,omitempty"` // QrcodeBinary indicates that the QR Code binary should be returned. QrcodeBinary bool `json:"qrcodeBinary,omitempty"` // QrcodeSize determines the size of the qr code to be returned. QrcodeSize int `json:"qrcodeSize,omitempty"` // DaysToExpiration number of days until the payment link expires. DaysToExpiration int `json:"daysToExpiration,omitempty"` // Cashier flags the payment link as cashier facing. Cashier bool `json:"cashier"` // Description description explaining the transaction for display to the // user. Description string `json:"description"` // Subject subject of the payment email. Subject string `json:"subject"` // Transaction transaction details for display on the payment email. Transaction *TransactionDisplayTransaction `json:"transaction"` // Customer contains customer information. Customer Customer `json:"customer"` // CallbackURL optional callback url to which transaction responses for this // link will be posted. CallbackURL string `json:"callbackUrl"` // TCAlias is an alias for a Terms and Conditions template configured in the // BlockChyp dashboard. TCAlias string `json:"tcAlias"` // TCName contains the name of the Terms and Conditions the user is // accepting. TCName string `json:"tcName"` // TCContent is the content of the terms and conditions that will be // presented to the user. TCContent string `json:"tcContent"` // Cryptocurrency indicates that the transaction should be a cryptocurrency // transaction. Value should be a crypto currency code (ETH, BTC) or ANY to // prompt the user to choose from supported cryptocurrencies. Cryptocurrency *string `json:"cryptocurrency"` // CryptoNetwork is an optional parameter that can be used to force a crypto // transaction onto a level one or level two network. Valid values are L1 and // L2. Defaults to L1. CryptoNetwork *string `json:"cryptoNetwork"` // CryptoReceiveAddress can be used to specify a specific receive address for // a crypto transaction. Disabled by default. This should only be used by // sophisticated users with access to properly configured hot wallets. CryptoReceiveAddress *string `json:"cryptoReceiveAddress"` // PaymentRequestLabel can optionally add a label to the payment request if // the target cryptocurrency supports labels. Defaults to the merchant's DBA // Name. PaymentRequestLabel *string `json:"paymentRequestLabel"` // PaymentRequestMessage can optionally add a message to the payment request // if the target cryptocurrency supports labels. Defaults to empty. PaymentRequestMessage *string `json:"paymentRequestMessage"` }
PaymentLinkRequest creates a payment link.
type PaymentLinkResponse ¶
type PaymentLinkResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // LinkCode is the payment link code. LinkCode string `json:"linkCode"` // URL is the url for the payment link. URL string `json:"url"` // QrcodeURL is the url for a QR Code associated with this link. QrcodeURL string `json:"qrcodeUrl"` // QrcodeBinary is the hex encoded binary for the QR Code, if requested. // Encoded in PNG format. QrcodeBinary string `json:"qrcodeBinary"` // CustomerID is the customer id created or used for the payment. CustomerID string `json:"customerId"` }
PaymentLinkResponse creates a payment link.
type PaymentMethod ¶
type PaymentMethod struct { // Token is the payment token to be used for this transaction. This should be // used for recurring transactions. Token string // Track1 contains track 1 magnetic stripe data. Track1 string // Track2 contains track 2 magnetic stripe data. Track2 string // PAN contains the primary account number. We recommend using the terminal // or e-commerce tokenization libraries instead of passing account numbers in // directly, as this would put your application in PCI scope. PAN string // RoutingNumber is the ACH routing number for ACH transactions. RoutingNumber string // CardholderName is the cardholder name. Only required if the request // includes a primary account number or track data. CardholderName string // ExpMonth is the card expiration month for use with PAN based transactions. ExpMonth string // ExpYear is the card expiration year for use with PAN based transactions. ExpYear string // CVV is the card CVV for use with PAN based transactions. CVV string // Address is the cardholder address for use with address verification. Address string // PostalCode is the cardholder postal code for use with address // verification. PostalCode string // ManualEntry specifies that the payment entry method is a manual keyed // transaction. If this is true, no other payment method will be accepted. ManualEntry bool // KSN is the key serial number used for DUKPT encryption. KSN string // PINBlock is the encrypted pin block. PINBlock string // CardType designates categories of cards: credit, debit, EBT. CardType CardType // PaymentType designates brands of payment methods: Visa, Discover, etc. PaymentType string }
PaymentMethod contains request details about a payment method.
func (PaymentMethod) From ¶
func (r PaymentMethod) From(raw interface{}) (result PaymentMethod, ok bool)
From creates an instance of PaymentMethod with values from a generic type.
type PaymentMethodResponse ¶
type PaymentMethodResponse struct { // Token is the payment token, if the payment was enrolled in the vault. Token string // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string // MaskedPAN is the masked primary account number. MaskedPAN string // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool // CardHolder is the cardholder name. CardHolder string // ExpMonth is the card expiration month in MM format. ExpMonth string // ExpYear is the card expiration year in YY format. ExpYear string // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer // Customers contains customer data, if any. Customers []Customer }
PaymentMethodResponse contains response details about a payment method.
func (PaymentMethodResponse) From ¶
func (r PaymentMethodResponse) From(raw interface{}) (result PaymentMethodResponse, ok bool)
From creates an instance of PaymentMethodResponse with values from a generic type.
type PingRequest ¶
type PingRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
PingRequest contains information needed to test connectivity with a terminal.
type PingResponse ¶
type PingResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` }
PingResponse contains the response to a ping request.
type PreviousTransaction ¶
type PreviousTransaction struct { // TransactionID is the ID of the previous transaction being referenced. TransactionID string }
PreviousTransaction contains a reference to a previous transaction.
func (PreviousTransaction) From ¶
func (r PreviousTransaction) From(raw interface{}) (result PreviousTransaction, ok bool)
From creates an instance of PreviousTransaction with values from a generic type.
type PromptType ¶
type PromptType string
PromptType is used to specify the type of text input data being requested from a customer.
type RawPublicKey ¶
RawPublicKey models the primitive form of an ECC public key. A little simpler than X509, ASN and the usual nonsense.
type ReceiptSuggestions ¶
type ReceiptSuggestions struct { // AID is the EMV Application Identifier. AID string `json:"aid,omitempty"` // ARQC is the EMV Application Request Cryptogram. ARQC string `json:"arqc,omitempty"` // IAD is the EMV Issuer Application Data. IAD string `json:"iad,omitempty"` // ARC is the EMV Authorization Response Code. ARC string `json:"arc,omitempty"` // TC is the EMV Transaction Certificate. TC string `json:"tc,omitempty"` // TVR is the EMV Terminal Verification Response. TVR string `json:"tvr,omitempty"` // TSI is the EMV Transaction Status Indicator. TSI string `json:"tsi,omitempty"` // TerminalID is the ID of the payment terminal. TerminalID string `json:"terminalId,omitempty"` // MerchantName is the name of the merchant's business. MerchantName string `json:"merchantName,omitempty"` // MerchantID is the ID of the merchant. MerchantID string `json:"merchantId,omitempty"` // MerchantKey is the partially masked merchant key required on EMV receipts. MerchantKey string `json:"merchantKey,omitempty"` // ApplicationLabel is a description of the selected AID. ApplicationLabel string `json:"applicationLabel,omitempty"` // RequestSignature indicates that the receipt should contain a signature // line. RequestSignature bool `json:"requestSignature"` // MaskedPAN is the masked primary account number of the payment card, as // required. MaskedPAN string `json:"maskedPan,omitempty"` // AuthorizedAmount is the amount authorized by the payment network. Could be // less than the requested amount for partial auth. AuthorizedAmount string `json:"authorizedAmount"` // TransactionType is the type of transaction performed (CHARGE, PREAUTH, // REFUND, etc). TransactionType string `json:"transactionType"` // EntryMethod is the method by which the payment card was entered (MSR, // CHIP, KEYED, etc.). EntryMethod string `json:"entryMethod,omitempty"` // PINVerified indicates that PIN verification was performed. PINVerified bool `json:"pinVerified,omitempty"` // CVMUsed indicates the customer verification method used for the // transaction. CVMUsed CVMType `json:"cvmUsed,omitempty"` // Fallback indicates that a chip read failure caused the transaction to fall // back to the magstripe. Fallback bool `json:"fallback,omitempty"` // BatchSequence is the sequence of the transaction in the batch. BatchSequence int `json:"batchSequence,omitempty"` // CashBackAmount is the amount of cash back that was approved. CashBackAmount string `json:"cashBackAmount,omitempty"` // Surcharge is the amount added to the transaction to cover eligible credit // card fees. Surcharge string `json:"surcharge,omitempty"` // CashDiscount is the discount applied to the transaction for payment // methods ineligible for surcharges. CashDiscount string `json:"cashDiscount,omitempty"` }
ReceiptSuggestions contains EMV fields we recommend developers put on their receipts.
type RefundRequest ¶
type RefundRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token is the payment token to be used for this transaction. This should be // used for recurring transactions. Token string `json:"token,omitempty"` // Track1 contains track 1 magnetic stripe data. Track1 string `json:"track1,omitempty"` // Track2 contains track 2 magnetic stripe data. Track2 string `json:"track2,omitempty"` // PAN contains the primary account number. We recommend using the terminal // or e-commerce tokenization libraries instead of passing account numbers in // directly, as this would put your application in PCI scope. PAN string `json:"pan,omitempty"` // RoutingNumber is the ACH routing number for ACH transactions. RoutingNumber string `json:"routingNumber,omitempty"` // CardholderName is the cardholder name. Only required if the request // includes a primary account number or track data. CardholderName string `json:"cardholderName,omitempty"` // ExpMonth is the card expiration month for use with PAN based transactions. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year for use with PAN based transactions. ExpYear string `json:"expYear,omitempty"` // CVV is the card CVV for use with PAN based transactions. CVV string `json:"cvv,omitempty"` // Address is the cardholder address for use with address verification. Address string `json:"address,omitempty"` // PostalCode is the cardholder postal code for use with address // verification. PostalCode string `json:"postalCode,omitempty"` // ManualEntry specifies that the payment entry method is a manual keyed // transaction. If this is true, no other payment method will be accepted. ManualEntry bool `json:"manualEntry,omitempty"` // KSN is the key serial number used for DUKPT encryption. KSN string `json:"ksn,omitempty"` // PINBlock is the encrypted pin block. PINBlock string `json:"pinBlock,omitempty"` // CardType designates categories of cards: credit, debit, EBT. CardType CardType `json:"cardType,omitempty"` // PaymentType designates brands of payment methods: Visa, Discover, etc. PaymentType string `json:"paymentType,omitempty"` // TransactionID is the ID of the previous transaction being referenced. TransactionID string `json:"transactionId"` // CurrencyCode indicates the transaction currency code. CurrencyCode string `json:"currencyCode"` // Amount is the requested amount. Amount string `json:"amount"` // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool `json:"taxExempt"` // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool `json:"surcharge"` // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool `json:"cashDiscount"` // SigFile is a location on the filesystem which a customer signature should // be written to. SigFile string `json:"sigFile,omitempty"` // SigFormat specifies the image format to be used for returning signatures. SigFormat SignatureFormat `json:"sigFormat,omitempty"` // SigWidth is the width that the signature image should be scaled to, // preserving the aspect ratio. If not provided, the signature is returned in // the terminal's max resolution. SigWidth int `json:"sigWidth,omitempty"` // DisableSignature specifies whether or not signature prompt should be // skipped on the terminal. The terminal will indicate whether or not a // signature is required by the card in the receipt suggestions response. DisableSignature bool `json:"disableSignature,omitempty"` // TipAmount is the tip amount. TipAmount string `json:"tipAmount,omitempty"` // TaxAmount is the tax amount. TaxAmount string `json:"taxAmount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // Healthcare contains details for HSA/FSA transactions. Healthcare *Healthcare `json:"healthcare,omitempty"` // SimulateChipRejection instructs the terminal to simulate a post auth chip // rejection that would trigger an automatic reversal. SimulateChipRejection bool `json:"simulateChipRejection,omitempty"` // SimulateOutOfOrderReversal instructs the terminal to simulate an out of // order automatic reversal. SimulateOutOfOrderReversal bool `json:"simulateOutOfOrderReversal,omitempty"` // AsyncReversals causes auto-reversals on the terminal to be executed // asyncronously. Use with caution and in conjunction with the transaction // status API. AsyncReversals bool `json:"asyncReversals,omitempty"` }
RefundRequest contains a refund request.
type RequestAmount ¶
type RequestAmount struct { // CurrencyCode indicates the transaction currency code. CurrencyCode string // Amount is the requested amount. Amount string // TaxExempt indicates that the request is tax exempt. Only required for tax // exempt level 2 processing. TaxExempt bool // Surcharge is a flag to add a surcharge to the transaction to cover credit // card fees, if permitted. Surcharge bool // CashDiscount is a flag that applies a discount to negate the surcharge for // debit transactions or other surcharge ineligible payment methods. CashDiscount bool }
RequestAmount contains request details about tender amounts.
func (RequestAmount) From ¶
func (r RequestAmount) From(raw interface{}) (result RequestAmount, ok bool)
From creates an instance of RequestAmount with values from a generic type.
type RoundingMode ¶ added in v1.24.19
type RoundingMode string
RoundingMode indicates how partial penny rounding operations should work
type RouteCache ¶
type RouteCache struct {
Routes map[string]routeCacheEntry `json:"routes"`
}
RouteCache models offline route cache information.
type SideLoadRequest ¶ added in v1.24.25
type SideLoadRequest struct { Terminal string Channel string Full bool HTTPS bool Incremental bool Archive string TempDir string Dist string PlatformMap map[string][]Archive BlockChypClient *Client HTTPClient *http.Client }
SideLoadRequest models a request to sideload software onto a terminal
type SideLogger ¶ added in v1.24.25
type SideLogger interface { // Infoln wraps the logrus Infoln function Infoln(args ...interface{}) // Infof wraps the logrus Infof function Infof(format string, args ...interface{}) }
SideLogger is a simple interface to handle sideloader process logging
type SignatureFormat ¶
type SignatureFormat string
SignatureFormat is used to specify the output format for customer signature images.
type SignatureRequest ¶
type SignatureRequest struct { // SigFile is a location on the filesystem which a customer signature should // be written to. SigFile string // SigFormat specifies the image format to be used for returning signatures. SigFormat SignatureFormat // SigWidth is the width that the signature image should be scaled to, // preserving the aspect ratio. If not provided, the signature is returned in // the terminal's max resolution. SigWidth int // DisableSignature specifies whether or not signature prompt should be // skipped on the terminal. The terminal will indicate whether or not a // signature is required by the card in the receipt suggestions response. DisableSignature bool }
SignatureRequest contains a request for customer signature data.
func (SignatureRequest) From ¶
func (r SignatureRequest) From(raw interface{}) (result SignatureRequest, ok bool)
From creates an instance of SignatureRequest with values from a generic type.
type SignatureResponse ¶
type SignatureResponse struct { // SigFile contains the hex encoded signature data. SigFile string }
SignatureResponse contains customer signature data.
func (SignatureResponse) From ¶
func (r SignatureResponse) From(raw interface{}) (result SignatureResponse, ok bool)
From creates an instance of SignatureResponse with values from a generic type.
type Slide ¶
type Slide struct { // MediaID is the id for the media asset to be used for this slide. Must be // an image. MediaID string `json:"mediaId"` // Ordinal position of the slide within the slide show. Ordinal int `json:"ordinal"` // ThumbnailURL is the fully qualified thumbnail url for the slide. ThumbnailURL string `json:"thumbnailUrl"` }
Slide models a slide within a slide show.
type SlideShow ¶
type SlideShow struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID is the primary id for the slide show. ID string `json:"id"` // Name is the name of the slide show. Name string `json:"name"` // Delay time between slides in seconds. Delay int `json:"delay"` // Slides enumerates all slides in the display sequence. Slides []*Slide `json:"slides"` }
SlideShow models a media library response.
type SlideShowRequest ¶
type SlideShowRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // SlideShowID id used to track a slide show. SlideShowID string `json:"slideShowId"` }
SlideShowRequest models a request to retrieve or manipulate terminal slide shows.
type SlideShowResponse ¶
type SlideShowResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // MaxResults max to be returned in a single page. Defaults to the system max // of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for paged results. Defaults to zero. StartIndex int `json:"startIndex"` // ResultCount total number of results accessible through paging. ResultCount int `json:"resultCount"` // Results enumerates all slide shows responsive to the original query. Results []SlideShow `json:"results"` }
SlideShowResponse models a slide show response.
type Subtotals ¶
type Subtotals struct { // TipAmount is the tip amount. TipAmount string // TaxAmount is the tax amount. TaxAmount string }
Subtotals contains request subtotals.
type SurveyDataPoint ¶
type SurveyDataPoint struct { // AnswerKey is a unique identifier for a specific answer type. AnswerKey string `json:"answerKey"` // AnswerDescription is a narrative description of the answer. AnswerDescription string `json:"answerDescription"` // ResponseCount is the number of responses. ResponseCount int `json:"responseCount"` // ResponsePercentage is response rate as a percentage of total transactions. ResponsePercentage float64 `json:"responsePercentage"` // AverageTransaction is the average transaction amount for a given answer. AverageTransaction float64 `json:"averageTransaction"` }
SurveyDataPoint models a request to retrieve or manipulate survey questions.
type SurveyQuestion ¶
type SurveyQuestion struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID internal id for a survey question. ID string `json:"id"` // Ordinal ordinal number indicating the position of the survey question in // the post transaction sequence. Ordinal int `json:"ordinal"` // Enabled determines whether or not the question will be presented post // transaction. Enabled bool `json:"enabled"` // QuestionText is the full text of the transaction. QuestionText string `json:"questionText"` // QuestionType indicates the type of question. Valid values are 'yes_no' and // 'scaled'. QuestionType string `json:"questionType"` // TransactionCount is the total number of transactions processed during the // query period if results are requested. TransactionCount int `json:"transactionCount,omitempty"` // ResponseCount is the total number of responses during the query period if // results are requested. ResponseCount int `json:"responseCount,omitempty"` // ResponseRate is the response rate, expressed as a ratio, if results are // requested. ResponseRate float64 `json:"responseRate,omitempty"` // Responses is the set of response data points. Responses []SurveyDataPoint `json:"responses"` }
SurveyQuestion models a survey question.
type SurveyQuestionRequest ¶
type SurveyQuestionRequest struct { // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // QuestionID id of a single question. QuestionID string `json:"questionId"` // Timeout is an optional timeout override. Timeout int `json:"timeout"` }
SurveyQuestionRequest models a request to retrieve or manipulate survey questions.
type SurveyQuestionResponse ¶
type SurveyQuestionResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Results is the full result set responsive to the original request. Results []SurveyQuestion `json:"results"` }
SurveyQuestionResponse models a survey question response.
type SurveyResultsRequest ¶
type SurveyResultsRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // QuestionID id of a single question. QuestionID string `json:"questionId"` // StartDate is an optional start date for filtering response data. StartDate string `json:"startDate"` // EndDate is an optional end date for filtering response data. EndDate string `json:"endDate"` }
SurveyResultsRequest models a request to retrieve survey results.
type TerminalActivationRequest ¶
type TerminalActivationRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // MerchantID is the optional merchant id. MerchantID string `json:"merchantId"` // ActivationCode is the terminal activation code displayed on the terminal. ActivationCode string `json:"activationCode"` // TerminalName is the name to be assigned to the terminal. Must be unique // for the merchant account. TerminalName string `json:"terminalName"` // CloudRelay indicates that the terminal should be activated in cloud relay // mode. CloudRelay bool `json:"cloudRelay"` }
TerminalActivationRequest models a terminal activation request.
type TerminalAuthorizationRequest ¶
type TerminalAuthorizationRequest struct { APICredentials Request AuthorizationRequest `json:"request"` }
TerminalAuthorizationRequest contains an authorization request for a charge, preauth, or reverse transaction.
type TerminalBalanceRequest ¶
type TerminalBalanceRequest struct { APICredentials Request BalanceRequest `json:"request"` }
TerminalBalanceRequest contains a request for the remaining balance on a payment type.
type TerminalBooleanPromptRequest ¶
type TerminalBooleanPromptRequest struct { APICredentials Request BooleanPromptRequest `json:"request"` }
TerminalBooleanPromptRequest contains a simple yes no prompt request.
type TerminalCaptureSignatureRequest ¶
type TerminalCaptureSignatureRequest struct { APICredentials Request CaptureSignatureRequest `json:"request"` }
TerminalCaptureSignatureRequest contains a request for customer signature data.
type TerminalClearTerminalRequest ¶
type TerminalClearTerminalRequest struct { APICredentials Request ClearTerminalRequest `json:"request"` }
TerminalClearTerminalRequest contains the information needed to enroll a new payment method in the token vault.
type TerminalDeactivationRequest ¶
type TerminalDeactivationRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TerminalName is the terminal name assigned to the terminal. TerminalName string `json:"terminalName"` // TerminalID is the id assigned by BlockChyp to the terminal. TerminalID string `json:"terminalId"` }
TerminalDeactivationRequest models a terminal deactivation request.
type TerminalDeleteQueuedTransactionRequest ¶
type TerminalDeleteQueuedTransactionRequest struct { APICredentials Request DeleteQueuedTransactionRequest `json:"request"` }
TerminalDeleteQueuedTransactionRequest deletes one or all transactions from a terminal queue.
type TerminalEnrollRequest ¶
type TerminalEnrollRequest struct { APICredentials Request EnrollRequest `json:"request"` }
TerminalEnrollRequest contains the information needed to enroll a new payment method in the token vault.
type TerminalGiftActivateRequest ¶
type TerminalGiftActivateRequest struct { APICredentials Request GiftActivateRequest `json:"request"` }
TerminalGiftActivateRequest contains the information needed to activate or recharge a gift card.
type TerminalListQueuedTransactionsRequest ¶
type TerminalListQueuedTransactionsRequest struct { APICredentials Request ListQueuedTransactionsRequest `json:"request"` }
TerminalListQueuedTransactionsRequest returns a list of queued transactions on a terminal.
type TerminalLocateRequest ¶
type TerminalLocateRequest struct { APICredentials Request LocateRequest `json:"request"` }
TerminalLocateRequest contains information needed to retrieve location information for a terminal.
type TerminalMessageRequest ¶
type TerminalMessageRequest struct { APICredentials Request MessageRequest `json:"request"` }
TerminalMessageRequest contains a message to be displayed on the terminal screen.
type TerminalPingRequest ¶
type TerminalPingRequest struct { APICredentials Request PingRequest `json:"request"` }
TerminalPingRequest contains information needed to test connectivity with a terminal.
type TerminalProfile ¶
type TerminalProfile struct { // ID primary identifier for a given terminal. ID string `json:"id"` // IPAddress is the terminal's local IP address. IPAddress string `json:"ipAddress"` // TerminalName is the name assigned to the terminal during activation. TerminalName string `json:"terminalName"` // TerminalType is the terminal type. TerminalType string `json:"terminalType"` // TerminalTypeDisplayString is the terminal type display string. TerminalTypeDisplayString string `json:"terminalTypeDisplayString"` // BlockChypFirmwareVersion is the current firmware version deployed on the // terminal. BlockChypFirmwareVersion string `json:"blockChypFirmwareVersion"` // CloudBased indicates whether or not the terminal is configured for cloud // relay. CloudBased bool `json:"cloudBased"` // PublicKey is the terminal's elliptic curve public key. PublicKey string `json:"publicKey"` // SerialNumber is the manufacturer's serial number. SerialNumber string `json:"serialNumber"` // Online indicates whether or not the terminal is currently online. Online bool `json:"online"` // Since the date and time the terminal was first brought online. Since string `json:"since"` // TotalMemory is the total memory on the terminal. TotalMemory int `json:"totalMemory"` // TotalStorage is the storage on the terminal. TotalStorage int `json:"totalStorage"` // AvailableMemory is the available (unused) memory on the terminal. AvailableMemory int `json:"availableMemory"` // AvailableStorage is the available (unused) storage on the terminal. AvailableStorage int `json:"availableStorage"` // UsedMemory is the memory currently in use on the terminal. UsedMemory int `json:"usedMemory"` // UsedStorage is the storage currently in use on the terminal. UsedStorage int `json:"usedStorage"` // BrandingPreview is the branding asset currently displayed on the terminal. BrandingPreview string `json:"brandingPreview"` // GroupID the id of the terminal group to which the terminal belongs, if // any. GroupID string `json:"groupId"` // GroupName the name of the terminal group to which the terminal belongs, if // any. GroupName string `json:"groupName"` }
TerminalProfile contains details about a merchant board platform configuration.
type TerminalProfileRequest ¶
type TerminalProfileRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` }
TerminalProfileRequest models a terminal profile request.
type TerminalProfileResponse ¶
type TerminalProfileResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Results enumerates all terminal profiles in the response. Results []TerminalProfile `json:"results"` }
TerminalProfileResponse models a terminal profile response.
type TerminalReference ¶
type TerminalReference struct { // TerminalName is the name of the target payment terminal. TerminalName string // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool }
TerminalReference contains a reference to a terminal name.
func (TerminalReference) From ¶
func (r TerminalReference) From(raw interface{}) (result TerminalReference, ok bool)
From creates an instance of TerminalReference with values from a generic type.
type TerminalRefundRequest ¶
type TerminalRefundRequest struct { APICredentials Request RefundRequest `json:"request"` }
TerminalRefundRequest contains a refund request.
type TerminalRoute ¶
type TerminalRoute struct { Exists bool `json:"exists"` TerminalName string `json:"terminalName"` IPAddress string `json:"ipAddress"` CloudRelayEnabled bool `json:"cloudRelayEnabled"` TransientCredentials APICredentials `json:"transientCredentials,omitempty"` PublicKey string `json:"publicKey"` RawKey RawPublicKey `json:"rawKey"` Timestamp time.Time `json:"timestamp"` HTTPS bool `json:"https"` }
TerminalRoute models route information for a payment terminal.
type TerminalRouteResponse ¶
type TerminalRouteResponse struct { TerminalRoute Success bool `json:"success"` Error string `json:"error"` }
TerminalRouteResponse models a terminal route response from the gateway.
type TerminalStatusRequest ¶
type TerminalStatusRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` }
TerminalStatusRequest contains a request for the status of a terminal.
type TerminalStatusResponse ¶
type TerminalStatusResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Idle indicates that the terminal is idle. Idle bool `json:"idle"` // CardInSlot indicates whether or not a card is currently in the card slot. CardInSlot bool `json:"cardInSlot"` // Status contains the operation that the terminal is performing. Status string `json:"status"` // TransactionRef contains the transaction reference for an ongoing // transaction, if one was specified at request time. TransactionRef string `json:"transactionRef"` // Since is the timestamp of the last status change. Since time.Time `json:"since"` }
TerminalStatusResponse contains the current status of a terminal.
type TerminalTerminalStatusRequest ¶
type TerminalTerminalStatusRequest struct { APICredentials Request TerminalStatusRequest `json:"request"` }
TerminalTerminalStatusRequest contains a request for the status of a terminal.
type TerminalTermsAndConditionsRequest ¶
type TerminalTermsAndConditionsRequest struct { APICredentials Request TermsAndConditionsRequest `json:"request"` }
TerminalTermsAndConditionsRequest contains the fields needed for custom Terms and Conditions prompts.
type TerminalTermsAndConditionsResponse ¶
type TerminalTermsAndConditionsResponse struct { APICredentials Request TermsAndConditionsResponse `json:"request"` }
TerminalTermsAndConditionsResponse contains a signature capture response for Terms and Conditions.
type TerminalTextPromptRequest ¶
type TerminalTextPromptRequest struct { APICredentials Request TextPromptRequest `json:"request"` }
TerminalTextPromptRequest contains a text prompt request.
type TerminalTransactionDisplayRequest ¶
type TerminalTransactionDisplayRequest struct { APICredentials Request TransactionDisplayRequest `json:"request"` }
TerminalTransactionDisplayRequest is used to start or update a transaction line item display on a terminal.
type TerminalVolume ¶
type TerminalVolume struct { // TerminalName is the terminal name assigned during activation. TerminalName string `json:"terminalName"` // SerialNumber is the manufacturer's serial number. SerialNumber string `json:"serialNumber"` // TerminalType is the terminal type. TerminalType string `json:"terminalType"` // CapturedAmount is the captured amount. CapturedAmount string `json:"capturedAmount"` // TransactionCount is the number of transactions run on this terminal. TransactionCount int `json:"transactionCount"` }
TerminalVolume models transaction volume for a single terminal.
type TermsAndConditionsLogEntry ¶
type TermsAndConditionsLogEntry struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID internal id for a Terms and Conditions entry. ID string `json:"id"` // TerminalID id of the terminal that captured this terms and conditions // entry. TerminalID string `json:"terminalId"` // TerminalName name of the terminal that captured this terms and conditions // entry. TerminalName string `json:"terminalName"` // Test is a flag indicating whether or not the terminal was a test terminal. Test bool `json:"test"` // Timestamp date and time the terms and conditions acceptance occurred. Timestamp string `json:"timestamp"` // TransactionRef optional transaction ref if the terms and conditions was // associated with a transaction. TransactionRef string `json:"transactionRef"` // TransactionID optional transaction id if only log entries related to a // transaction should be returned. TransactionID string `json:"transactionId"` // Alias alias of the terms and conditions template used for this entry, if // any. Alias string `json:"alias"` // Name title of the document displayed on the terminal at the time of // capture. Name string `json:"name"` // Content full text of the document agreed to at the time of signature // capture. Content string `json:"content"` // ContentLeader first 32 characters of the full text. Used to support user // interfaces that show summaries. ContentLeader string `json:"contentLeader"` // HasSignature is a flag that indicates whether or not a signature has been // captured. HasSignature bool `json:"hasSignature"` // SigFormat specifies the image format to be used for returning signatures. SigFormat SignatureFormat `json:"sigFormat,omitempty"` // Signature is the base 64 encoded signature image if the format requested. Signature string `json:"signature"` }
TermsAndConditionsLogEntry models a Terms and Conditions log entry.
type TermsAndConditionsLogRequest ¶
type TermsAndConditionsLogRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // LogEntryID is the identifier of the log entry to be returned for single // result requests. LogEntryID string `json:"logEntryId"` // TransactionID optional transaction id if only log entries related to a // transaction should be returned. TransactionID string `json:"transactionId"` // MaxResults max to be returned in a single page. Defaults to the system max // of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for paged results. Defaults to zero. StartIndex int `json:"startIndex"` // StartDate is an optional start date for filtering response data. StartDate string `json:"startDate"` // EndDate is an optional end date for filtering response data. EndDate string `json:"endDate"` }
TermsAndConditionsLogRequest models a Terms and Conditions history request.
type TermsAndConditionsLogResponse ¶
type TermsAndConditionsLogResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID optional transaction id if only log entries related to a // transaction should be returned. TransactionID string `json:"transactionId"` // MaxResults max to be returned in a single page. Defaults to the system max // of 250. MaxResults int `json:"maxResults"` // StartIndex starting index for paged results. Defaults to zero. StartIndex int `json:"startIndex"` // ResultCount total number of results accessible through paging. ResultCount int `json:"resultCount"` // Results is the full result set responsive to the original request, subject // to pagination limits. Results []TermsAndConditionsLogEntry `json:"results"` }
TermsAndConditionsLogResponse models a Terms and Conditions history request.
type TermsAndConditionsRequest ¶
type TermsAndConditionsRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TransactionID is the ID of the previous transaction being referenced. TransactionID string `json:"transactionId"` // SigFile is a location on the filesystem which a customer signature should // be written to. SigFile string `json:"sigFile,omitempty"` // SigFormat specifies the image format to be used for returning signatures. SigFormat SignatureFormat `json:"sigFormat,omitempty"` // SigWidth is the width that the signature image should be scaled to, // preserving the aspect ratio. If not provided, the signature is returned in // the terminal's max resolution. SigWidth int `json:"sigWidth,omitempty"` // DisableSignature specifies whether or not signature prompt should be // skipped on the terminal. The terminal will indicate whether or not a // signature is required by the card in the receipt suggestions response. DisableSignature bool `json:"disableSignature,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // TCAlias is an alias for a Terms and Conditions template configured in the // BlockChyp dashboard. TCAlias string `json:"tcAlias"` // TCName contains the name of the Terms and Conditions the user is // accepting. TCName string `json:"tcName"` // TCContent is the content of the terms and conditions that will be // presented to the user. TCContent string `json:"tcContent"` // ContentHash is a hash of the terms and conditions content that can be used // for caching. ContentHash string `json:"contentHash"` // SigRequired indicates that a signature should be requested. SigRequired bool `json:"sigRequired"` }
TermsAndConditionsRequest contains the fields needed for custom Terms and Conditions prompts.
type TermsAndConditionsResponse ¶
type TermsAndConditionsResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // SigFile contains the hex encoded signature data. SigFile string `json:"sigFile,omitempty"` }
TermsAndConditionsResponse contains a signature capture response for Terms and Conditions.
type TermsAndConditionsTemplate ¶
type TermsAndConditionsTemplate struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID primary identifier for a given template. ID string `json:"id"` // Alias is an alias or code used to refer to a template. Alias string `json:"alias"` // Name is the name of the template. Displayed as the agreement title on the // terminal. Name string `json:"name"` // Content is the full text of the agreement template. Content string `json:"content"` }
TermsAndConditionsTemplate models a full terms and conditions template.
type TermsAndConditionsTemplateRequest ¶
type TermsAndConditionsTemplateRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TemplateID id of a single template. TemplateID string `json:"templateId"` }
TermsAndConditionsTemplateRequest models a request to retrieve or manipulate terms and conditions data.
type TermsAndConditionsTemplateResponse ¶
type TermsAndConditionsTemplateResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Results results responsive to a request. Results []TermsAndConditionsTemplate `json:"results"` // Timeout is an optional timeout override. Timeout int `json:"timeout"` }
TermsAndConditionsTemplateResponse models a set of templates responsive to a request.
type TextPromptRequest ¶
type TextPromptRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // PromptType is the prompt type (email, phone, etc). PromptType PromptType `json:"promptType"` }
TextPromptRequest contains a text prompt request.
type TextPromptResponse ¶
type TextPromptResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Response is the text prompt response. Response string `json:"response"` }
TextPromptResponse contains the response to a text prompt request.
type TimeoutRequest ¶
type TimeoutRequest struct { // Timeout is the request timeout in seconds. Timeout int // Test specifies whether or not to route transaction to the test gateway. Test bool }
TimeoutRequest models a low level request with a timeout and test flag.
func (TimeoutRequest) From ¶
func (r TimeoutRequest) From(raw interface{}) (result TimeoutRequest, ok bool)
From creates an instance of TimeoutRequest with values from a generic type.
type TokenMetadataRequest ¶
type TokenMetadataRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token the token to retrieve. Token string `json:"token"` }
TokenMetadataRequest retrieves token metadata.
type TokenMetadataResponse ¶
type TokenMetadataResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Token the token metadata for a given query. Token CustomerToken `json:"token"` }
TokenMetadataResponse models a payment token metadata response.
type TransactionDisplayDiscount ¶
type TransactionDisplayDiscount struct { // Description is the discount description. Description string `json:"description"` // Amount is the amount of the discount. Amount string `json:"amount"` }
TransactionDisplayDiscount is an item level discount for transaction display. Discounts never combine.
type TransactionDisplayItem ¶
type TransactionDisplayItem struct { // ID is a unique value identifying the item. This is not required, but // recommended since it is required to update or delete line items. ID string `json:"id"` // Description is a description of the line item. Description string `json:"description"` // Price is the price of the line item. Price string `json:"price"` // Quantity is the quantity of the line item. Quantity float64 `json:"quantity"` // Extended is an item category in a transaction display. Groups combine if // their descriptions match. Calculated subtotal amounts are rounded to two // decimal places of precision. Quantity is a floating point number that is // not rounded at all. Extended string `json:"extended"` // UnitCode is an alphanumeric code for units of measurement as used in // international trade. UnitCode string `json:"unitCode"` // CommodityCode is an international description code of the item. CommodityCode string `json:"commodityCode"` // ProductCode is a merchant-defined description code of the item. ProductCode string `json:"productCode"` // Discounts are displayed under their corresponding item. Discounts []*TransactionDisplayDiscount `json:"discounts"` }
TransactionDisplayItem is an item category in a transaction display. Groups combine if their descriptions match. Calculated subtotal amounts are rounded to two decimal places of precision. Quantity is a floating point number that is not rounded at all.
type TransactionDisplayRequest ¶
type TransactionDisplayRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TerminalName is the name of the target payment terminal. TerminalName string `json:"terminalName,omitempty"` // ResetConnection forces the terminal cloud connection to be reset while a // transactions is in flight. This is a diagnostic settings that can be used // only for test transactions. ResetConnection bool `json:"resetConnection"` // Transaction transaction to display on the terminal. Transaction *TransactionDisplayTransaction `json:"transaction"` }
TransactionDisplayRequest is used to start or update a transaction line item display on a terminal.
type TransactionDisplayTransaction ¶
type TransactionDisplayTransaction struct { // Subtotal is the subtotal to display. Subtotal string `json:"subtotal"` // Tax is the tax to display. Tax string `json:"tax"` // Total is the total to display. Total string `json:"total"` // Items is an item to display. Can be overwritten or appended, based on the // request type. Items []*TransactionDisplayItem `json:"items"` }
TransactionDisplayTransaction contains the items to display on a terminal.
type TransactionHistoryRequest ¶
type TransactionHistoryRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Query optional search query. Will match amount, last 4 and customer name. // batchId and terminalName are not supported with this option. Query string `json:"query"` // BatchID optional batch id. BatchID string `json:"batchId"` // TerminalName optional terminal name. TerminalName string `json:"terminalName"` // StartDate optional start date filter for batch history. StartDate time.Time `json:"startDate"` // EndDate optional end date filter for batch history. EndDate time.Time `json:"endDate"` // MaxResults max results to be returned by this request. MaxResults int `json:"maxResults"` // StartIndex starting index for results to be returned. StartIndex int `json:"startIndex"` }
TransactionHistoryRequest models a batch history request.
type TransactionHistoryResponse ¶
type TransactionHistoryResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Test indicates that the response came from the test gateway. Test bool `json:"test"` // BatchID batch identifier if filtered by batch. BatchID string `json:"batchId"` // TerminalName terminal name if filtered by terminal. TerminalName string `json:"terminalName"` // StartDate start date if filtered by start date. StartDate time.Time `json:"startDate"` // EndDate end date if filtered by end date. EndDate time.Time `json:"endDate"` // MaxResults max results from the original request echoed back. Defaults to // the system max of 250. MaxResults int `json:"maxResults"` // StartIndex starting index from the original request echoed back. StartIndex int `json:"startIndex"` // TotalResultCount total number of results accessible through paging. TotalResultCount int `json:"totalResultCount"` // Transactions matching transaction history. Transactions []AuthorizationResponse `json:"transactions"` }
TransactionHistoryResponse models response to a batch history request.
type TransactionStatus ¶
type TransactionStatus struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Approved indicates that the transaction was approved. Approved bool `json:"approved"` // AuthCode is the auth code from the payment network. AuthCode string `json:"authCode,omitempty"` // AuthResponseCode is the code returned by the terminal or the card issuer // to indicate the disposition of the message. AuthResponseCode string `json:"authResponseCode,omitempty"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // PartialAuth indicates whether or not the transaction was approved for a // partial amount. PartialAuth bool `json:"partialAuth"` // AltCurrency indicates whether or not an alternate currency was used. AltCurrency bool `json:"altCurrency"` // FSAAuth indicates whether or not a request was settled on an FSA card. FSAAuth bool `json:"fsaAuth"` // CurrencyCode is the currency code used for the transaction. CurrencyCode string `json:"currencyCode"` // RequestedAmount is the requested amount. RequestedAmount string `json:"requestedAmount"` // AuthorizedAmount is the authorized amount. May not match the requested // amount in the event of a partial auth. AuthorizedAmount string `json:"authorizedAmount"` // RemainingBalance is the remaining balance on the payment method. RemainingBalance string `json:"remainingBalance"` // TipAmount is the tip amount. TipAmount string `json:"tipAmount"` // TaxAmount is the tax amount. TaxAmount string `json:"taxAmount"` // RequestedCashBackAmount is the cash back amount the customer requested // during the transaction. RequestedCashBackAmount string `json:"requestedCashBackAmount"` // AuthorizedCashBackAmount is the amount of cash back authorized by the // gateway. This amount will be the entire amount requested, or zero. AuthorizedCashBackAmount string `json:"authorizedCashBackAmount"` // Token is the payment token, if the payment was enrolled in the vault. Token string `json:"token,omitempty"` // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string `json:"entryMethod,omitempty"` // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string `json:"paymentType,omitempty"` // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string `json:"network,omitempty"` // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string `json:"logo,omitempty"` // MaskedPAN is the masked primary account number. MaskedPAN string `json:"maskedPan,omitempty"` // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string `json:"publicKey,omitempty"` // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool `json:"ScopeAlert,omitempty"` // CardHolder is the cardholder name. CardHolder string `json:"cardHolder,omitempty"` // ExpMonth is the card expiration month in MM format. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year in YY format. ExpYear string `json:"expYear,omitempty"` // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse `json:"avsResponse"` // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions `json:"receiptSuggestions"` // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer `json:"customer"` // Customers contains customer data, if any. Customers []Customer `json:"customers"` // SigFile contains the hex encoded signature data. SigFile string `json:"sigFile,omitempty"` // StoreAndForward indicates that the transaction was flagged for store and // forward due to network problems. StoreAndForward bool `json:"storeAndForward"` }
TransactionStatus models the status of a transaction.
type TransactionStatusRequest ¶
type TransactionStatusRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TransactionID is the BlockChyp assigned transaction id. TransactionID string `json:"transactionId,omitempty"` }
TransactionStatusRequest models the request for updated information about a transaction.
type UnlinkTokenRequest ¶
type UnlinkTokenRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Token the token to delete. Token string `json:"token"` // CustomerID BlockChyp assigned customer id. CustomerID string `json:"customerId"` }
UnlinkTokenRequest removes a link between a payment token with a customer record, if one exists.
type UpdateCustomerRequest ¶
type UpdateCustomerRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Customer models a customer update request. Customer Customer `json:"customer"` }
UpdateCustomerRequest models a customer data search request.
type UploadMetadata ¶
type UploadMetadata struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // UploadID optional id used to track status and progress of an upload while // in progress. UploadID string `json:"uploadId"` // FileSize is the size of the file to be uploaded in bytes. FileSize int64 `json:"fileSize"` // FileName is the name of file to be uploaded. FileName string `json:"fileName"` }
UploadMetadata models information needed to process a file upload.
type UploadStatus ¶
type UploadStatus struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // ID id used to track status and progress of an upload while in progress. ID string `json:"id"` // MediaID is the media id assigned to the result. MediaID string `json:"mediaId"` // FileSize is the size of the file to be uploaded in bytes. FileSize int64 `json:"fileSize"` // UploadedAmount is the amount of the file already uploaded. UploadedAmount int64 `json:"uploadedAmount"` // Status is the current status of a file upload. Status string `json:"status"` // Complete indicates whether or not the upload and associated file // processing is complete. Complete bool `json:"complete"` // Processing indicates whether or not the file is processing. This normally // applied to video files undergoing format transcoding. Processing bool `json:"processing"` // Percentage current upload progress rounded to the nearest integer. Percentage int `json:"percentage"` // ThumbnailLocation is the url of a thumbnail for the file, if available. ThumbnailLocation string `json:"thumbnailLocation"` }
UploadStatus models the current status of a file upload.
type UploadStatusRequest ¶
type UploadStatusRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // UploadID id used to track status and progress of an upload while in // progress. UploadID string `json:"uploadId"` }
UploadStatusRequest is used to request the status of a file upload.
type VoidRequest ¶
type VoidRequest struct { // Timeout is the request timeout in seconds. Timeout int `json:"timeout"` // Test specifies whether or not to route transaction to the test gateway. Test bool `json:"test"` // TransactionRef contains a user-assigned reference that can be used to // recall or reverse transactions. TransactionRef string `json:"transactionRef,omitempty"` // AutogeneratedRef indicates that the transaction reference was // autogenerated and should be ignored for the purposes of duplicate // detection. AutogeneratedRef bool `json:"autogeneratedRef"` // Async defers the response to the transaction and returns immediately. // Callers should retrive the transaction result using the Transaction Status // API. Async bool `json:"async"` // Queue adds the transaction to the queue and returns immediately. Callers // should retrive the transaction result using the Transaction Status API. Queue bool `json:"queue"` // WaitForRemovedCard specifies whether or not the request should block until // all cards have been removed from the card reader. WaitForRemovedCard bool `json:"waitForRemovedCard,omitempty"` // Force causes a transaction to override any in-progress transactions. Force bool `json:"force,omitempty"` // OrderRef is an identifier from an external point of sale system. OrderRef string `json:"orderRef,omitempty"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // TransactionID is the ID of the previous transaction being referenced. TransactionID string `json:"transactionId"` }
VoidRequest contains a void request.
type VoidResponse ¶
type VoidResponse struct { // Success indicates whether or not the request succeeded. Success bool `json:"success"` // Error is the error, if an error occurred. Error string `json:"error"` // ResponseDescription contains a narrative description of the transaction // result. ResponseDescription string `json:"responseDescription"` // Approved indicates that the transaction was approved. Approved bool `json:"approved"` // AuthCode is the auth code from the payment network. AuthCode string `json:"authCode,omitempty"` // AuthResponseCode is the code returned by the terminal or the card issuer // to indicate the disposition of the message. AuthResponseCode string `json:"authResponseCode,omitempty"` // TransactionID is the ID assigned to the transaction. TransactionID string `json:"transactionId"` // BatchID is the ID assigned to the batch. BatchID string `json:"batchId,omitempty"` // TransactionRef is the transaction reference string assigned to the // transaction request. If no transaction ref was assiged on the request, // then the gateway will randomly generate one. TransactionRef string `json:"transactionRef,omitempty"` // TransactionType is the type of transaction. TransactionType string `json:"transactionType"` // Timestamp is the timestamp of the transaction. Timestamp string `json:"timestamp"` // TickBlock is the hash of the last tick block. TickBlock string `json:"tickBlock"` // Test indicates that the transaction was processed on the test gateway. Test bool `json:"test"` // DestinationAccount is the settlement account for merchants with split // settlements. DestinationAccount string `json:"destinationAccount,omitempty"` // Sig is the ECC signature of the response. Can be used to ensure that it // was signed by the terminal and detect man-in-the middle attacks. Sig string `json:"sig,omitempty"` // Token is the payment token, if the payment was enrolled in the vault. Token string `json:"token,omitempty"` // EntryMethod is the entry method for the transaction (CHIP, MSR, KEYED, // etc). EntryMethod string `json:"entryMethod,omitempty"` // PaymentType is the card brand (VISA, MC, AMEX, DEBIT, etc). PaymentType string `json:"paymentType,omitempty"` // Network provides network level detail on how a transaction was routed, // especially for debit transactions. Network string `json:"network,omitempty"` // Logo identifies the card association based on bin number. Used primarily // used to indicate the major logo on a card, even when debit transactions // are routed on a different network. Logo string `json:"logo,omitempty"` // MaskedPAN is the masked primary account number. MaskedPAN string `json:"maskedPan,omitempty"` // PublicKey is the BlockChyp public key if the user presented a BlockChyp // payment card. PublicKey string `json:"publicKey,omitempty"` // ScopeAlert indicates that the transaction did something that would put the // system in PCI scope. ScopeAlert bool `json:"ScopeAlert,omitempty"` // CardHolder is the cardholder name. CardHolder string `json:"cardHolder,omitempty"` // ExpMonth is the card expiration month in MM format. ExpMonth string `json:"expMonth,omitempty"` // ExpYear is the card expiration year in YY format. ExpYear string `json:"expYear,omitempty"` // AVSResponse contains address verification results if address information // was submitted. AVSResponse AVSResponse `json:"avsResponse"` // ReceiptSuggestions contains suggested receipt fields. ReceiptSuggestions ReceiptSuggestions `json:"receiptSuggestions"` // Customer contains customer data, if any. Preserved for reverse // compatibility. Customer *Customer `json:"customer"` // Customers contains customer data, if any. Customers []Customer `json:"customers"` // SigFile contains the hex encoded signature data. SigFile string `json:"sigFile,omitempty"` }
VoidResponse contains the response to a void request.
type WhiteListedCard ¶
type WhiteListedCard struct { // Bin is the card BIN. Bin string `json:"bin"` // Track1 is the track 1 data from the card. Track1 string `json:"track1"` // Track2 is the track 2 data from the card. Track2 string `json:"track2"` // PAN is the card primary account number. PAN string `json:"pan"` }
WhiteListedCard shows details about a white listed card.