Documentation ¶
Index ¶
- func F[T any](value T) param.Field[T]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(str string) param.Field[string]
- type APIStatus
- type Account
- type AccountAccountHolder
- type AccountHolder
- type AccountHolderDocument
- type AccountHolderDocumentDocumentType
- type AccountHolderDocumentRequiredDocumentUpload
- type AccountHolderDocumentRequiredDocumentUploadsImageType
- type AccountHolderDocumentRequiredDocumentUploadsStatus
- type AccountHolderDocumentRequiredDocumentUploadsStatusReason
- type AccountHolderListDocumentsResponse
- type AccountHolderNewParams
- type AccountHolderNewParamsKYB
- type AccountHolderNewParamsKYBBeneficialOwnerEntity
- type AccountHolderNewParamsKYBBeneficialOwnerIndividual
- type AccountHolderNewParamsKYBBusinessEntity
- type AccountHolderNewParamsKYBControlPerson
- type AccountHolderNewParamsKYBWorkflow
- type AccountHolderNewParamsKYC
- type AccountHolderNewParamsKYCExempt
- type AccountHolderNewParamsKYCExemptKYCExemptionType
- type AccountHolderNewParamsKYCExemptWorkflow
- type AccountHolderNewParamsKYCIndividual
- type AccountHolderNewParamsKYCWorkflow
- type AccountHolderNewWebhookParams
- type AccountHolderNewWebhookResponse
- type AccountHolderNewWebhookResponseData
- type AccountHolderResubmitParams
- type AccountHolderResubmitParamsIndividual
- type AccountHolderResubmitParamsWorkflow
- type AccountHolderService
- func (r *AccountHolderService) Get(ctx context.Context, accountHolderToken string, opts ...option.RequestOption) (res *AccountHolder, err error)
- func (r *AccountHolderService) GetDocument(ctx context.Context, accountHolderToken string, documentToken string, ...) (res *AccountHolderDocument, err error)
- func (r *AccountHolderService) ListDocuments(ctx context.Context, accountHolderToken string, opts ...option.RequestOption) (res *AccountHolderListDocumentsResponse, err error)
- func (r *AccountHolderService) New(ctx context.Context, body AccountHolderNewParams, opts ...option.RequestOption) (res *AccountHolder, err error)
- func (r *AccountHolderService) NewWebhook(ctx context.Context, body AccountHolderNewWebhookParams, ...) (res *AccountHolderNewWebhookResponse, err error)
- func (r *AccountHolderService) Resubmit(ctx context.Context, accountHolderToken string, ...) (res *AccountHolder, err error)
- func (r *AccountHolderService) Update(ctx context.Context, accountHolderToken string, body AccountHolderUpdateParams, ...) (res *AccountHolderUpdateResponse, err error)
- func (r *AccountHolderService) UploadDocument(ctx context.Context, accountHolderToken string, ...) (res *AccountHolderDocument, err error)
- type AccountHolderStatus
- type AccountHolderStatusReason
- type AccountHolderUpdateParams
- type AccountHolderUpdateResponse
- type AccountHolderUploadDocumentParams
- type AccountHolderUploadDocumentParamsDocumentType
- type AccountListParams
- type AccountService
- func (r *AccountService) Get(ctx context.Context, accountToken string, opts ...option.RequestOption) (res *Account, err error)
- func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *shared.Page[Account], err error)
- func (r *AccountService) ListAutoPaging(ctx context.Context, query AccountListParams, opts ...option.RequestOption) *shared.PageAutoPager[Account]
- func (r *AccountService) Update(ctx context.Context, accountToken string, body AccountUpdateParams, ...) (res *Account, err error)
- type AccountSpendLimit
- type AccountState
- type AccountUpdateParams
- type AccountUpdateParamsState
- type AccountUpdateParamsVerificationAddress
- type AccountVerificationAddress
- type AddressParam
- type AggregateBalance
- type AggregateBalanceFinancialAccountType
- type AggregateBalanceListParams
- type AggregateBalanceListParamsFinancialAccountType
- type AggregateBalanceService
- func (r *AggregateBalanceService) List(ctx context.Context, query AggregateBalanceListParams, ...) (res *shared.SinglePage[AggregateBalance], err error)
- func (r *AggregateBalanceService) ListAutoPaging(ctx context.Context, query AggregateBalanceListParams, ...) *shared.SinglePageAutoPager[AggregateBalance]
- type AuthRule
- type AuthRuleApplyParams
- type AuthRuleApplyResponse
- type AuthRuleGetResponse
- type AuthRuleListParams
- type AuthRuleNewParams
- type AuthRuleNewResponse
- type AuthRuleRemoveParams
- type AuthRuleRemoveResponse
- type AuthRuleService
- func (r *AuthRuleService) Apply(ctx context.Context, authRuleToken string, body AuthRuleApplyParams, ...) (res *AuthRuleApplyResponse, err error)
- func (r *AuthRuleService) Get(ctx context.Context, authRuleToken string, opts ...option.RequestOption) (res *AuthRuleGetResponse, err error)
- func (r *AuthRuleService) List(ctx context.Context, query AuthRuleListParams, opts ...option.RequestOption) (res *shared.Page[AuthRule], err error)
- func (r *AuthRuleService) ListAutoPaging(ctx context.Context, query AuthRuleListParams, opts ...option.RequestOption) *shared.PageAutoPager[AuthRule]
- func (r *AuthRuleService) New(ctx context.Context, body AuthRuleNewParams, opts ...option.RequestOption) (res *AuthRuleNewResponse, err error)
- func (r *AuthRuleService) Remove(ctx context.Context, body AuthRuleRemoveParams, opts ...option.RequestOption) (res *AuthRuleRemoveResponse, err error)
- func (r *AuthRuleService) Update(ctx context.Context, authRuleToken string, body AuthRuleUpdateParams, ...) (res *AuthRuleUpdateResponse, err error)
- type AuthRuleState
- type AuthRuleUpdateParams
- type AuthRuleUpdateResponse
- type AuthStreamEnrollment
- type AuthStreamEnrollmentEnrollParams
- type AuthStreamEnrollmentService
- func (r *AuthStreamEnrollmentService) Disenroll(ctx context.Context, opts ...option.RequestOption) (err error)
- func (r *AuthStreamEnrollmentService) Enroll(ctx context.Context, body AuthStreamEnrollmentEnrollParams, ...) (err error)
- func (r *AuthStreamEnrollmentService) Get(ctx context.Context, opts ...option.RequestOption) (res *AuthStreamEnrollment, err error)
- func (r *AuthStreamEnrollmentService) GetSecret(ctx context.Context, opts ...option.RequestOption) (res *AuthStreamSecret, err error)
- func (r *AuthStreamEnrollmentService) RotateSecret(ctx context.Context, opts ...option.RequestOption) (err error)
- type AuthStreamSecret
- type Balance
- type BalanceListParams
- type BalanceListParamsFinancialAccountType
- type BalanceService
- func (r *BalanceService) List(ctx context.Context, query BalanceListParams, opts ...option.RequestOption) (res *shared.SinglePage[Balance], err error)
- func (r *BalanceService) ListAutoPaging(ctx context.Context, query BalanceListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[Balance]
- type BalanceType
- type Card
- type CardEmbedParams
- type CardFunding
- type CardFundingState
- type CardFundingType
- type CardGetEmbedHTMLParams
- type CardGetEmbedURLParams
- type CardListParams
- type CardNewParams
- type CardNewParamsShippingMethod
- type CardNewParamsState
- type CardNewParamsType
- type CardProvisionParams
- type CardProvisionParamsDigitalWallet
- type CardProvisionResponse
- type CardReissueParams
- type CardReissueParamsShippingMethod
- type CardService
- func (r *CardService) Embed(ctx context.Context, query CardEmbedParams, opts ...option.RequestOption) (res *string, err error)
- func (r *CardService) Get(ctx context.Context, cardToken string, opts ...option.RequestOption) (res *Card, err error)
- func (r *CardService) GetEmbedHTML(ctx context.Context, body CardGetEmbedHTMLParams, opts ...option.RequestOption) (res []byte, err error)
- func (r *CardService) GetEmbedURL(ctx context.Context, body CardGetEmbedURLParams, opts ...option.RequestOption) (res *url.URL, err error)
- func (r *CardService) List(ctx context.Context, query CardListParams, opts ...option.RequestOption) (res *shared.Page[Card], err error)
- func (r *CardService) ListAutoPaging(ctx context.Context, query CardListParams, opts ...option.RequestOption) *shared.PageAutoPager[Card]
- func (r *CardService) New(ctx context.Context, body CardNewParams, opts ...option.RequestOption) (res *Card, err error)
- func (r *CardService) Provision(ctx context.Context, cardToken string, body CardProvisionParams, ...) (res *CardProvisionResponse, err error)
- func (r *CardService) Reissue(ctx context.Context, cardToken string, body CardReissueParams, ...) (res *Card, err error)
- func (r *CardService) Update(ctx context.Context, cardToken string, body CardUpdateParams, ...) (res *Card, err error)
- type CardState
- type CardType
- type CardUpdateParams
- type CardUpdateParamsState
- type Client
- type Dispute
- type DisputeEvidence
- type DisputeEvidenceUploadStatus
- type DisputeInitiateEvidenceUploadParams
- type DisputeListEvidencesParams
- type DisputeListParams
- type DisputeListParamsStatus
- type DisputeNewParams
- type DisputeNewParamsReason
- type DisputeReason
- type DisputeResolutionReason
- type DisputeService
- func (r *DisputeService) Delete(ctx context.Context, disputeToken string, opts ...option.RequestOption) (res *Dispute, err error)
- func (r *DisputeService) DeleteEvidence(ctx context.Context, disputeToken string, evidenceToken string, ...) (res *DisputeEvidence, err error)
- func (r *DisputeService) Get(ctx context.Context, disputeToken string, opts ...option.RequestOption) (res *Dispute, err error)
- func (r *DisputeService) GetEvidence(ctx context.Context, disputeToken string, evidenceToken string, ...) (res *DisputeEvidence, err error)
- func (r *DisputeService) InitiateEvidenceUpload(ctx context.Context, disputeToken string, ...) (res *DisputeEvidence, err error)
- func (r *DisputeService) List(ctx context.Context, query DisputeListParams, opts ...option.RequestOption) (res *shared.CursorPage[Dispute], err error)
- func (r *DisputeService) ListAutoPaging(ctx context.Context, query DisputeListParams, opts ...option.RequestOption) *shared.CursorPageAutoPager[Dispute]
- func (r *DisputeService) ListEvidences(ctx context.Context, disputeToken string, query DisputeListEvidencesParams, ...) (res *shared.CursorPage[DisputeEvidence], err error)
- func (r *DisputeService) ListEvidencesAutoPaging(ctx context.Context, disputeToken string, query DisputeListEvidencesParams, ...) *shared.CursorPageAutoPager[DisputeEvidence]
- func (r *DisputeService) New(ctx context.Context, body DisputeNewParams, opts ...option.RequestOption) (res *Dispute, err error)
- func (r *DisputeService) Update(ctx context.Context, disputeToken string, body DisputeUpdateParams, ...) (res *Dispute, err error)
- func (r *DisputeService) UploadEvidence(ctx context.Context, disputeToken string, file io.Reader, ...) (err error)
- type DisputeStatus
- type DisputeUpdateParams
- type DisputeUpdateParamsReason
- type DisputeUploadEvidenceParams
- type Error
- type Event
- type EventEventType
- type EventListParams
- type EventListParamsEventType
- type EventService
- func (r *EventService) Get(ctx context.Context, eventToken string, opts ...option.RequestOption) (res *Event, err error)
- func (r *EventService) List(ctx context.Context, query EventListParams, opts ...option.RequestOption) (res *shared.CursorPage[Event], err error)
- func (r *EventService) ListAutoPaging(ctx context.Context, query EventListParams, opts ...option.RequestOption) *shared.CursorPageAutoPager[Event]
- type EventSubscription
- type EventSubscriptionEventType
- type EventSubscriptionGetSecretResponse
- type EventSubscriptionListParams
- type EventSubscriptionNewParams
- type EventSubscriptionNewParamsEventType
- type EventSubscriptionRecoverParams
- type EventSubscriptionReplayMissingParams
- type EventSubscriptionService
- func (r *EventSubscriptionService) Delete(ctx context.Context, eventSubscriptionToken string, ...) (err error)
- func (r *EventSubscriptionService) Get(ctx context.Context, eventSubscriptionToken string, ...) (res *EventSubscription, err error)
- func (r *EventSubscriptionService) GetSecret(ctx context.Context, eventSubscriptionToken string, ...) (res *EventSubscriptionGetSecretResponse, err error)
- func (r *EventSubscriptionService) List(ctx context.Context, query EventSubscriptionListParams, ...) (res *shared.CursorPage[EventSubscription], err error)
- func (r *EventSubscriptionService) ListAutoPaging(ctx context.Context, query EventSubscriptionListParams, ...) *shared.CursorPageAutoPager[EventSubscription]
- func (r *EventSubscriptionService) New(ctx context.Context, body EventSubscriptionNewParams, ...) (res *EventSubscription, err error)
- func (r *EventSubscriptionService) Recover(ctx context.Context, eventSubscriptionToken string, ...) (err error)
- func (r *EventSubscriptionService) ReplayMissing(ctx context.Context, eventSubscriptionToken string, ...) (err error)
- func (r *EventSubscriptionService) RotateSecret(ctx context.Context, eventSubscriptionToken string, ...) (err error)
- func (r *EventSubscriptionService) Update(ctx context.Context, eventSubscriptionToken string, ...) (res *EventSubscription, err error)
- type EventSubscriptionUpdateParams
- type EventSubscriptionUpdateParamsEventType
- type FinancialAccount
- type FinancialAccountBalanceListParams
- type FinancialAccountBalanceService
- type FinancialAccountFinancialTransactionService
- func (r *FinancialAccountFinancialTransactionService) Get(ctx context.Context, financialAccountToken string, ...) (res *FinancialTransaction, err error)
- func (r *FinancialAccountFinancialTransactionService) List(ctx context.Context, financialAccountToken string, ...) (res *shared.SinglePage[FinancialTransaction], err error)
- func (r *FinancialAccountFinancialTransactionService) ListAutoPaging(ctx context.Context, financialAccountToken string, ...) *shared.SinglePageAutoPager[FinancialTransaction]
- type FinancialAccountListParams
- type FinancialAccountListParamsType
- type FinancialAccountParam
- type FinancialAccountService
- func (r *FinancialAccountService) List(ctx context.Context, query FinancialAccountListParams, ...) (res *shared.SinglePage[FinancialAccount], err error)
- func (r *FinancialAccountService) ListAutoPaging(ctx context.Context, query FinancialAccountListParams, ...) *shared.SinglePageAutoPager[FinancialAccount]
- type FinancialAccountType
- type FinancialTransaction
- type FinancialTransactionCategory
- type FinancialTransactionEvent
- type FinancialTransactionEventsResult
- type FinancialTransactionEventsType
- type FinancialTransactionListParams
- type FinancialTransactionListParamsCategory
- type FinancialTransactionListParamsResult
- type FinancialTransactionListParamsStatus
- type FinancialTransactionResult
- type FinancialTransactionStatus
- type ResponderEndpointCheckStatusParams
- type ResponderEndpointCheckStatusParamsType
- type ResponderEndpointDeleteParams
- type ResponderEndpointDeleteParamsType
- type ResponderEndpointNewParams
- type ResponderEndpointNewParamsType
- type ResponderEndpointNewResponse
- type ResponderEndpointService
- func (r *ResponderEndpointService) CheckStatus(ctx context.Context, query ResponderEndpointCheckStatusParams, ...) (res *ResponderEndpointStatus, err error)
- func (r *ResponderEndpointService) Delete(ctx context.Context, body ResponderEndpointDeleteParams, ...) (err error)
- func (r *ResponderEndpointService) New(ctx context.Context, body ResponderEndpointNewParams, ...) (res *ResponderEndpointNewResponse, err error)
- type ResponderEndpointStatus
- type ShippingAddressParam
- type SpendLimitDuration
- type TokenizationDecisioningRotateSecretResponse
- type TokenizationDecisioningService
- func (r *TokenizationDecisioningService) GetSecret(ctx context.Context, opts ...option.RequestOption) (res *TokenizationSecret, err error)
- func (r *TokenizationDecisioningService) RotateSecret(ctx context.Context, opts ...option.RequestOption) (res *TokenizationDecisioningRotateSecretResponse, err error)
- type TokenizationSecret
- type Transaction
- type TransactionCardholderAuthentication
- type TransactionCardholderAuthenticationAcquirerExemption
- type TransactionCardholderAuthenticationLiabilityShift
- type TransactionCardholderAuthenticationVerificationAttempted
- type TransactionCardholderAuthenticationVerificationResult
- type TransactionEvent
- type TransactionEventsResult
- type TransactionEventsType
- type TransactionListParams
- type TransactionListParamsResult
- type TransactionMerchant
- type TransactionNetwork
- type TransactionResult
- type TransactionService
- func (r *TransactionService) Get(ctx context.Context, transactionToken string, opts ...option.RequestOption) (res *Transaction, err error)
- func (r *TransactionService) List(ctx context.Context, query TransactionListParams, opts ...option.RequestOption) (res *shared.Page[Transaction], err error)
- func (r *TransactionService) ListAutoPaging(ctx context.Context, query TransactionListParams, opts ...option.RequestOption) *shared.PageAutoPager[Transaction]
- func (r *TransactionService) SimulateAuthorization(ctx context.Context, body TransactionSimulateAuthorizationParams, ...) (res *TransactionSimulateAuthorizationResponse, err error)
- func (r *TransactionService) SimulateAuthorizationAdvice(ctx context.Context, body TransactionSimulateAuthorizationAdviceParams, ...) (res *TransactionSimulateAuthorizationAdviceResponse, err error)
- func (r *TransactionService) SimulateClearing(ctx context.Context, body TransactionSimulateClearingParams, ...) (res *TransactionSimulateClearingResponse, err error)
- func (r *TransactionService) SimulateCreditAuthorization(ctx context.Context, body TransactionSimulateCreditAuthorizationParams, ...) (res *TransactionSimulateCreditAuthorizationResponse, err error)
- func (r *TransactionService) SimulateReturn(ctx context.Context, body TransactionSimulateReturnParams, ...) (res *TransactionSimulateReturnResponse, err error)
- func (r *TransactionService) SimulateReturnReversal(ctx context.Context, body TransactionSimulateReturnReversalParams, ...) (res *TransactionSimulateReturnReversalResponse, err error)
- func (r *TransactionService) SimulateVoid(ctx context.Context, body TransactionSimulateVoidParams, ...) (res *TransactionSimulateVoidResponse, err error)
- type TransactionSimulateAuthorizationAdviceParams
- type TransactionSimulateAuthorizationAdviceResponse
- type TransactionSimulateAuthorizationParams
- type TransactionSimulateAuthorizationParamsStatus
- type TransactionSimulateAuthorizationResponse
- type TransactionSimulateClearingParams
- type TransactionSimulateClearingResponse
- type TransactionSimulateCreditAuthorizationParams
- type TransactionSimulateCreditAuthorizationResponse
- type TransactionSimulateReturnParams
- type TransactionSimulateReturnResponse
- type TransactionSimulateReturnReversalParams
- type TransactionSimulateReturnReversalResponse
- type TransactionSimulateVoidParams
- type TransactionSimulateVoidParamsType
- type TransactionSimulateVoidResponse
- type TransactionStatus
- type Transfer
- type TransferCategory
- type TransferEvent
- type TransferEventsResult
- type TransferEventsType
- type TransferNewParams
- type TransferNewResponse
- type TransferResult
- type TransferService
- type TransferStatus
- type WebhookService
- type WebhookVerifySignatureParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type APIStatus ¶
type APIStatus struct { Message string `json:"message"` JSON apiStatusJSON }
func (*APIStatus) UnmarshalJSON ¶
type Account ¶
type Account struct { // Globally unique identifier for the account. This is the same as the // account_token returned by the enroll endpoint. If using this parameter, do not // include pagination. Token string `json:"token,required" format:"uuid"` // Spend limit information for the user containing the daily, monthly, and lifetime // spend limit of the account. Any charges to a card owned by this account will be // declined once their transaction volume has surpassed the value in the applicable // time limit (rolling). A lifetime limit of 0 indicates that the lifetime limit // feature is disabled. SpendLimit AccountSpendLimit `json:"spend_limit,required"` // Account state: // // - `ACTIVE` - Account is able to transact and create new cards. // - `PAUSED` - Account will not be able to transact or create new cards. It can be // set back to `ACTIVE`. // - `CLOSED` - Account will permanently not be able to transact or create new // cards. State AccountState `json:"state,required"` AccountHolder AccountAccountHolder `json:"account_holder"` // List of identifiers for the Auth Rule(s) that are applied on the account. AuthRuleTokens []string `json:"auth_rule_tokens"` VerificationAddress AccountVerificationAddress `json:"verification_address"` JSON accountJSON }
func (*Account) UnmarshalJSON ¶
type AccountAccountHolder ¶
type AccountAccountHolder struct { // Globally unique identifier for the account holder. Token string `json:"token,required"` // Only applicable for customers using the KYC-Exempt workflow to enroll authorized // users of businesses. Account_token of the enrolled business associated with an // enrolled AUTHORIZED_USER individual. BusinessAccountToken string `json:"business_account_token,required"` // Email address. Email string `json:"email,required"` // Phone number of the individual. PhoneNumber string `json:"phone_number,required"` JSON accountAccountHolderJSON }
func (*AccountAccountHolder) UnmarshalJSON ¶
func (r *AccountAccountHolder) UnmarshalJSON(data []byte) (err error)
type AccountHolder ¶
type AccountHolder struct { // Globally unique identifier for the account holder. Token string `json:"token" format:"uuid"` // Globally unique identifier for the account. AccountToken string `json:"account_token" format:"uuid"` // Only applicable for customers using the KYC-Exempt workflow to enroll authorized // users of businesses. Pass the account_token of the enrolled business associated // with the AUTHORIZED_USER in this field. BusinessAccountToken string `json:"business_account_token" format:"uuid"` // KYC and KYB evaluation states. // // Note: `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the // `ADVANCED` workflow. Status AccountHolderStatus `json:"status"` // Reason for the evaluation status. StatusReasons []AccountHolderStatusReason `json:"status_reasons"` JSON accountHolderJSON }
func (*AccountHolder) UnmarshalJSON ¶
func (r *AccountHolder) UnmarshalJSON(data []byte) (err error)
type AccountHolderDocument ¶
type AccountHolderDocument struct { // Globally unique identifier for the document. Token string `json:"token" format:"uuid"` // Globally unique identifier for the account holder. AccountHolderToken string `json:"account_holder_token" format:"uuid"` // Type of documentation to be submitted for verification. DocumentType AccountHolderDocumentDocumentType `json:"document_type"` RequiredDocumentUploads []AccountHolderDocumentRequiredDocumentUpload `json:"required_document_uploads"` JSON accountHolderDocumentJSON }
Describes the document and the required document image uploads required to re-run KYC.
func (*AccountHolderDocument) UnmarshalJSON ¶
func (r *AccountHolderDocument) UnmarshalJSON(data []byte) (err error)
type AccountHolderDocumentDocumentType ¶
type AccountHolderDocumentDocumentType string
Type of documentation to be submitted for verification.
const ( AccountHolderDocumentDocumentTypeCommercialLicense AccountHolderDocumentDocumentType = "commercial_license" AccountHolderDocumentDocumentTypeDriversLicense AccountHolderDocumentDocumentType = "drivers_license" AccountHolderDocumentDocumentTypePassport AccountHolderDocumentDocumentType = "passport" AccountHolderDocumentDocumentTypePassportCard AccountHolderDocumentDocumentType = "passport_card" AccountHolderDocumentDocumentTypeVisa AccountHolderDocumentDocumentType = "visa" )
type AccountHolderDocumentRequiredDocumentUpload ¶ added in v0.5.0
type AccountHolderDocumentRequiredDocumentUpload struct { // Type of image to upload. ImageType AccountHolderDocumentRequiredDocumentUploadsImageType `json:"image_type"` // Status of document image upload. Status AccountHolderDocumentRequiredDocumentUploadsStatus `json:"status"` StatusReasons []AccountHolderDocumentRequiredDocumentUploadsStatusReason `json:"status_reasons"` // URL to upload document image to. // // Note that the upload URLs expire after 7 days. If an upload URL expires, you can // refresh the URLs by retrieving the document upload from // `GET /account_holders/{account_holder_token}/documents`. UploadURL string `json:"upload_url"` JSON accountHolderDocumentRequiredDocumentUploadJSON }
Represents a single image of the document to upload.
func (*AccountHolderDocumentRequiredDocumentUpload) UnmarshalJSON ¶ added in v0.5.0
func (r *AccountHolderDocumentRequiredDocumentUpload) UnmarshalJSON(data []byte) (err error)
type AccountHolderDocumentRequiredDocumentUploadsImageType ¶
type AccountHolderDocumentRequiredDocumentUploadsImageType string
Type of image to upload.
const ( AccountHolderDocumentRequiredDocumentUploadsImageTypeBack AccountHolderDocumentRequiredDocumentUploadsImageType = "back" AccountHolderDocumentRequiredDocumentUploadsImageTypeFront AccountHolderDocumentRequiredDocumentUploadsImageType = "front" )
type AccountHolderDocumentRequiredDocumentUploadsStatus ¶
type AccountHolderDocumentRequiredDocumentUploadsStatus string
Status of document image upload.
const ( AccountHolderDocumentRequiredDocumentUploadsStatusCompleted AccountHolderDocumentRequiredDocumentUploadsStatus = "COMPLETED" AccountHolderDocumentRequiredDocumentUploadsStatusFailed AccountHolderDocumentRequiredDocumentUploadsStatus = "FAILED" AccountHolderDocumentRequiredDocumentUploadsStatusPending AccountHolderDocumentRequiredDocumentUploadsStatus = "PENDING" AccountHolderDocumentRequiredDocumentUploadsStatusUploaded AccountHolderDocumentRequiredDocumentUploadsStatus = "UPLOADED" )
type AccountHolderDocumentRequiredDocumentUploadsStatusReason ¶ added in v0.5.0
type AccountHolderDocumentRequiredDocumentUploadsStatusReason string
Reasons for document image upload status.
const ( AccountHolderDocumentRequiredDocumentUploadsStatusReasonBackImageBlurry AccountHolderDocumentRequiredDocumentUploadsStatusReason = "BACK_IMAGE_BLURRY" AccountHolderDocumentRequiredDocumentUploadsStatusReasonFileSizeTooLarge AccountHolderDocumentRequiredDocumentUploadsStatusReason = "FILE_SIZE_TOO_LARGE" AccountHolderDocumentRequiredDocumentUploadsStatusReasonFrontImageBlurry AccountHolderDocumentRequiredDocumentUploadsStatusReason = "FRONT_IMAGE_BLURRY" AccountHolderDocumentRequiredDocumentUploadsStatusReasonFrontImageGlare AccountHolderDocumentRequiredDocumentUploadsStatusReason = "FRONT_IMAGE_GLARE" AccountHolderDocumentRequiredDocumentUploadsStatusReasonInvalidFileType AccountHolderDocumentRequiredDocumentUploadsStatusReason = "INVALID_FILE_TYPE" AccountHolderDocumentRequiredDocumentUploadsStatusReasonUnknownError AccountHolderDocumentRequiredDocumentUploadsStatusReason = "UNKNOWN_ERROR" )
type AccountHolderListDocumentsResponse ¶
type AccountHolderListDocumentsResponse struct { Data []AccountHolderDocument `json:"data"` JSON accountHolderListDocumentsResponseJSON }
func (*AccountHolderListDocumentsResponse) UnmarshalJSON ¶
func (r *AccountHolderListDocumentsResponse) UnmarshalJSON(data []byte) (err error)
type AccountHolderNewParams ¶
type AccountHolderNewParams interface {
ImplementsAccountHolderNewParams()
}
This interface is a union satisfied by one of the following: AccountHolderNewParamsKYB, AccountHolderNewParamsKYC, AccountHolderNewParamsKYCExempt.
type AccountHolderNewParamsKYB ¶ added in v0.3.1
type AccountHolderNewParamsKYB struct { // List of all entities with >25% ownership in the company. If no entity or // individual owns >25% of the company, and the largest shareholder is an entity, // please identify them in this field. See // [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) // (Section I) for more background. If no business owner is an entity, pass in an // empty list. However, either this parameter or `beneficial_owner_individuals` // must be populated. on entities that should be included. BeneficialOwnerEntities param.Field[[]AccountHolderNewParamsKYBBeneficialOwnerEntity] `json:"beneficial_owner_entities,required"` // List of all individuals with >25% ownership in the company. If no entity or // individual owns >25% of the company, and the largest shareholder is an // individual, please identify them in this field. See // [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) // (Section I) for more background on individuals that should be included. If no // individual is an entity, pass in an empty list. However, either this parameter // or `beneficial_owner_entities` must be populated. BeneficialOwnerIndividuals param.Field[[]AccountHolderNewParamsKYBBeneficialOwnerIndividual] `json:"beneficial_owner_individuals,required"` // Information for business for which the account is being opened and KYB is being // run. BusinessEntity param.Field[AccountHolderNewParamsKYBBusinessEntity] `json:"business_entity,required"` // An individual with significant responsibility for managing the legal entity // (e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating // Officer, Managing Member, General Partner, President, Vice President, or // Treasurer). This can be an executive, or someone who will have program-wide // access to the cards that Lithic will provide. In some cases, this individual // could also be a beneficial owner listed above. See // [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) // (Section II) for more background. ControlPerson param.Field[AccountHolderNewParamsKYBControlPerson] `json:"control_person,required"` // Short description of the company's line of business (i.e., what does the company // do?). NatureOfBusiness param.Field[string] `json:"nature_of_business,required"` // An RFC 3339 timestamp indicating when the account holder accepted the applicable // legal agreements (e.g., cardholder terms) as agreed upon during API customer's // implementation with Lithic. TosTimestamp param.Field[string] `json:"tos_timestamp,required"` // Company website URL. WebsiteURL param.Field[string] `json:"website_url,required"` // Specifies the type of KYB workflow to run. Workflow param.Field[AccountHolderNewParamsKYBWorkflow] `json:"workflow,required"` // An RFC 3339 timestamp indicating when precomputed KYC was completed on the // business with a pass result. // // This field is required only if workflow type is `KYB_BYO`. KYBPassedTimestamp param.Field[string] `json:"kyb_passed_timestamp"` }
func (AccountHolderNewParamsKYB) ImplementsAccountHolderNewParams ¶ added in v0.3.1
func (AccountHolderNewParamsKYB) ImplementsAccountHolderNewParams()
func (AccountHolderNewParamsKYB) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderNewParamsKYB) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYBBeneficialOwnerEntity ¶ added in v0.5.0
type AccountHolderNewParamsKYBBeneficialOwnerEntity struct { // Business's physical address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Address param.Field[shared.AddressParam] `json:"address,required"` // Government-issued identification number. US Federal Employer Identification // Numbers (EIN) are currently supported, entered as full nine-digits, with or // without hyphens. GovernmentID param.Field[string] `json:"government_id,required"` // Legal (formal) business name. LegalBusinessName param.Field[string] `json:"legal_business_name,required"` // One or more of the business's phone number(s), entered as a list in E.164 // format. PhoneNumbers param.Field[[]string] `json:"phone_numbers,required"` // Any name that the business operates under that is not its legal business name // (if applicable). DbaBusinessName param.Field[string] `json:"dba_business_name"` // Parent company name (if applicable). ParentCompany param.Field[string] `json:"parent_company"` }
func (AccountHolderNewParamsKYBBeneficialOwnerEntity) MarshalJSON ¶ added in v0.5.0
func (r AccountHolderNewParamsKYBBeneficialOwnerEntity) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYBBeneficialOwnerIndividual ¶ added in v0.5.0
type AccountHolderNewParamsKYBBeneficialOwnerIndividual struct { // Individual's current address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. Address param.Field[shared.AddressParam] `json:"address,required"` // Individual's date of birth, as an RFC 3339 date. Dob param.Field[string] `json:"dob,required"` // Individual's email address. If utilizing Lithic for chargeback processing, this // customer email address may be used to communicate dispute status and resolution. Email param.Field[string] `json:"email,required"` // Individual's first name, as it appears on government-issued identity documents. FirstName param.Field[string] `json:"first_name,required"` // Government-issued identification number (required for identity verification and // compliance with banking regulations). Social Security Numbers (SSN) and // Individual Taxpayer Identification Numbers (ITIN) are currently supported, // entered as full nine-digits, with or without hyphens GovernmentID param.Field[string] `json:"government_id,required"` // Individual's last name, as it appears on government-issued identity documents. LastName param.Field[string] `json:"last_name,required"` // Individual's phone number, entered in E.164 format. PhoneNumber param.Field[string] `json:"phone_number,required"` }
func (AccountHolderNewParamsKYBBeneficialOwnerIndividual) MarshalJSON ¶ added in v0.5.0
func (r AccountHolderNewParamsKYBBeneficialOwnerIndividual) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYBBusinessEntity ¶ added in v0.3.1
type AccountHolderNewParamsKYBBusinessEntity struct { // Business's physical address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Address param.Field[shared.AddressParam] `json:"address,required"` // Government-issued identification number. US Federal Employer Identification // Numbers (EIN) are currently supported, entered as full nine-digits, with or // without hyphens. GovernmentID param.Field[string] `json:"government_id,required"` // Legal (formal) business name. LegalBusinessName param.Field[string] `json:"legal_business_name,required"` // One or more of the business's phone number(s), entered as a list in E.164 // format. PhoneNumbers param.Field[[]string] `json:"phone_numbers,required"` // Any name that the business operates under that is not its legal business name // (if applicable). DbaBusinessName param.Field[string] `json:"dba_business_name"` // Parent company name (if applicable). ParentCompany param.Field[string] `json:"parent_company"` }
Information for business for which the account is being opened and KYB is being run.
func (AccountHolderNewParamsKYBBusinessEntity) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderNewParamsKYBBusinessEntity) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYBControlPerson ¶ added in v0.3.1
type AccountHolderNewParamsKYBControlPerson struct { // Individual's current address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. Address param.Field[shared.AddressParam] `json:"address,required"` // Individual's date of birth, as an RFC 3339 date. Dob param.Field[string] `json:"dob,required"` // Individual's email address. If utilizing Lithic for chargeback processing, this // customer email address may be used to communicate dispute status and resolution. Email param.Field[string] `json:"email,required"` // Individual's first name, as it appears on government-issued identity documents. FirstName param.Field[string] `json:"first_name,required"` // Government-issued identification number (required for identity verification and // compliance with banking regulations). Social Security Numbers (SSN) and // Individual Taxpayer Identification Numbers (ITIN) are currently supported, // entered as full nine-digits, with or without hyphens GovernmentID param.Field[string] `json:"government_id,required"` // Individual's last name, as it appears on government-issued identity documents. LastName param.Field[string] `json:"last_name,required"` // Individual's phone number, entered in E.164 format. PhoneNumber param.Field[string] `json:"phone_number,required"` }
An individual with significant responsibility for managing the legal entity (e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating Officer, Managing Member, General Partner, President, Vice President, or Treasurer). This can be an executive, or someone who will have program-wide access to the cards that Lithic will provide. In some cases, this individual could also be a beneficial owner listed above. See [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf) (Section II) for more background.
func (AccountHolderNewParamsKYBControlPerson) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderNewParamsKYBControlPerson) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYBWorkflow ¶ added in v0.3.1
type AccountHolderNewParamsKYBWorkflow string
Specifies the type of KYB workflow to run.
const ( AccountHolderNewParamsKYBWorkflowKYBBasic AccountHolderNewParamsKYBWorkflow = "KYB_BASIC" AccountHolderNewParamsKYBWorkflowKYBByo AccountHolderNewParamsKYBWorkflow = "KYB_BYO" )
type AccountHolderNewParamsKYC ¶ added in v0.3.1
type AccountHolderNewParamsKYC struct { // Information on individual for whom the account is being opened and KYC is being // run. Individual param.Field[AccountHolderNewParamsKYCIndividual] `json:"individual,required"` // An RFC 3339 timestamp indicating when the account holder accepted the applicable // legal agreements (e.g., cardholder terms) as agreed upon during API customer's // implementation with Lithic. TosTimestamp param.Field[string] `json:"tos_timestamp,required"` // Specifies the type of KYC workflow to run. Workflow param.Field[AccountHolderNewParamsKYCWorkflow] `json:"workflow,required"` // An RFC 3339 timestamp indicating when precomputed KYC was completed on the // individual with a pass result. // // This field is required only if workflow type is `KYC_BYO`. KYCPassedTimestamp param.Field[string] `json:"kyc_passed_timestamp"` }
func (AccountHolderNewParamsKYC) ImplementsAccountHolderNewParams ¶ added in v0.3.1
func (AccountHolderNewParamsKYC) ImplementsAccountHolderNewParams()
func (AccountHolderNewParamsKYC) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderNewParamsKYC) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYCExempt ¶ added in v0.3.1
type AccountHolderNewParamsKYCExempt struct { // The KYC Exempt user's email Email param.Field[string] `json:"email,required"` // The KYC Exempt user's first name FirstName param.Field[string] `json:"first_name,required"` // Specifies the type of KYC Exempt user KYCExemptionType param.Field[AccountHolderNewParamsKYCExemptKYCExemptionType] `json:"kyc_exemption_type,required"` // The KYC Exempt user's last name LastName param.Field[string] `json:"last_name,required"` // The KYC Exempt user's phone number PhoneNumber param.Field[string] `json:"phone_number,required"` // Specifies the workflow type. This must be 'KYC_EXEMPT' Workflow param.Field[AccountHolderNewParamsKYCExemptWorkflow] `json:"workflow,required"` // KYC Exempt user's current address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. Address param.Field[shared.AddressParam] `json:"address"` // Only applicable for customers using the KYC-Exempt workflow to enroll authorized // users of businesses. Pass the account_token of the enrolled business associated // with the AUTHORIZED_USER in this field. BusinessAccountToken param.Field[string] `json:"business_account_token"` }
func (AccountHolderNewParamsKYCExempt) ImplementsAccountHolderNewParams ¶ added in v0.3.1
func (AccountHolderNewParamsKYCExempt) ImplementsAccountHolderNewParams()
func (AccountHolderNewParamsKYCExempt) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderNewParamsKYCExempt) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYCExemptKYCExemptionType ¶ added in v0.3.1
type AccountHolderNewParamsKYCExemptKYCExemptionType string
Specifies the type of KYC Exempt user
const ( AccountHolderNewParamsKYCExemptKYCExemptionTypeAuthorizedUser AccountHolderNewParamsKYCExemptKYCExemptionType = "AUTHORIZED_USER" AccountHolderNewParamsKYCExemptKYCExemptionTypePrepaidCardUser AccountHolderNewParamsKYCExemptKYCExemptionType = "PREPAID_CARD_USER" )
type AccountHolderNewParamsKYCExemptWorkflow ¶ added in v0.3.1
type AccountHolderNewParamsKYCExemptWorkflow string
Specifies the workflow type. This must be 'KYC_EXEMPT'
const (
AccountHolderNewParamsKYCExemptWorkflowKYCExempt AccountHolderNewParamsKYCExemptWorkflow = "KYC_EXEMPT"
)
type AccountHolderNewParamsKYCIndividual ¶ added in v0.3.1
type AccountHolderNewParamsKYCIndividual struct { // Individual's current address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. Address param.Field[shared.AddressParam] `json:"address,required"` // Individual's date of birth, as an RFC 3339 date. Dob param.Field[string] `json:"dob,required"` // Individual's email address. If utilizing Lithic for chargeback processing, this // customer email address may be used to communicate dispute status and resolution. Email param.Field[string] `json:"email,required"` // Individual's first name, as it appears on government-issued identity documents. FirstName param.Field[string] `json:"first_name,required"` // Government-issued identification number (required for identity verification and // compliance with banking regulations). Social Security Numbers (SSN) and // Individual Taxpayer Identification Numbers (ITIN) are currently supported, // entered as full nine-digits, with or without hyphens GovernmentID param.Field[string] `json:"government_id,required"` // Individual's last name, as it appears on government-issued identity documents. LastName param.Field[string] `json:"last_name,required"` // Individual's phone number, entered in E.164 format. PhoneNumber param.Field[string] `json:"phone_number,required"` }
Information on individual for whom the account is being opened and KYC is being run.
func (AccountHolderNewParamsKYCIndividual) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderNewParamsKYCIndividual) MarshalJSON() (data []byte, err error)
type AccountHolderNewParamsKYCWorkflow ¶ added in v0.3.1
type AccountHolderNewParamsKYCWorkflow string
Specifies the type of KYC workflow to run.
const ( AccountHolderNewParamsKYCWorkflowKYCAdvanced AccountHolderNewParamsKYCWorkflow = "KYC_ADVANCED" AccountHolderNewParamsKYCWorkflowKYCBasic AccountHolderNewParamsKYCWorkflow = "KYC_BASIC" AccountHolderNewParamsKYCWorkflowKYCByo AccountHolderNewParamsKYCWorkflow = "KYC_BYO" )
type AccountHolderNewWebhookParams ¶
type AccountHolderNewWebhookParams struct { // URL to receive webhook requests. Must be a valid HTTPS address. URL param.Field[string] `json:"url,required"` }
func (AccountHolderNewWebhookParams) MarshalJSON ¶
func (r AccountHolderNewWebhookParams) MarshalJSON() (data []byte, err error)
type AccountHolderNewWebhookResponse ¶ added in v0.5.0
type AccountHolderNewWebhookResponse struct { Data AccountHolderNewWebhookResponseData `json:"data"` JSON accountHolderNewWebhookResponseJSON }
func (*AccountHolderNewWebhookResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *AccountHolderNewWebhookResponse) UnmarshalJSON(data []byte) (err error)
type AccountHolderNewWebhookResponseData ¶ added in v0.5.0
type AccountHolderNewWebhookResponseData struct { // Shared secret which can optionally be used to validate the authenticity of // incoming identity webhooks. HmacToken string `json:"hmac_token" format:"uuid"` JSON accountHolderNewWebhookResponseDataJSON }
func (*AccountHolderNewWebhookResponseData) UnmarshalJSON ¶ added in v0.5.0
func (r *AccountHolderNewWebhookResponseData) UnmarshalJSON(data []byte) (err error)
type AccountHolderResubmitParams ¶
type AccountHolderResubmitParams struct { // Information on individual for whom the account is being opened and KYC is being // re-run. Individual param.Field[AccountHolderResubmitParamsIndividual] `json:"individual,required"` // An RFC 3339 timestamp indicating when the account holder accepted the applicable // legal agreements (e.g., cardholder terms) as agreed upon during API customer's // implementation with Lithic. TosTimestamp param.Field[string] `json:"tos_timestamp,required"` Workflow param.Field[AccountHolderResubmitParamsWorkflow] `json:"workflow,required"` }
func (AccountHolderResubmitParams) MarshalJSON ¶
func (r AccountHolderResubmitParams) MarshalJSON() (data []byte, err error)
type AccountHolderResubmitParamsIndividual ¶
type AccountHolderResubmitParamsIndividual struct { // Individual's current address - PO boxes, UPS drops, and FedEx drops are not // acceptable; APO/FPO are acceptable. Only USA addresses are currently supported. Address param.Field[shared.AddressParam] `json:"address,required"` // Individual's date of birth, as an RFC 3339 date. Dob param.Field[string] `json:"dob,required"` // Individual's email address. If utilizing Lithic for chargeback processing, this // customer email address may be used to communicate dispute status and resolution. Email param.Field[string] `json:"email,required"` // Individual's first name, as it appears on government-issued identity documents. FirstName param.Field[string] `json:"first_name,required"` // Government-issued identification number (required for identity verification and // compliance with banking regulations). Social Security Numbers (SSN) and // Individual Taxpayer Identification Numbers (ITIN) are currently supported, // entered as full nine-digits, with or without hyphens GovernmentID param.Field[string] `json:"government_id,required"` // Individual's last name, as it appears on government-issued identity documents. LastName param.Field[string] `json:"last_name,required"` // Individual's phone number, entered in E.164 format. PhoneNumber param.Field[string] `json:"phone_number,required"` }
Information on individual for whom the account is being opened and KYC is being re-run.
func (AccountHolderResubmitParamsIndividual) MarshalJSON ¶ added in v0.3.1
func (r AccountHolderResubmitParamsIndividual) MarshalJSON() (data []byte, err error)
type AccountHolderResubmitParamsWorkflow ¶
type AccountHolderResubmitParamsWorkflow string
const (
AccountHolderResubmitParamsWorkflowKYCAdvanced AccountHolderResubmitParamsWorkflow = "KYC_ADVANCED"
)
type AccountHolderService ¶
type AccountHolderService struct {
Options []option.RequestOption
}
AccountHolderService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountHolderService method instead.
func NewAccountHolderService ¶
func NewAccountHolderService(opts ...option.RequestOption) (r *AccountHolderService)
NewAccountHolderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountHolderService) Get ¶
func (r *AccountHolderService) Get(ctx context.Context, accountHolderToken string, opts ...option.RequestOption) (res *AccountHolder, err error)
Get an Individual or Business Account Holder and/or their KYC or KYB evaluation status.
func (*AccountHolderService) GetDocument ¶
func (r *AccountHolderService) GetDocument(ctx context.Context, accountHolderToken string, documentToken string, opts ...option.RequestOption) (res *AccountHolderDocument, err error)
Check the status of an account holder document upload, or retrieve the upload URLs to process your image uploads.
Note that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).
In the event your upload URLs have expired, calling this endpoint will refresh them. Similarly, in the event a document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.
When a new account holder document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` array in a `PENDING` state for the corresponding `image_type`.
func (*AccountHolderService) ListDocuments ¶
func (r *AccountHolderService) ListDocuments(ctx context.Context, accountHolderToken string, opts ...option.RequestOption) (res *AccountHolderListDocumentsResponse, err error)
Retrieve the status of account holder document uploads, or retrieve the upload URLs to process your image uploads.
Note that this is not equivalent to checking the status of the KYC evaluation overall (a document may be successfully uploaded but not be sufficient for KYC to pass).
In the event your upload URLs have expired, calling this endpoint will refresh them. Similarly, in the event a previous account holder document upload has failed, you can use this endpoint to get a new upload URL for the failed image upload.
When a new document upload is generated for a failed attempt, the response will show an additional entry in the `required_document_uploads` list in a `PENDING` state for the corresponding `image_type`.
func (*AccountHolderService) New ¶
func (r *AccountHolderService) New(ctx context.Context, body AccountHolderNewParams, opts ...option.RequestOption) (res *AccountHolder, err error)
Run an individual or business's information through the Customer Identification Program (CIP) and return an `account_token` if the status is accepted or pending (i.e., further action required). All calls to this endpoint will return an immediate response - though in some cases, the response may indicate the workflow is under review or further action will be needed to complete the account creation process. This endpoint can only be used on accounts that are part of the program the calling API key manages.
Note: If you choose to set a timeout for this request, we recommend 5 minutes.
func (*AccountHolderService) NewWebhook ¶
func (r *AccountHolderService) NewWebhook(ctx context.Context, body AccountHolderNewWebhookParams, opts ...option.RequestOption) (res *AccountHolderNewWebhookResponse, err error)
Create a webhook to receive KYC or KYB evaluation events.
There are two types of account holder webhooks:
- `verification`: Webhook sent when the status of a KYC or KYB evaluation changes from `PENDING_DOCUMENT` (KYC) or `PENDING` (KYB) to `ACCEPTED` or `REJECTED`.
- `document_upload_front`/`document_upload_back`: Webhook sent when a document upload fails.
After a webhook has been created, this endpoint can be used to rotate a webhooks HMAC token or modify the registered URL. Only a single webhook is allowed per program. Since HMAC verification is available, the IP addresses from which KYC/KYB webhooks are sent are subject to change.
func (*AccountHolderService) Resubmit ¶
func (r *AccountHolderService) Resubmit(ctx context.Context, accountHolderToken string, body AccountHolderResubmitParams, opts ...option.RequestOption) (res *AccountHolder, err error)
Resubmit a KYC submission. This endpoint should be used in cases where a KYC submission returned a `PENDING_RESUBMIT` result, meaning one or more critical KYC fields may have been mis-entered and the individual's identity has not yet been successfully verified. This step must be completed in order to proceed with the KYC evaluation.
Two resubmission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended.
func (*AccountHolderService) Update ¶
func (r *AccountHolderService) Update(ctx context.Context, accountHolderToken string, body AccountHolderUpdateParams, opts ...option.RequestOption) (res *AccountHolderUpdateResponse, err error)
Update the information associated with a particular account holder.
func (*AccountHolderService) UploadDocument ¶
func (r *AccountHolderService) UploadDocument(ctx context.Context, accountHolderToken string, body AccountHolderUploadDocumentParams, opts ...option.RequestOption) (res *AccountHolderDocument, err error)
Use this endpoint to identify which type of supported government-issued documentation you will upload for further verification. It will return two URLs to upload your document images to - one for the front image and one for the back image.
This endpoint is only valid for evaluations in a `PENDING_DOCUMENT` state.
Uploaded images must either be a `jpg` or `png` file, and each must be less than 15 MiB. Once both required uploads have been successfully completed, your document will be run through KYC verification.
If you have registered a webhook, you will receive evaluation updates for any document submission evaluations, as well as for any failed document uploads.
Two document submission attempts are permitted via this endpoint before a `REJECTED` status is returned and the account creation process is ended. Currently only one type of account holder document is supported per KYC verification.
type AccountHolderStatus ¶
type AccountHolderStatus string
KYC and KYB evaluation states.
Note: `PENDING_RESUBMIT` and `PENDING_DOCUMENT` are only applicable for the `ADVANCED` workflow.
const ( AccountHolderStatusAccepted AccountHolderStatus = "ACCEPTED" AccountHolderStatusRejected AccountHolderStatus = "REJECTED" AccountHolderStatusPendingResubmit AccountHolderStatus = "PENDING_RESUBMIT" AccountHolderStatusPendingDocument AccountHolderStatus = "PENDING_DOCUMENT" )
type AccountHolderStatusReason ¶ added in v0.5.0
type AccountHolderStatusReason string
const ( AccountHolderStatusReasonAddressVerificationFailure AccountHolderStatusReason = "ADDRESS_VERIFICATION_FAILURE" AccountHolderStatusReasonAgeThresholdFailure AccountHolderStatusReason = "AGE_THRESHOLD_FAILURE" AccountHolderStatusReasonCompleteVerificationFailure AccountHolderStatusReason = "COMPLETE_VERIFICATION_FAILURE" AccountHolderStatusReasonDobVerificationFailure AccountHolderStatusReason = "DOB_VERIFICATION_FAILURE" AccountHolderStatusReasonIDVerificationFailure AccountHolderStatusReason = "ID_VERIFICATION_FAILURE" AccountHolderStatusReasonMaxDocumentAttempts AccountHolderStatusReason = "MAX_DOCUMENT_ATTEMPTS" AccountHolderStatusReasonMaxResubmissionAttempts AccountHolderStatusReason = "MAX_RESUBMISSION_ATTEMPTS" AccountHolderStatusReasonNameVerificationFailure AccountHolderStatusReason = "NAME_VERIFICATION_FAILURE" AccountHolderStatusReasonOtherVerificationFailure AccountHolderStatusReason = "OTHER_VERIFICATION_FAILURE" AccountHolderStatusReasonRiskThresholdFailure AccountHolderStatusReason = "RISK_THRESHOLD_FAILURE" AccountHolderStatusReasonWatchlistAlertFailure AccountHolderStatusReason = "WATCHLIST_ALERT_FAILURE" )
type AccountHolderUpdateParams ¶
type AccountHolderUpdateParams struct { // Only applicable for customers using the KYC-Exempt workflow to enroll authorized // users of businesses. Pass the account_token of the enrolled business associated // with the AUTHORIZED_USER in this field. BusinessAccountToken param.Field[string] `json:"business_account_token"` // Account holder's email address. The primary purpose of this field is for // cardholder identification and verification during the digital wallet // tokenization process. Email param.Field[string] `json:"email"` // Account holder's phone number, entered in E.164 format. The primary purpose of // this field is for cardholder identification and verification during the digital // wallet tokenization process. PhoneNumber param.Field[string] `json:"phone_number"` }
func (AccountHolderUpdateParams) MarshalJSON ¶
func (r AccountHolderUpdateParams) MarshalJSON() (data []byte, err error)
type AccountHolderUpdateResponse ¶
type AccountHolderUpdateResponse struct { // The token for the account holder that was updated Token string `json:"token"` // Only applicable for customers using the KYC-Exempt workflow to enroll businesses // with authorized users. Pass the account_token of the enrolled business // associated with the AUTHORIZED_USER in this field. BusinessAccountToken string `json:"business_account_token"` // The newly updated email for the account holder Email string `json:"email"` // The newly updated phone_number for the account holder PhoneNumber string `json:"phone_number"` JSON accountHolderUpdateResponseJSON }
func (*AccountHolderUpdateResponse) UnmarshalJSON ¶
func (r *AccountHolderUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AccountHolderUploadDocumentParams ¶
type AccountHolderUploadDocumentParams struct { // Type of the document to upload. DocumentType param.Field[AccountHolderUploadDocumentParamsDocumentType] `json:"document_type,required"` }
func (AccountHolderUploadDocumentParams) MarshalJSON ¶
func (r AccountHolderUploadDocumentParams) MarshalJSON() (data []byte, err error)
type AccountHolderUploadDocumentParamsDocumentType ¶
type AccountHolderUploadDocumentParamsDocumentType string
Type of the document to upload.
const ( AccountHolderUploadDocumentParamsDocumentTypeCommercialLicense AccountHolderUploadDocumentParamsDocumentType = "commercial_license" AccountHolderUploadDocumentParamsDocumentTypeDriversLicense AccountHolderUploadDocumentParamsDocumentType = "drivers_license" AccountHolderUploadDocumentParamsDocumentTypePassport AccountHolderUploadDocumentParamsDocumentType = "passport" AccountHolderUploadDocumentParamsDocumentTypePassportCard AccountHolderUploadDocumentParamsDocumentType = "passport_card" AccountHolderUploadDocumentParamsDocumentTypeVisa AccountHolderUploadDocumentParamsDocumentType = "visa" )
type AccountListParams ¶
type AccountListParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // Page (for pagination). Page param.Field[int64] `query:"page"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` }
func (AccountListParams) URLQuery ¶
func (r AccountListParams) URLQuery() (v url.Values)
URLQuery serializes AccountListParams's query parameters as `url.Values`.
type AccountService ¶
type AccountService struct {
Options []option.RequestOption
}
AccountService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r *AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, accountToken string, opts ...option.RequestOption) (res *Account, err error)
Get account configuration such as spend limits.
func (*AccountService) List ¶
func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *shared.Page[Account], err error)
List account configurations.
func (*AccountService) ListAutoPaging ¶
func (r *AccountService) ListAutoPaging(ctx context.Context, query AccountListParams, opts ...option.RequestOption) *shared.PageAutoPager[Account]
List account configurations.
func (*AccountService) Update ¶
func (r *AccountService) Update(ctx context.Context, accountToken string, body AccountUpdateParams, opts ...option.RequestOption) (res *Account, err error)
Update account configuration such as spend limits and verification address. Can only be run on accounts that are part of the program managed by this API key.
Accounts that are in the `PAUSED` state will not be able to transact or create new cards.
type AccountSpendLimit ¶
type AccountSpendLimit struct { // Daily spend limit (in cents). Daily int64 `json:"daily,required"` // Total spend limit over account lifetime (in cents). Lifetime int64 `json:"lifetime,required"` // Monthly spend limit (in cents). Monthly int64 `json:"monthly,required"` JSON accountSpendLimitJSON }
Spend limit information for the user containing the daily, monthly, and lifetime spend limit of the account. Any charges to a card owned by this account will be declined once their transaction volume has surpassed the value in the applicable time limit (rolling). A lifetime limit of 0 indicates that the lifetime limit feature is disabled.
func (*AccountSpendLimit) UnmarshalJSON ¶
func (r *AccountSpendLimit) UnmarshalJSON(data []byte) (err error)
type AccountState ¶
type AccountState string
Account state:
- `ACTIVE` - Account is able to transact and create new cards.
- `PAUSED` - Account will not be able to transact or create new cards. It can be set back to `ACTIVE`.
- `CLOSED` - Account will permanently not be able to transact or create new cards.
const ( AccountStateActive AccountState = "ACTIVE" AccountStatePaused AccountState = "PAUSED" AccountStateClosed AccountState = "CLOSED" )
type AccountUpdateParams ¶
type AccountUpdateParams struct { // Amount (in cents) for the account's daily spend limit. By default the daily // spend limit is set to $1,250. DailySpendLimit param.Field[int64] `json:"daily_spend_limit"` // Amount (in cents) for the account's lifetime spend limit. Once this limit is // reached, no transactions will be accepted on any card created for this account // until the limit is updated. Note that a spend limit of 0 is effectively no // limit, and should only be used to reset or remove a prior limit. Only a limit of // 1 or above will result in declined transactions due to checks against the // account limit. This behavior differs from the daily spend limit and the monthly // spend limit. LifetimeSpendLimit param.Field[int64] `json:"lifetime_spend_limit"` // Amount (in cents) for the account's monthly spend limit. By default the monthly // spend limit is set to $5,000. MonthlySpendLimit param.Field[int64] `json:"monthly_spend_limit"` // Account states. State param.Field[AccountUpdateParamsState] `json:"state"` // Address used during Address Verification Service (AVS) checks during // transactions if enabled via Auth Rules. VerificationAddress param.Field[AccountUpdateParamsVerificationAddress] `json:"verification_address"` }
func (AccountUpdateParams) MarshalJSON ¶
func (r AccountUpdateParams) MarshalJSON() (data []byte, err error)
type AccountUpdateParamsState ¶
type AccountUpdateParamsState string
Account states.
const ( AccountUpdateParamsStateActive AccountUpdateParamsState = "ACTIVE" AccountUpdateParamsStatePaused AccountUpdateParamsState = "PAUSED" )
type AccountUpdateParamsVerificationAddress ¶
type AccountUpdateParamsVerificationAddress struct { Address1 param.Field[string] `json:"address1"` Address2 param.Field[string] `json:"address2"` City param.Field[string] `json:"city"` Country param.Field[string] `json:"country"` PostalCode param.Field[string] `json:"postal_code"` State param.Field[string] `json:"state"` }
Address used during Address Verification Service (AVS) checks during transactions if enabled via Auth Rules.
func (AccountUpdateParamsVerificationAddress) MarshalJSON ¶ added in v0.3.1
func (r AccountUpdateParamsVerificationAddress) MarshalJSON() (data []byte, err error)
type AccountVerificationAddress ¶
type AccountVerificationAddress struct { // Valid deliverable address (no PO boxes). Address1 string `json:"address1,required"` // City name. City string `json:"city,required"` // Country name. Only USA is currently supported. Country string `json:"country,required"` // Valid postal code. Only USA ZIP codes are currently supported, entered as a // five-digit ZIP or nine-digit ZIP+4. PostalCode string `json:"postal_code,required"` // Valid state code. Only USA state codes are currently supported, entered in // uppercase ISO 3166-2 two-character format. State string `json:"state,required"` // Unit or apartment number (if applicable). Address2 string `json:"address2"` JSON accountVerificationAddressJSON }
func (*AccountVerificationAddress) UnmarshalJSON ¶
func (r *AccountVerificationAddress) UnmarshalJSON(data []byte) (err error)
type AggregateBalance ¶
type AggregateBalance struct { // Funds available for spend in the currency's smallest unit (e.g., cents for USD) AvailableAmount int64 `json:"available_amount,required"` // Date and time for when the balance was first created. Created time.Time `json:"created,required" format:"date-time"` // 3-digit alphabetic ISO 4217 code for the local currency of the balance. Currency string `json:"currency,required"` // Type of financial account FinancialAccountType AggregateBalanceFinancialAccountType `json:"financial_account_type,required"` // Globally unique identifier for the financial account that had its balance // updated most recently LastFinancialAccountToken string `json:"last_financial_account_token,required" format:"uuid"` // Globally unique identifier for the last transaction event that impacted this // balance LastTransactionEventToken string `json:"last_transaction_event_token,required" format:"uuid"` // Globally unique identifier for the last transaction that impacted this balance LastTransactionToken string `json:"last_transaction_token,required" format:"uuid"` // Funds not available for spend due to card authorizations or pending ACH release. // Shown in the currency's smallest unit (e.g., cents for USD) PendingAmount int64 `json:"pending_amount,required"` // The sum of available and pending balance in the currency's smallest unit (e.g., // cents for USD) TotalAmount int64 `json:"total_amount,required"` // Date and time for when the balance was last updated. Updated time.Time `json:"updated,required" format:"date-time"` JSON aggregateBalanceJSON }
Aggregate Balance across all end-user accounts
func (*AggregateBalance) UnmarshalJSON ¶
func (r *AggregateBalance) UnmarshalJSON(data []byte) (err error)
type AggregateBalanceFinancialAccountType ¶
type AggregateBalanceFinancialAccountType string
Type of financial account
const ( AggregateBalanceFinancialAccountTypeIssuing AggregateBalanceFinancialAccountType = "ISSUING" AggregateBalanceFinancialAccountTypeReserve AggregateBalanceFinancialAccountType = "RESERVE" )
type AggregateBalanceListParams ¶
type AggregateBalanceListParams struct { // Get the aggregate balance for a given Financial Account type. FinancialAccountType param.Field[AggregateBalanceListParamsFinancialAccountType] `query:"financial_account_type"` }
func (AggregateBalanceListParams) URLQuery ¶
func (r AggregateBalanceListParams) URLQuery() (v url.Values)
URLQuery serializes AggregateBalanceListParams's query parameters as `url.Values`.
type AggregateBalanceListParamsFinancialAccountType ¶
type AggregateBalanceListParamsFinancialAccountType string
Get the aggregate balance for a given Financial Account type.
const ( AggregateBalanceListParamsFinancialAccountTypeIssuing AggregateBalanceListParamsFinancialAccountType = "ISSUING" AggregateBalanceListParamsFinancialAccountTypeReserve AggregateBalanceListParamsFinancialAccountType = "RESERVE" )
type AggregateBalanceService ¶
type AggregateBalanceService struct {
Options []option.RequestOption
}
AggregateBalanceService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAggregateBalanceService method instead.
func NewAggregateBalanceService ¶
func NewAggregateBalanceService(opts ...option.RequestOption) (r *AggregateBalanceService)
NewAggregateBalanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AggregateBalanceService) List ¶
func (r *AggregateBalanceService) List(ctx context.Context, query AggregateBalanceListParams, opts ...option.RequestOption) (res *shared.SinglePage[AggregateBalance], err error)
Get the aggregated balance across all end-user accounts by financial account type
func (*AggregateBalanceService) ListAutoPaging ¶
func (r *AggregateBalanceService) ListAutoPaging(ctx context.Context, query AggregateBalanceListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[AggregateBalance]
Get the aggregated balance across all end-user accounts by financial account type
type AuthRule ¶
type AuthRule struct { // Globally unique identifier. Token string `json:"token" format:"uuid"` // Array of account_token(s) identifying the accounts that the Auth Rule applies // to. Note that only this field or `card_tokens` can be provided for a given Auth // Rule. AccountTokens []string `json:"account_tokens"` // Countries in which the Auth Rule permits transactions. Note that Lithic // maintains a list of countries in which all transactions are blocked; "allowing" // those countries in an Auth Rule does not override the Lithic-wide restrictions. AllowedCountries []string `json:"allowed_countries"` // Merchant category codes for which the Auth Rule permits transactions. AllowedMcc []string `json:"allowed_mcc"` // Countries in which the Auth Rule automatically declines transactions. BlockedCountries []string `json:"blocked_countries"` // Merchant category codes for which the Auth Rule automatically declines // transactions. BlockedMcc []string `json:"blocked_mcc"` // Array of card_token(s) identifying the cards that the Auth Rule applies to. Note // that only this field or `account_tokens` can be provided for a given Auth Rule. CardTokens []string `json:"card_tokens"` // Identifier for the Auth Rule(s) that a new Auth Rule replaced; will be returned // only if an Auth Rule is applied to entities that previously already had one // applied. PreviousAuthRuleTokens []string `json:"previous_auth_rule_tokens"` // Boolean indicating whether the Auth Rule is applied at the program level. ProgramLevel bool `json:"program_level"` // Indicates whether the Auth Rule is ACTIVE or INACTIVE State AuthRuleState `json:"state"` JSON authRuleJSON }
func (*AuthRule) UnmarshalJSON ¶
type AuthRuleApplyParams ¶
type AuthRuleApplyParams struct { // Array of account_token(s) identifying the accounts that the Auth Rule applies // to. Note that only this field or `card_tokens` can be provided for a given Auth // Rule. AccountTokens param.Field[[]string] `json:"account_tokens"` // Array of card_token(s) identifying the cards that the Auth Rule applies to. Note // that only this field or `account_tokens` can be provided for a given Auth Rule. CardTokens param.Field[[]string] `json:"card_tokens"` // Boolean indicating whether the Auth Rule is applied at the program level. ProgramLevel param.Field[bool] `json:"program_level"` }
func (AuthRuleApplyParams) MarshalJSON ¶
func (r AuthRuleApplyParams) MarshalJSON() (data []byte, err error)
type AuthRuleApplyResponse ¶
type AuthRuleApplyResponse struct { Data AuthRule `json:"data"` JSON authRuleApplyResponseJSON }
func (*AuthRuleApplyResponse) UnmarshalJSON ¶
func (r *AuthRuleApplyResponse) UnmarshalJSON(data []byte) (err error)
type AuthRuleGetResponse ¶ added in v0.5.0
type AuthRuleGetResponse struct { Data []AuthRule `json:"data"` JSON authRuleGetResponseJSON }
func (*AuthRuleGetResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *AuthRuleGetResponse) UnmarshalJSON(data []byte) (err error)
type AuthRuleListParams ¶
type AuthRuleListParams struct { // Page (for pagination). Page param.Field[int64] `query:"page"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` }
func (AuthRuleListParams) URLQuery ¶
func (r AuthRuleListParams) URLQuery() (v url.Values)
URLQuery serializes AuthRuleListParams's query parameters as `url.Values`.
type AuthRuleNewParams ¶
type AuthRuleNewParams struct { // Array of account_token(s) identifying the accounts that the Auth Rule applies // to. Note that only this field or `card_tokens` can be provided for a given Auth // Rule. AccountTokens param.Field[[]string] `json:"account_tokens"` // Countries in which the Auth Rule permits transactions. Note that Lithic // maintains a list of countries in which all transactions are blocked; "allowing" // those countries in an Auth Rule does not override the Lithic-wide restrictions. AllowedCountries param.Field[[]string] `json:"allowed_countries"` // Merchant category codes for which the Auth Rule permits transactions. AllowedMcc param.Field[[]string] `json:"allowed_mcc"` // Countries in which the Auth Rule automatically declines transactions. BlockedCountries param.Field[[]string] `json:"blocked_countries"` // Merchant category codes for which the Auth Rule automatically declines // transactions. BlockedMcc param.Field[[]string] `json:"blocked_mcc"` // Array of card_token(s) identifying the cards that the Auth Rule applies to. Note // that only this field or `account_tokens` can be provided for a given Auth Rule. CardTokens param.Field[[]string] `json:"card_tokens"` // Boolean indicating whether the Auth Rule is applied at the program level. ProgramLevel param.Field[bool] `json:"program_level"` }
func (AuthRuleNewParams) MarshalJSON ¶
func (r AuthRuleNewParams) MarshalJSON() (data []byte, err error)
type AuthRuleNewResponse ¶ added in v0.5.0
type AuthRuleNewResponse struct { Data AuthRule `json:"data"` JSON authRuleNewResponseJSON }
func (*AuthRuleNewResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *AuthRuleNewResponse) UnmarshalJSON(data []byte) (err error)
type AuthRuleRemoveParams ¶
type AuthRuleRemoveParams struct { // Array of account_token(s) identifying the accounts that the Auth Rule applies // to. Note that only this field or `card_tokens` can be provided for a given Auth // Rule. AccountTokens param.Field[[]string] `json:"account_tokens"` // Array of card_token(s) identifying the cards that the Auth Rule applies to. Note // that only this field or `account_tokens` can be provided for a given Auth Rule. CardTokens param.Field[[]string] `json:"card_tokens"` // Boolean indicating whether the Auth Rule is applied at the program level. ProgramLevel param.Field[bool] `json:"program_level"` }
func (AuthRuleRemoveParams) MarshalJSON ¶
func (r AuthRuleRemoveParams) MarshalJSON() (data []byte, err error)
type AuthRuleRemoveResponse ¶
type AuthRuleRemoveResponse struct { AccountTokens []string `json:"account_tokens"` CardTokens []string `json:"card_tokens"` PreviousAuthRuleTokens []string `json:"previous_auth_rule_tokens"` ProgramLevel bool `json:"program_level"` JSON authRuleRemoveResponseJSON }
func (*AuthRuleRemoveResponse) UnmarshalJSON ¶
func (r *AuthRuleRemoveResponse) UnmarshalJSON(data []byte) (err error)
type AuthRuleService ¶
type AuthRuleService struct {
Options []option.RequestOption
}
AuthRuleService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthRuleService method instead.
func NewAuthRuleService ¶
func NewAuthRuleService(opts ...option.RequestOption) (r *AuthRuleService)
NewAuthRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AuthRuleService) Apply ¶
func (r *AuthRuleService) Apply(ctx context.Context, authRuleToken string, body AuthRuleApplyParams, opts ...option.RequestOption) (res *AuthRuleApplyResponse, err error)
Applies an existing authorization rule (Auth Rule) to an program, account, or card level.
func (*AuthRuleService) Get ¶
func (r *AuthRuleService) Get(ctx context.Context, authRuleToken string, opts ...option.RequestOption) (res *AuthRuleGetResponse, err error)
Detail the properties and entities (program, accounts, and cards) associated with an existing authorization rule (Auth Rule).
func (*AuthRuleService) List ¶
func (r *AuthRuleService) List(ctx context.Context, query AuthRuleListParams, opts ...option.RequestOption) (res *shared.Page[AuthRule], err error)
Return all of the Auth Rules under the program.
func (*AuthRuleService) ListAutoPaging ¶
func (r *AuthRuleService) ListAutoPaging(ctx context.Context, query AuthRuleListParams, opts ...option.RequestOption) *shared.PageAutoPager[AuthRule]
Return all of the Auth Rules under the program.
func (*AuthRuleService) New ¶
func (r *AuthRuleService) New(ctx context.Context, body AuthRuleNewParams, opts ...option.RequestOption) (res *AuthRuleNewResponse, err error)
Creates an authorization rule (Auth Rule) and applies it at the program, account, or card level.
func (*AuthRuleService) Remove ¶
func (r *AuthRuleService) Remove(ctx context.Context, body AuthRuleRemoveParams, opts ...option.RequestOption) (res *AuthRuleRemoveResponse, err error)
Remove an existing authorization rule (Auth Rule) from an program, account, or card-level.
func (*AuthRuleService) Update ¶
func (r *AuthRuleService) Update(ctx context.Context, authRuleToken string, body AuthRuleUpdateParams, opts ...option.RequestOption) (res *AuthRuleUpdateResponse, err error)
Update the properties associated with an existing authorization rule (Auth Rule).
type AuthRuleState ¶
type AuthRuleState string
Indicates whether the Auth Rule is ACTIVE or INACTIVE
const ( AuthRuleStateActive AuthRuleState = "ACTIVE" AuthRuleStateInactive AuthRuleState = "INACTIVE" )
type AuthRuleUpdateParams ¶
type AuthRuleUpdateParams struct { // Array of country codes for which the Auth Rule will permit transactions. Note // that only this field or `blocked_countries` can be used for a given Auth Rule. AllowedCountries param.Field[[]string] `json:"allowed_countries"` // Array of merchant category codes for which the Auth Rule will permit // transactions. Note that only this field or `blocked_mcc` can be used for a given // Auth Rule. AllowedMcc param.Field[[]string] `json:"allowed_mcc"` // Array of country codes for which the Auth Rule will automatically decline // transactions. Note that only this field or `allowed_countries` can be used for a // given Auth Rule. BlockedCountries param.Field[[]string] `json:"blocked_countries"` // Array of merchant category codes for which the Auth Rule will automatically // decline transactions. Note that only this field or `allowed_mcc` can be used for // a given Auth Rule. BlockedMcc param.Field[[]string] `json:"blocked_mcc"` }
func (AuthRuleUpdateParams) MarshalJSON ¶
func (r AuthRuleUpdateParams) MarshalJSON() (data []byte, err error)
type AuthRuleUpdateResponse ¶
type AuthRuleUpdateResponse struct { Data AuthRule `json:"data"` JSON authRuleUpdateResponseJSON }
func (*AuthRuleUpdateResponse) UnmarshalJSON ¶
func (r *AuthRuleUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AuthStreamEnrollment ¶
type AuthStreamEnrollment struct { // Whether ASA is enrolled. Enrolled bool `json:"enrolled"` JSON authStreamEnrollmentJSON }
func (*AuthStreamEnrollment) UnmarshalJSON ¶
func (r *AuthStreamEnrollment) UnmarshalJSON(data []byte) (err error)
type AuthStreamEnrollmentEnrollParams ¶
type AuthStreamEnrollmentEnrollParams struct { // A user-specified url to receive and respond to ASA request. WebhookURL param.Field[string] `json:"webhook_url" format:"uri"` }
func (AuthStreamEnrollmentEnrollParams) MarshalJSON ¶
func (r AuthStreamEnrollmentEnrollParams) MarshalJSON() (data []byte, err error)
type AuthStreamEnrollmentService ¶
type AuthStreamEnrollmentService struct {
Options []option.RequestOption
}
AuthStreamEnrollmentService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthStreamEnrollmentService method instead.
func NewAuthStreamEnrollmentService ¶
func NewAuthStreamEnrollmentService(opts ...option.RequestOption) (r *AuthStreamEnrollmentService)
NewAuthStreamEnrollmentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AuthStreamEnrollmentService) Disenroll ¶
func (r *AuthStreamEnrollmentService) Disenroll(ctx context.Context, opts ...option.RequestOption) (err error)
Disenroll Authorization Stream Access (ASA) in Sandbox.
func (*AuthStreamEnrollmentService) Enroll ¶
func (r *AuthStreamEnrollmentService) Enroll(ctx context.Context, body AuthStreamEnrollmentEnrollParams, opts ...option.RequestOption) (err error)
Authorization Stream Access (ASA) provides the ability to make custom transaction approval decisions through an HTTP interface to the ISO 8583 message stream.
ASA requests are delivered as an HTTP POST during authorization. The ASA request body adheres to the Lithic transaction schema, with some additional fields added for use in decisioning. A response should be sent with HTTP response code 200 and the approval decision in the response body. This response is converted by Lithic back into ISO 8583 format and forwarded to the network.
In Sandbox, users can self-enroll and disenroll in ASA. In production, onboarding requires manual approval and setup.
func (*AuthStreamEnrollmentService) Get ¶
func (r *AuthStreamEnrollmentService) Get(ctx context.Context, opts ...option.RequestOption) (res *AuthStreamEnrollment, err error)
Check status for whether you have enrolled in Authorization Stream Access (ASA) for your program in Sandbox.
func (*AuthStreamEnrollmentService) GetSecret ¶
func (r *AuthStreamEnrollmentService) GetSecret(ctx context.Context, opts ...option.RequestOption) (res *AuthStreamSecret, err error)
Retrieve the ASA HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify webhooks) will begin appearing shortly after calling this endpoint for the first time. See [this page](https://docs.lithic.com/docs/auth-stream-access-asa#asa-webhook-verification) for more detail about verifying ASA webhooks.
func (*AuthStreamEnrollmentService) RotateSecret ¶
func (r *AuthStreamEnrollmentService) RotateSecret(ctx context.Context, opts ...option.RequestOption) (err error)
Generate a new ASA HMAC secret key. The old ASA HMAC secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [`GET /auth_stream/secret`](https://docs.lithic.com/reference/getauthstreamsecret) request to retrieve the new secret key.
type AuthStreamSecret ¶
type AuthStreamSecret struct { // The shared HMAC ASA secret Secret string `json:"secret"` JSON authStreamSecretJSON }
func (*AuthStreamSecret) UnmarshalJSON ¶
func (r *AuthStreamSecret) UnmarshalJSON(data []byte) (err error)
type Balance ¶
type Balance struct { // Globally unique identifier for the financial account that holds this balance. Token string `json:"token,required" format:"uuid"` // Funds available for spend in the currency's smallest unit (e.g., cents for USD) AvailableAmount int64 `json:"available_amount,required"` // Date and time for when the balance was first created. Created time.Time `json:"created,required" format:"date-time"` // 3-digit alphabetic ISO 4217 code for the local currency of the balance. Currency string `json:"currency,required"` // Globally unique identifier for the last financial transaction event that // impacted this balance. LastTransactionEventToken string `json:"last_transaction_event_token,required" format:"uuid"` // Globally unique identifier for the last financial transaction that impacted this // balance. LastTransactionToken string `json:"last_transaction_token,required" format:"uuid"` // Funds not available for spend due to card authorizations or pending ACH release. // Shown in the currency's smallest unit (e.g., cents for USD). PendingAmount int64 `json:"pending_amount,required"` // The sum of available and pending balance in the currency's smallest unit (e.g., // cents for USD). TotalAmount int64 `json:"total_amount,required"` // Type of financial account. Type BalanceType `json:"type,required"` // Date and time for when the balance was last updated. Updated time.Time `json:"updated,required" format:"date-time"` JSON balanceJSON }
Balance of a Financial Account
func (*Balance) UnmarshalJSON ¶
type BalanceListParams ¶
type BalanceListParams struct { // List balances for all financial accounts of a given account_token. AccountToken param.Field[string] `query:"account_token" format:"uuid"` // UTC date and time of the balances to retrieve. Defaults to latest available // balances BalanceDate param.Field[time.Time] `query:"balance_date" format:"date-time"` // List balances for a given Financial Account type. FinancialAccountType param.Field[BalanceListParamsFinancialAccountType] `query:"financial_account_type"` }
func (BalanceListParams) URLQuery ¶
func (r BalanceListParams) URLQuery() (v url.Values)
URLQuery serializes BalanceListParams's query parameters as `url.Values`.
type BalanceListParamsFinancialAccountType ¶
type BalanceListParamsFinancialAccountType string
List balances for a given Financial Account type.
const ( BalanceListParamsFinancialAccountTypeIssuing BalanceListParamsFinancialAccountType = "ISSUING" BalanceListParamsFinancialAccountTypeReserve BalanceListParamsFinancialAccountType = "RESERVE" )
type BalanceService ¶
type BalanceService struct {
Options []option.RequestOption
}
BalanceService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBalanceService method instead.
func NewBalanceService ¶
func NewBalanceService(opts ...option.RequestOption) (r *BalanceService)
NewBalanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BalanceService) List ¶
func (r *BalanceService) List(ctx context.Context, query BalanceListParams, opts ...option.RequestOption) (res *shared.SinglePage[Balance], err error)
Get the balances for a program or a given end-user account
func (*BalanceService) ListAutoPaging ¶
func (r *BalanceService) ListAutoPaging(ctx context.Context, query BalanceListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[Balance]
Get the balances for a program or a given end-user account
type BalanceType ¶
type BalanceType string
Type of financial account.
const ( BalanceTypeIssuing BalanceType = "ISSUING" BalanceTypeReserve BalanceType = "RESERVE" )
type Card ¶
type Card struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // An RFC 3339 timestamp for when the card was created. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` Funding CardFunding `json:"funding,required"` // Last four digits of the card number. LastFour string `json:"last_four,required"` // Amount (in cents) to limit approved authorizations. Transaction requests above // the spend limit will be declined. SpendLimit int64 `json:"spend_limit,required"` // Spend limit duration values: // // - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar // year. // - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime // of the card. // - `MONTHLY` - Card will authorize transactions up to spend limit for the // trailing month. Month is calculated as this calendar date one month prior. // - `TRANSACTION` - Card will authorize multiple transactions if each individual // transaction is under the spend limit. SpendLimitDuration SpendLimitDuration `json:"spend_limit_duration,required"` // Card state values: // // - `CLOSED` - Card will no longer approve authorizations. Closing a card cannot // be undone. // - `OPEN` - Card will approve authorizations (if they match card and account // parameters). // - `PAUSED` - Card will decline authorizations, but can be resumed at a later // time. // - `PENDING_FULFILLMENT` - The initial state for cards of type `PHYSICAL`. The // card is provisioned pending manufacturing and fulfillment. Cards in this state // can accept authorizations for e-commerce purchases, but not for "Card Present" // purchases where the physical card itself is present. // - `PENDING_ACTIVATION` - Each business day at 2pm Eastern Time Zone (ET), cards // of type `PHYSICAL` in state `PENDING_FULFILLMENT` are sent to the card // production warehouse and updated to state `PENDING_ACTIVATION` . Similar to // `PENDING_FULFILLMENT`, cards in this state can be used for e-commerce // transactions. API clients should update the card's state to `OPEN` only after // the cardholder confirms receipt of the card. // // In sandbox, the same daily batch fulfillment occurs, but no cards are actually // manufactured. State CardState `json:"state,required"` // Card types: // // - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital // wallet like Apple Pay or Google Pay (if the card program is digital // wallet-enabled). // - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label // branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. // Reach out at [lithic.com/contact](https://lithic.com/contact) for more // information. // - `SINGLE_USE` - Card is closed upon first successful authorization. // - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that // successfully authorizes the card. Type CardType `json:"type,required"` // List of identifiers for the Auth Rule(s) that are applied on the card. AuthRuleTokens []string `json:"auth_rule_tokens"` // Three digit cvv printed on the back of the card. Cvv string `json:"cvv"` // Specifies the digital card art to be displayed in the user’s digital wallet // after tokenization. This artwork must be approved by Mastercard and configured // by Lithic to use. See // [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). DigitalCardArtToken string `json:"digital_card_art_token" format:"uuid"` // Two digit (MM) expiry month. ExpMonth string `json:"exp_month"` // Four digit (yyyy) expiry year. ExpYear string `json:"exp_year"` // Hostname of card’s locked merchant (will be empty if not applicable). Hostname string `json:"hostname"` // Friendly name to identify the card. We recommend against using this field to // store JSON data as it can cause unexpected behavior. Memo string `json:"memo"` // Primary Account Number (PAN) (i.e. the card number). Customers must be PCI // compliant to have PAN returned as a field in production. Please contact // [support@lithic.com](mailto:support@lithic.com) for questions. Pan string `json:"pan"` JSON cardJSON }
func (*Card) UnmarshalJSON ¶
type CardEmbedParams ¶
type CardEmbedParams struct { // A base64 encoded JSON string of an EmbedRequest to specify which card to load. EmbedRequest param.Field[string] `query:"embed_request,required"` // SHA256 HMAC of the embed_request JSON string with base64 digest. Hmac param.Field[string] `query:"hmac,required"` }
func (CardEmbedParams) URLQuery ¶
func (r CardEmbedParams) URLQuery() (v url.Values)
URLQuery serializes CardEmbedParams's query parameters as `url.Values`.
type CardFunding ¶
type CardFunding struct { // A globally unique identifier for this FundingAccount. Token string `json:"token,required" format:"uuid"` // An RFC 3339 string representing when this funding source was added to the Lithic // account. This may be `null`. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` // The last 4 digits of the account (e.g. bank account, debit card) associated with // this FundingAccount. This may be null. LastFour string `json:"last_four,required"` // State of funding source. // // Funding source states: // // - `ENABLED` - The funding account is available to use for card creation and // transactions. // - `PENDING` - The funding account is still being verified e.g. bank // micro-deposits verification. // - `DELETED` - The founding account has been deleted. State CardFundingState `json:"state,required"` // Types of funding source: // // - `DEPOSITORY_CHECKING` - Bank checking account. // - `DEPOSITORY_SAVINGS` - Bank savings account. Type CardFundingType `json:"type,required"` // Account name identifying the funding source. This may be `null`. AccountName string `json:"account_name"` // The nickname given to the `FundingAccount` or `null` if it has no nickname. Nickname string `json:"nickname"` JSON cardFundingJSON }
func (*CardFunding) UnmarshalJSON ¶
func (r *CardFunding) UnmarshalJSON(data []byte) (err error)
type CardFundingState ¶
type CardFundingState string
State of funding source.
Funding source states:
- `ENABLED` - The funding account is available to use for card creation and transactions.
- `PENDING` - The funding account is still being verified e.g. bank micro-deposits verification.
- `DELETED` - The founding account has been deleted.
const ( CardFundingStateEnabled CardFundingState = "ENABLED" CardFundingStatePending CardFundingState = "PENDING" CardFundingStateDeleted CardFundingState = "DELETED" )
type CardFundingType ¶
type CardFundingType string
Types of funding source:
- `DEPOSITORY_CHECKING` - Bank checking account. - `DEPOSITORY_SAVINGS` - Bank savings account.
const ( CardFundingTypeDepositoryChecking CardFundingType = "DEPOSITORY_CHECKING" CardFundingTypeDepositorySavings CardFundingType = "DEPOSITORY_SAVINGS" )
type CardGetEmbedHTMLParams ¶ added in v0.3.1
type CardGetEmbedHTMLParams struct { // Globally unique identifier for the card to be displayed. Token param.Field[string] `json:"token,required" format:"uuid"` // A publicly available URI, so the white-labeled card element can be styled with // the client's branding. Css param.Field[string] `json:"css"` // An RFC 3339 timestamp for when the request should expire. UTC time zone. // // If no timezone is specified, UTC will be used. If payload does not contain an // expiration, the request will never expire. // // Using an `expiration` reduces the risk of a // [replay attack](https://en.wikipedia.org/wiki/Replay_attack). Without supplying // the `expiration`, in the event that a malicious user gets a copy of your request // in transit, they will be able to obtain the response data indefinitely. Expiration param.Field[time.Time] `json:"expiration" format:"date-time"` // Required if you want to post the element clicked to the parent iframe. // // If you supply this param, you can also capture click events in the parent iframe // by adding an event listener. TargetOrigin param.Field[string] `json:"target_origin"` }
func (CardGetEmbedHTMLParams) MarshalJSON ¶ added in v0.3.1
func (r CardGetEmbedHTMLParams) MarshalJSON() (data []byte, err error)
type CardGetEmbedURLParams ¶ added in v0.3.1
type CardGetEmbedURLParams struct { // Globally unique identifier for the card to be displayed. Token param.Field[string] `json:"token,required" format:"uuid"` // A publicly available URI, so the white-labeled card element can be styled with // the client's branding. Css param.Field[string] `json:"css"` // An RFC 3339 timestamp for when the request should expire. UTC time zone. // // If no timezone is specified, UTC will be used. If payload does not contain an // expiration, the request will never expire. // // Using an `expiration` reduces the risk of a // [replay attack](https://en.wikipedia.org/wiki/Replay_attack). Without supplying // the `expiration`, in the event that a malicious user gets a copy of your request // in transit, they will be able to obtain the response data indefinitely. Expiration param.Field[time.Time] `json:"expiration" format:"date-time"` // Required if you want to post the element clicked to the parent iframe. // // If you supply this param, you can also capture click events in the parent iframe // by adding an event listener. TargetOrigin param.Field[string] `json:"target_origin"` }
func (CardGetEmbedURLParams) MarshalJSON ¶ added in v0.3.1
func (r CardGetEmbedURLParams) MarshalJSON() (data []byte, err error)
type CardListParams ¶
type CardListParams struct { // Returns cards associated with the specified account. AccountToken param.Field[string] `query:"account_token" format:"uuid"` // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // Page (for pagination). Page param.Field[int64] `query:"page"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` }
func (CardListParams) URLQuery ¶
func (r CardListParams) URLQuery() (v url.Values)
URLQuery serializes CardListParams's query parameters as `url.Values`.
type CardNewParams ¶
type CardNewParams struct { // Card types: // // - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital // wallet like Apple Pay or Google Pay (if the card program is digital // wallet-enabled). // - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label // branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. // Reach out at [lithic.com/contact](https://lithic.com/contact) for more // information. // - `SINGLE_USE` - Card is closed upon first successful authorization. // - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that // successfully authorizes the card. Type param.Field[CardNewParamsType] `json:"type,required"` // Globally unique identifier for the account that the card will be associated // with. Required for programs enrolling users using the // [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc). // See [Managing Your Program](doc:managing-your-program) for more information. AccountToken param.Field[string] `json:"account_token" format:"uuid"` // For card programs with more than one BIN range. This must be configured with // Lithic before use. Identifies the card program/BIN range under which to create // the card. If omitted, will utilize the program's default `card_program_token`. // In Sandbox, use 00000000-0000-0000-1000-000000000000 and // 00000000-0000-0000-2000-000000000000 to test creating cards on specific card // programs. CardProgramToken param.Field[string] `json:"card_program_token" format:"uuid"` // Specifies the digital card art to be displayed in the user’s digital wallet // after tokenization. This artwork must be approved by Mastercard and configured // by Lithic to use. See // [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). DigitalCardArtToken param.Field[string] `json:"digital_card_art_token" format:"uuid"` // Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, // an expiration date will be generated. ExpMonth param.Field[string] `json:"exp_month"` // Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is // provided, an expiration date will be generated. ExpYear param.Field[string] `json:"exp_year"` // Friendly name to identify the card. We recommend against using this field to // store JSON data as it can cause unexpected behavior. Memo param.Field[string] `json:"memo"` // Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and // `VIRTUAL`. See // [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise). Pin param.Field[string] `json:"pin"` // Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic // before use. Specifies the configuration (i.e., physical card art) that the card // should be manufactured with. ProductID param.Field[string] `json:"product_id"` ShippingAddress param.Field[shared.ShippingAddressParam] `json:"shipping_address"` // Shipping method for the card. Only applies to cards of type PHYSICAL. Use of // options besides `STANDARD` require additional permissions. // // - `STANDARD` - USPS regular mail or similar international option, with no // tracking // - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, // with tracking // - `EXPEDITED` - FedEx Standard Overnight or similar international option, with // tracking ShippingMethod param.Field[CardNewParamsShippingMethod] `json:"shipping_method"` // Amount (in cents) to limit approved authorizations. Transaction requests above // the spend limit will be declined. Note that a spend limit of 0 is effectively no // limit, and should only be used to reset or remove a prior limit. Only a limit of // 1 or above will result in declined transactions due to checks against the card // limit. SpendLimit param.Field[int64] `json:"spend_limit"` // Spend limit duration values: // // - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar // year. // - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime // of the card. // - `MONTHLY` - Card will authorize transactions up to spend limit for the // trailing month. Month is calculated as this calendar date one month prior. // - `TRANSACTION` - Card will authorize multiple transactions if each individual // transaction is under the spend limit. SpendLimitDuration param.Field[SpendLimitDuration] `json:"spend_limit_duration"` // Card state values: // // - `OPEN` - Card will approve authorizations (if they match card and account // parameters). // - `PAUSED` - Card will decline authorizations, but can be resumed at a later // time. State param.Field[CardNewParamsState] `json:"state"` }
func (CardNewParams) MarshalJSON ¶
func (r CardNewParams) MarshalJSON() (data []byte, err error)
type CardNewParamsShippingMethod ¶
type CardNewParamsShippingMethod string
Shipping method for the card. Only applies to cards of type PHYSICAL. Use of options besides `STANDARD` require additional permissions.
- `STANDARD` - USPS regular mail or similar international option, with no tracking
- `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
- `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
const ( CardNewParamsShippingMethodStandard CardNewParamsShippingMethod = "STANDARD" CardNewParamsShippingMethodStandardWithTracking CardNewParamsShippingMethod = "STANDARD_WITH_TRACKING" CardNewParamsShippingMethodExpedited CardNewParamsShippingMethod = "EXPEDITED" )
type CardNewParamsState ¶
type CardNewParamsState string
Card state values:
- `OPEN` - Card will approve authorizations (if they match card and account parameters).
- `PAUSED` - Card will decline authorizations, but can be resumed at a later time.
const ( CardNewParamsStateOpen CardNewParamsState = "OPEN" CardNewParamsStatePaused CardNewParamsState = "PAUSED" )
type CardNewParamsType ¶
type CardNewParamsType string
Card types:
- `VIRTUAL` - Card will authorize at any merchant and can be added to a digital wallet like Apple Pay or Google Pay (if the card program is digital wallet-enabled).
- `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. Reach out at lithic.com/contact(https://lithic.com/contact) for more information.
- `SINGLE_USE` - Card is closed upon first successful authorization.
- `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that successfully authorizes the card.
const ( CardNewParamsTypeVirtual CardNewParamsType = "VIRTUAL" CardNewParamsTypePhysical CardNewParamsType = "PHYSICAL" CardNewParamsTypeMerchantLocked CardNewParamsType = "MERCHANT_LOCKED" CardNewParamsTypeSingleUse CardNewParamsType = "SINGLE_USE" )
type CardProvisionParams ¶
type CardProvisionParams struct { // Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only // `activationData` in the response. Apple's public leaf certificate. Base64 // encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers // omitted. Provided by the device's wallet. Certificate param.Field[string] `json:"certificate" format:"byte"` // Name of digital wallet provider. DigitalWallet param.Field[CardProvisionParamsDigitalWallet] `json:"digital_wallet"` // Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only // `activationData` in the response. Base64 cryptographic nonce provided by the // device's wallet. Nonce param.Field[string] `json:"nonce" format:"byte"` // Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only // `activationData` in the response. Base64 cryptographic nonce provided by the // device's wallet. NonceSignature param.Field[string] `json:"nonce_signature" format:"byte"` }
func (CardProvisionParams) MarshalJSON ¶
func (r CardProvisionParams) MarshalJSON() (data []byte, err error)
type CardProvisionParamsDigitalWallet ¶
type CardProvisionParamsDigitalWallet string
Name of digital wallet provider.
const ( CardProvisionParamsDigitalWalletApplePay CardProvisionParamsDigitalWallet = "APPLE_PAY" CardProvisionParamsDigitalWalletGooglePay CardProvisionParamsDigitalWallet = "GOOGLE_PAY" CardProvisionParamsDigitalWalletSamsungPay CardProvisionParamsDigitalWallet = "SAMSUNG_PAY" )
type CardProvisionResponse ¶
type CardProvisionResponse struct { ProvisioningPayload string `json:"provisioning_payload"` JSON cardProvisionResponseJSON }
func (*CardProvisionResponse) UnmarshalJSON ¶
func (r *CardProvisionResponse) UnmarshalJSON(data []byte) (err error)
type CardReissueParams ¶
type CardReissueParams struct { // Specifies the configuration (e.g. physical card art) that the card should be // manufactured with, and only applies to cards of type `PHYSICAL`. This must be // configured with Lithic before use. ProductID param.Field[string] `json:"product_id"` // If omitted, the previous shipping address will be used. ShippingAddress param.Field[shared.ShippingAddressParam] `json:"shipping_address"` // Shipping method for the card. Use of options besides `STANDARD` require // additional permissions. // // - `STANDARD` - USPS regular mail or similar international option, with no // tracking // - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, // with tracking // - `EXPEDITED` - FedEx Standard Overnight or similar international option, with // tracking ShippingMethod param.Field[CardReissueParamsShippingMethod] `json:"shipping_method"` }
func (CardReissueParams) MarshalJSON ¶
func (r CardReissueParams) MarshalJSON() (data []byte, err error)
type CardReissueParamsShippingMethod ¶
type CardReissueParamsShippingMethod string
Shipping method for the card. Use of options besides `STANDARD` require additional permissions.
- `STANDARD` - USPS regular mail or similar international option, with no tracking
- `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
- `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
const ( CardReissueParamsShippingMethodStandard CardReissueParamsShippingMethod = "STANDARD" CardReissueParamsShippingMethodStandardWithTracking CardReissueParamsShippingMethod = "STANDARD_WITH_TRACKING" CardReissueParamsShippingMethodExpedited CardReissueParamsShippingMethod = "EXPEDITED" )
type CardService ¶
type CardService struct {
Options []option.RequestOption
}
CardService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCardService method instead.
func NewCardService ¶
func NewCardService(opts ...option.RequestOption) (r *CardService)
NewCardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CardService) Embed ¶
func (r *CardService) Embed(ctx context.Context, query CardEmbedParams, opts ...option.RequestOption) (res *string, err error)
Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.
In this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer's branding using a specified css stylesheet. A user's browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer's servers while full card data is displayed to their end-users. The response contains an HTML document. This means that the url for the request can be inserted straight into the `src` attribute of an iframe.
```html <iframe
id="card-iframe" src="https://sandbox.lithic.com/v1/embed/card?embed_request=eyJjc3MiO...;hmac=r8tx1..." allow="clipboard-write" class="content"
></iframe> ```
You should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.
func (*CardService) Get ¶
func (r *CardService) Get(ctx context.Context, cardToken string, opts ...option.RequestOption) (res *Card, err error)
Get card configuration such as spend limit and state.
func (*CardService) GetEmbedHTML ¶
func (r *CardService) GetEmbedHTML(ctx context.Context, body CardGetEmbedHTMLParams, opts ...option.RequestOption) (res []byte, err error)
func (*CardService) GetEmbedURL ¶
func (r *CardService) GetEmbedURL(ctx context.Context, body CardGetEmbedURLParams, opts ...option.RequestOption) (res *url.URL, err error)
Handling full card PANs and CVV codes requires that you comply with the Payment Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce their compliance obligations by leveraging our embedded card UI solution documented below.
In this setup, PANs and CVV codes are presented to the end-user via a card UI that we provide, optionally styled in the customer's branding using a specified css stylesheet. A user's browser makes the request directly to api.lithic.com, so card PANs and CVVs never touch the API customer's servers while full card data is displayed to their end-users. The response contains an HTML document. This means that the url for the request can be inserted straight into the `src` attribute of an iframe.
```html <iframe
id="card-iframe" src="https://sandbox.lithic.com/v1/embed/card?embed_request=eyJjc3MiO...;hmac=r8tx1..." allow="clipboard-write" class="content"
></iframe> ```
You should compute the request payload on the server side. You can render it (or the whole iframe) on the server or make an ajax call from your front end code, but **do not ever embed your API key into front end code, as doing so introduces a serious security vulnerability**.
func (*CardService) List ¶
func (r *CardService) List(ctx context.Context, query CardListParams, opts ...option.RequestOption) (res *shared.Page[Card], err error)
List cards.
func (*CardService) ListAutoPaging ¶
func (r *CardService) ListAutoPaging(ctx context.Context, query CardListParams, opts ...option.RequestOption) *shared.PageAutoPager[Card]
List cards.
func (*CardService) New ¶
func (r *CardService) New(ctx context.Context, body CardNewParams, opts ...option.RequestOption) (res *Card, err error)
Create a new virtual or physical card. Parameters `pin`, `shipping_address`, and `product_id` only apply to physical cards.
func (*CardService) Provision ¶
func (r *CardService) Provision(ctx context.Context, cardToken string, body CardProvisionParams, opts ...option.RequestOption) (res *CardProvisionResponse, err error)
Allow your cardholders to directly add payment cards to the device's digital wallet (e.g. Apple Pay) with one touch from your app.
This requires some additional setup and configuration. Please [Contact Us](https://lithic.com/contact) or your Customer Success representative for more information.
func (*CardService) Reissue ¶
func (r *CardService) Reissue(ctx context.Context, cardToken string, body CardReissueParams, opts ...option.RequestOption) (res *Card, err error)
Initiate print and shipment of a duplicate physical card.
Only applies to cards of type `PHYSICAL`.
func (*CardService) Update ¶
func (r *CardService) Update(ctx context.Context, cardToken string, body CardUpdateParams, opts ...option.RequestOption) (res *Card, err error)
Update the specified properties of the card. Unsupplied properties will remain unchanged. `pin` parameter only applies to physical cards.
_Note: setting a card to a `CLOSED` state is a final action that cannot be undone._
type CardState ¶
type CardState string
Card state values:
- `CLOSED` - Card will no longer approve authorizations. Closing a card cannot be undone.
- `OPEN` - Card will approve authorizations (if they match card and account parameters).
- `PAUSED` - Card will decline authorizations, but can be resumed at a later time.
- `PENDING_FULFILLMENT` - The initial state for cards of type `PHYSICAL`. The card is provisioned pending manufacturing and fulfillment. Cards in this state can accept authorizations for e-commerce purchases, but not for "Card Present" purchases where the physical card itself is present.
- `PENDING_ACTIVATION` - Each business day at 2pm Eastern Time Zone (ET), cards of type `PHYSICAL` in state `PENDING_FULFILLMENT` are sent to the card production warehouse and updated to state `PENDING_ACTIVATION` . Similar to `PENDING_FULFILLMENT`, cards in this state can be used for e-commerce transactions. API clients should update the card's state to `OPEN` only after the cardholder confirms receipt of the card.
In sandbox, the same daily batch fulfillment occurs, but no cards are actually manufactured.
type CardType ¶
type CardType string
Card types:
- `VIRTUAL` - Card will authorize at any merchant and can be added to a digital wallet like Apple Pay or Google Pay (if the card program is digital wallet-enabled).
- `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. Reach out at lithic.com/contact(https://lithic.com/contact) for more information.
- `SINGLE_USE` - Card is closed upon first successful authorization.
- `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that successfully authorizes the card.
type CardUpdateParams ¶
type CardUpdateParams struct { // Identifier for any Auth Rules that will be applied to transactions taking place // with the card. AuthRuleToken param.Field[string] `json:"auth_rule_token"` // Specifies the digital card art to be displayed in the user’s digital wallet // after tokenization. This artwork must be approved by Mastercard and configured // by Lithic to use. See // [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). DigitalCardArtToken param.Field[string] `json:"digital_card_art_token" format:"uuid"` // Friendly name to identify the card. We recommend against using this field to // store JSON data as it can cause unexpected behavior. Memo param.Field[string] `json:"memo"` // Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and // `VIRTUAL`. See // [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block-enterprise). Pin param.Field[string] `json:"pin"` // Amount (in cents) to limit approved authorizations. Transaction requests above // the spend limit will be declined. Note that a spend limit of 0 is effectively no // limit, and should only be used to reset or remove a prior limit. Only a limit of // 1 or above will result in declined transactions due to checks against the card // limit. SpendLimit param.Field[int64] `json:"spend_limit"` // Spend limit duration values: // // - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar // year. // - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime // of the card. // - `MONTHLY` - Card will authorize transactions up to spend limit for the // trailing month. Month is calculated as this calendar date one month prior. // - `TRANSACTION` - Card will authorize multiple transactions if each individual // transaction is under the spend limit. SpendLimitDuration param.Field[SpendLimitDuration] `json:"spend_limit_duration"` // Card state values: // // - `CLOSED` - Card will no longer approve authorizations. Closing a card cannot // be undone. // - `OPEN` - Card will approve authorizations (if they match card and account // parameters). // - `PAUSED` - Card will decline authorizations, but can be resumed at a later // time. State param.Field[CardUpdateParamsState] `json:"state"` }
func (CardUpdateParams) MarshalJSON ¶
func (r CardUpdateParams) MarshalJSON() (data []byte, err error)
type CardUpdateParamsState ¶
type CardUpdateParamsState string
Card state values:
- `CLOSED` - Card will no longer approve authorizations. Closing a card cannot be undone.
- `OPEN` - Card will approve authorizations (if they match card and account parameters).
- `PAUSED` - Card will decline authorizations, but can be resumed at a later time.
const ( CardUpdateParamsStateClosed CardUpdateParamsState = "CLOSED" CardUpdateParamsStateOpen CardUpdateParamsState = "OPEN" CardUpdateParamsStatePaused CardUpdateParamsState = "PAUSED" )
type Client ¶
type Client struct { Options []option.RequestOption Accounts *AccountService AccountHolders *AccountHolderService AuthRules *AuthRuleService AuthStreamEnrollment *AuthStreamEnrollmentService TokenizationDecisioning *TokenizationDecisioningService Cards *CardService Balances *BalanceService AggregateBalances *AggregateBalanceService Disputes *DisputeService Events *EventService Transfers *TransferService FinancialAccounts *FinancialAccountService Transactions *TransactionService ResponderEndpoints *ResponderEndpointService Webhooks *WebhookService }
Client creates a struct with services and top level methods that help with interacting with the lithic API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (`LITHIC_API_KEY`, `LITHIC_WEBHOOK_SECRET`). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
type Dispute ¶
type Dispute struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // Amount under dispute. May be different from the original transaction amount. Amount int64 `json:"amount,required"` // Date dispute entered arbitration. ArbitrationDate time.Time `json:"arbitration_date,required,nullable" format:"date-time"` // Timestamp of when first Dispute was reported. Created time.Time `json:"created,required" format:"date-time"` // Date that the dispute was filed by the customer making the dispute. CustomerFiledDate time.Time `json:"customer_filed_date,required,nullable" format:"date-time"` // End customer description of the reason for the dispute. CustomerNote string `json:"customer_note,required,nullable"` // Unique identifiers for the dispute from the network. NetworkClaimIDs []string `json:"network_claim_ids,required,nullable"` // Date that the dispute was submitted to the network. NetworkFiledDate time.Time `json:"network_filed_date,required,nullable" format:"date-time"` // Network reason code used to file the dispute. NetworkReasonCode string `json:"network_reason_code,required,nullable"` // Date dispute entered pre-arbitration. PrearbitrationDate time.Time `json:"prearbitration_date,required,nullable" format:"date-time"` // Unique identifier for the dispute from the network. If there are multiple, this // will be the first claim id set by the network PrimaryClaimID string `json:"primary_claim_id,required,nullable"` // Dispute reason: // // - `ATM_CASH_MISDISPENSE`: ATM cash misdispense. // - `CANCELLED`: Transaction was cancelled by the customer. // - `DUPLICATED`: The transaction was a duplicate. // - `FRAUD_CARD_NOT_PRESENT`: Fraudulent transaction, card not present. // - `FRAUD_CARD_PRESENT`: Fraudulent transaction, card present. // - `FRAUD_OTHER`: Fraudulent transaction, other types such as questionable // merchant activity. // - `GOODS_SERVICES_NOT_AS_DESCRIBED`: The goods or services were not as // described. // - `GOODS_SERVICES_NOT_RECEIVED`: The goods or services were not received. // - `INCORRECT_AMOUNT`: The transaction amount was incorrect. // - `MISSING_AUTH`: The transaction was missing authorization. // - `OTHER`: Other reason. // - `PROCESSING_ERROR`: Processing error. // - `REFUND_NOT_PROCESSED`: The refund was not processed. // - `RECURRING_TRANSACTION_NOT_CANCELLED`: The recurring transaction was not // cancelled. Reason DisputeReason `json:"reason,required"` // Date the representment was received. RepresentmentDate time.Time `json:"representment_date,required,nullable" format:"date-time"` // Resolution amount net of network fees. ResolutionAmount int64 `json:"resolution_amount,required,nullable"` // Date that the dispute was resolved. ResolutionDate time.Time `json:"resolution_date,required,nullable" format:"date-time"` // Note by Dispute team on the case resolution. ResolutionNote string `json:"resolution_note,required,nullable"` // Reason for the dispute resolution: // // - `CASE_LOST`: This case was lost at final arbitration. // - `NETWORK_REJECTED`: Network rejected. // - `NO_DISPUTE_RIGHTS_3DS`: No dispute rights, 3DS. // - `NO_DISPUTE_RIGHTS_BELOW_THRESHOLD`: No dispute rights, below threshold. // - `NO_DISPUTE_RIGHTS_CONTACTLESS`: No dispute rights, contactless. // - `NO_DISPUTE_RIGHTS_HYBRID`: No dispute rights, hybrid. // - `NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS`: No dispute rights, max chargebacks. // - `NO_DISPUTE_RIGHTS_OTHER`: No dispute rights, other. // - `PAST_FILING_DATE`: Past filing date. // - `PREARBITRATION_REJECTED`: Prearbitration rejected. // - `PROCESSOR_REJECTED_OTHER`: Processor rejected, other. // - `REFUNDED`: Refunded. // - `REFUNDED_AFTER_CHARGEBACK`: Refunded after chargeback. // - `WITHDRAWN`: Withdrawn. // - `WON_ARBITRATION`: Won arbitration. // - `WON_FIRST_CHARGEBACK`: Won first chargeback. // - `WON_PREARBITRATION`: Won prearbitration. ResolutionReason DisputeResolutionReason `json:"resolution_reason,required,nullable"` // Status types: // // - `NEW` - New dispute case is opened. // - `PENDING_CUSTOMER` - Lithic is waiting for customer to provide more // information. // - `SUBMITTED` - Dispute is submitted to the card network. // - `REPRESENTMENT` - Case has entered second presentment. // - `PREARBITRATION` - Case has entered prearbitration. // - `ARBITRATION` - Case has entered arbitration. // - `CASE_WON` - Case was won and credit will be issued. // - `CASE_CLOSED` - Case was lost or withdrawn. Status DisputeStatus `json:"status,required"` // The transaction that is being disputed. A transaction can only be disputed once // but may have multiple dispute cases. TransactionToken string `json:"transaction_token,required" format:"uuid"` JSON disputeJSON }
Dispute.
func (*Dispute) UnmarshalJSON ¶
type DisputeEvidence ¶
type DisputeEvidence struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // Timestamp of when dispute evidence was created. Created time.Time `json:"created,required" format:"date-time"` // Dispute token evidence is attached to. DisputeToken string `json:"dispute_token,required" format:"uuid"` // Upload status types: // // - `DELETED` - Evidence was deleted. // - `ERROR` - Evidence upload failed. // - `PENDING` - Evidence is pending upload. // - `REJECTED` - Evidence was rejected. // - `UPLOADED` - Evidence was uploaded. UploadStatus DisputeEvidenceUploadStatus `json:"upload_status,required"` // URL to download evidence. Only shown when `upload_status` is `UPLOADED`. DownloadURL string `json:"download_url"` // File name of evidence. Recommended to give the dispute evidence a human-readable // identifier. Filename string `json:"filename"` // URL to upload evidence. Only shown when `upload_status` is `PENDING`. UploadURL string `json:"upload_url"` JSON disputeEvidenceJSON }
Dispute evidence.
func (*DisputeEvidence) UnmarshalJSON ¶
func (r *DisputeEvidence) UnmarshalJSON(data []byte) (err error)
type DisputeEvidenceUploadStatus ¶
type DisputeEvidenceUploadStatus string
Upload status types:
- `DELETED` - Evidence was deleted. - `ERROR` - Evidence upload failed. - `PENDING` - Evidence is pending upload. - `REJECTED` - Evidence was rejected. - `UPLOADED` - Evidence was uploaded.
const ( DisputeEvidenceUploadStatusDeleted DisputeEvidenceUploadStatus = "DELETED" DisputeEvidenceUploadStatusError DisputeEvidenceUploadStatus = "ERROR" DisputeEvidenceUploadStatusPending DisputeEvidenceUploadStatus = "PENDING" DisputeEvidenceUploadStatusRejected DisputeEvidenceUploadStatus = "REJECTED" DisputeEvidenceUploadStatusUploaded DisputeEvidenceUploadStatus = "UPLOADED" )
type DisputeInitiateEvidenceUploadParams ¶ added in v0.4.0
type DisputeInitiateEvidenceUploadParams struct { // Filename of the evidence. Filename param.Field[string] `json:"filename"` }
func (DisputeInitiateEvidenceUploadParams) MarshalJSON ¶ added in v0.4.0
func (r DisputeInitiateEvidenceUploadParams) MarshalJSON() (data []byte, err error)
type DisputeListEvidencesParams ¶
type DisputeListEvidencesParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // A cursor representing an item's token before which a page of results should end. // Used to retrieve the previous page of results before this item. EndingBefore param.Field[string] `query:"ending_before"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` // A cursor representing an item's token after which a page of results should // begin. Used to retrieve the next page of results after this item. StartingAfter param.Field[string] `query:"starting_after"` }
func (DisputeListEvidencesParams) URLQuery ¶
func (r DisputeListEvidencesParams) URLQuery() (v url.Values)
URLQuery serializes DisputeListEvidencesParams's query parameters as `url.Values`.
type DisputeListParams ¶
type DisputeListParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // A cursor representing an item's token before which a page of results should end. // Used to retrieve the previous page of results before this item. EndingBefore param.Field[string] `query:"ending_before"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` // A cursor representing an item's token after which a page of results should // begin. Used to retrieve the next page of results after this item. StartingAfter param.Field[string] `query:"starting_after"` // List disputes of a specific status. Status param.Field[DisputeListParamsStatus] `query:"status"` // Transaction tokens to filter by. TransactionTokens param.Field[[]string] `query:"transaction_tokens" format:"uuid"` }
func (DisputeListParams) URLQuery ¶
func (r DisputeListParams) URLQuery() (v url.Values)
URLQuery serializes DisputeListParams's query parameters as `url.Values`.
type DisputeListParamsStatus ¶
type DisputeListParamsStatus string
List disputes of a specific status.
const ( DisputeListParamsStatusNew DisputeListParamsStatus = "NEW" DisputeListParamsStatusPendingCustomer DisputeListParamsStatus = "PENDING_CUSTOMER" DisputeListParamsStatusSubmitted DisputeListParamsStatus = "SUBMITTED" DisputeListParamsStatusRepresentment DisputeListParamsStatus = "REPRESENTMENT" DisputeListParamsStatusPrearbitration DisputeListParamsStatus = "PREARBITRATION" DisputeListParamsStatusArbitration DisputeListParamsStatus = "ARBITRATION" DisputeListParamsStatusCaseWon DisputeListParamsStatus = "CASE_WON" DisputeListParamsStatusCaseClosed DisputeListParamsStatus = "CASE_CLOSED" )
type DisputeNewParams ¶
type DisputeNewParams struct { // Amount to dispute Amount param.Field[int64] `json:"amount,required"` // Reason for dispute Reason param.Field[DisputeNewParamsReason] `json:"reason,required"` // Transaction to dispute TransactionToken param.Field[string] `json:"transaction_token,required" format:"uuid"` // Date the customer filed the dispute CustomerFiledDate param.Field[time.Time] `json:"customer_filed_date" format:"date-time"` // Customer description of dispute CustomerNote param.Field[string] `json:"customer_note"` }
func (DisputeNewParams) MarshalJSON ¶
func (r DisputeNewParams) MarshalJSON() (data []byte, err error)
type DisputeNewParamsReason ¶
type DisputeNewParamsReason string
Reason for dispute
const ( DisputeNewParamsReasonAtmCashMisdispense DisputeNewParamsReason = "ATM_CASH_MISDISPENSE" DisputeNewParamsReasonCancelled DisputeNewParamsReason = "CANCELLED" DisputeNewParamsReasonDuplicated DisputeNewParamsReason = "DUPLICATED" DisputeNewParamsReasonFraudCardNotPresent DisputeNewParamsReason = "FRAUD_CARD_NOT_PRESENT" DisputeNewParamsReasonFraudCardPresent DisputeNewParamsReason = "FRAUD_CARD_PRESENT" DisputeNewParamsReasonFraudOther DisputeNewParamsReason = "FRAUD_OTHER" DisputeNewParamsReasonGoodsServicesNotAsDescribed DisputeNewParamsReason = "GOODS_SERVICES_NOT_AS_DESCRIBED" DisputeNewParamsReasonGoodsServicesNotReceived DisputeNewParamsReason = "GOODS_SERVICES_NOT_RECEIVED" DisputeNewParamsReasonIncorrectAmount DisputeNewParamsReason = "INCORRECT_AMOUNT" DisputeNewParamsReasonMissingAuth DisputeNewParamsReason = "MISSING_AUTH" DisputeNewParamsReasonOther DisputeNewParamsReason = "OTHER" DisputeNewParamsReasonProcessingError DisputeNewParamsReason = "PROCESSING_ERROR" DisputeNewParamsReasonRefundNotProcessed DisputeNewParamsReason = "REFUND_NOT_PROCESSED" DisputeNewParamsReasonRecurringTransactionNotCancelled DisputeNewParamsReason = "RECURRING_TRANSACTION_NOT_CANCELLED" )
type DisputeReason ¶
type DisputeReason string
Dispute reason:
- `ATM_CASH_MISDISPENSE`: ATM cash misdispense.
- `CANCELLED`: Transaction was cancelled by the customer.
- `DUPLICATED`: The transaction was a duplicate.
- `FRAUD_CARD_NOT_PRESENT`: Fraudulent transaction, card not present.
- `FRAUD_CARD_PRESENT`: Fraudulent transaction, card present.
- `FRAUD_OTHER`: Fraudulent transaction, other types such as questionable merchant activity.
- `GOODS_SERVICES_NOT_AS_DESCRIBED`: The goods or services were not as described.
- `GOODS_SERVICES_NOT_RECEIVED`: The goods or services were not received.
- `INCORRECT_AMOUNT`: The transaction amount was incorrect.
- `MISSING_AUTH`: The transaction was missing authorization.
- `OTHER`: Other reason.
- `PROCESSING_ERROR`: Processing error.
- `REFUND_NOT_PROCESSED`: The refund was not processed.
- `RECURRING_TRANSACTION_NOT_CANCELLED`: The recurring transaction was not cancelled.
const ( DisputeReasonAtmCashMisdispense DisputeReason = "ATM_CASH_MISDISPENSE" DisputeReasonCancelled DisputeReason = "CANCELLED" DisputeReasonDuplicated DisputeReason = "DUPLICATED" DisputeReasonFraudCardNotPresent DisputeReason = "FRAUD_CARD_NOT_PRESENT" DisputeReasonFraudCardPresent DisputeReason = "FRAUD_CARD_PRESENT" DisputeReasonFraudOther DisputeReason = "FRAUD_OTHER" DisputeReasonGoodsServicesNotAsDescribed DisputeReason = "GOODS_SERVICES_NOT_AS_DESCRIBED" DisputeReasonGoodsServicesNotReceived DisputeReason = "GOODS_SERVICES_NOT_RECEIVED" DisputeReasonIncorrectAmount DisputeReason = "INCORRECT_AMOUNT" DisputeReasonMissingAuth DisputeReason = "MISSING_AUTH" DisputeReasonOther DisputeReason = "OTHER" DisputeReasonProcessingError DisputeReason = "PROCESSING_ERROR" DisputeReasonRefundNotProcessed DisputeReason = "REFUND_NOT_PROCESSED" DisputeReasonRecurringTransactionNotCancelled DisputeReason = "RECURRING_TRANSACTION_NOT_CANCELLED" )
type DisputeResolutionReason ¶
type DisputeResolutionReason string
Reason for the dispute resolution:
- `CASE_LOST`: This case was lost at final arbitration. - `NETWORK_REJECTED`: Network rejected. - `NO_DISPUTE_RIGHTS_3DS`: No dispute rights, 3DS. - `NO_DISPUTE_RIGHTS_BELOW_THRESHOLD`: No dispute rights, below threshold. - `NO_DISPUTE_RIGHTS_CONTACTLESS`: No dispute rights, contactless. - `NO_DISPUTE_RIGHTS_HYBRID`: No dispute rights, hybrid. - `NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS`: No dispute rights, max chargebacks. - `NO_DISPUTE_RIGHTS_OTHER`: No dispute rights, other. - `PAST_FILING_DATE`: Past filing date. - `PREARBITRATION_REJECTED`: Prearbitration rejected. - `PROCESSOR_REJECTED_OTHER`: Processor rejected, other. - `REFUNDED`: Refunded. - `REFUNDED_AFTER_CHARGEBACK`: Refunded after chargeback. - `WITHDRAWN`: Withdrawn. - `WON_ARBITRATION`: Won arbitration. - `WON_FIRST_CHARGEBACK`: Won first chargeback. - `WON_PREARBITRATION`: Won prearbitration.
const ( DisputeResolutionReasonCaseLost DisputeResolutionReason = "CASE_LOST" DisputeResolutionReasonNetworkRejected DisputeResolutionReason = "NETWORK_REJECTED" DisputeResolutionReasonNoDisputeRights3DS DisputeResolutionReason = "NO_DISPUTE_RIGHTS_3DS" DisputeResolutionReasonNoDisputeRightsBelowThreshold DisputeResolutionReason = "NO_DISPUTE_RIGHTS_BELOW_THRESHOLD" DisputeResolutionReasonNoDisputeRightsContactless DisputeResolutionReason = "NO_DISPUTE_RIGHTS_CONTACTLESS" DisputeResolutionReasonNoDisputeRightsHybrid DisputeResolutionReason = "NO_DISPUTE_RIGHTS_HYBRID" DisputeResolutionReasonNoDisputeRightsMaxChargebacks DisputeResolutionReason = "NO_DISPUTE_RIGHTS_MAX_CHARGEBACKS" DisputeResolutionReasonNoDisputeRightsOther DisputeResolutionReason = "NO_DISPUTE_RIGHTS_OTHER" DisputeResolutionReasonPastFilingDate DisputeResolutionReason = "PAST_FILING_DATE" DisputeResolutionReasonPrearbitrationRejected DisputeResolutionReason = "PREARBITRATION_REJECTED" DisputeResolutionReasonProcessorRejectedOther DisputeResolutionReason = "PROCESSOR_REJECTED_OTHER" DisputeResolutionReasonRefunded DisputeResolutionReason = "REFUNDED" DisputeResolutionReasonRefundedAfterChargeback DisputeResolutionReason = "REFUNDED_AFTER_CHARGEBACK" DisputeResolutionReasonWithdrawn DisputeResolutionReason = "WITHDRAWN" DisputeResolutionReasonWonArbitration DisputeResolutionReason = "WON_ARBITRATION" DisputeResolutionReasonWonFirstChargeback DisputeResolutionReason = "WON_FIRST_CHARGEBACK" DisputeResolutionReasonWonPrearbitration DisputeResolutionReason = "WON_PREARBITRATION" )
type DisputeService ¶
type DisputeService struct {
Options []option.RequestOption
}
DisputeService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDisputeService method instead.
func NewDisputeService ¶
func NewDisputeService(opts ...option.RequestOption) (r *DisputeService)
NewDisputeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DisputeService) Delete ¶
func (r *DisputeService) Delete(ctx context.Context, disputeToken string, opts ...option.RequestOption) (res *Dispute, err error)
Withdraw dispute.
func (*DisputeService) DeleteEvidence ¶
func (r *DisputeService) DeleteEvidence(ctx context.Context, disputeToken string, evidenceToken string, opts ...option.RequestOption) (res *DisputeEvidence, err error)
Soft delete evidence for a dispute. Evidence will not be reviewed or submitted by Lithic after it is withdrawn.
func (*DisputeService) Get ¶
func (r *DisputeService) Get(ctx context.Context, disputeToken string, opts ...option.RequestOption) (res *Dispute, err error)
Get dispute.
func (*DisputeService) GetEvidence ¶
func (r *DisputeService) GetEvidence(ctx context.Context, disputeToken string, evidenceToken string, opts ...option.RequestOption) (res *DisputeEvidence, err error)
Get a dispute's evidence metadata.
func (*DisputeService) InitiateEvidenceUpload ¶
func (r *DisputeService) InitiateEvidenceUpload(ctx context.Context, disputeToken string, body DisputeInitiateEvidenceUploadParams, opts ...option.RequestOption) (res *DisputeEvidence, err error)
Use this endpoint to upload evidences for the dispute. It will return a URL to upload your documents to. The URL will expire in 30 minutes.
Uploaded documents must either be a `jpg`, `png` or `pdf` file, and each must be less than 5 GiB.
func (*DisputeService) List ¶
func (r *DisputeService) List(ctx context.Context, query DisputeListParams, opts ...option.RequestOption) (res *shared.CursorPage[Dispute], err error)
List disputes.
func (*DisputeService) ListAutoPaging ¶
func (r *DisputeService) ListAutoPaging(ctx context.Context, query DisputeListParams, opts ...option.RequestOption) *shared.CursorPageAutoPager[Dispute]
List disputes.
func (*DisputeService) ListEvidences ¶
func (r *DisputeService) ListEvidences(ctx context.Context, disputeToken string, query DisputeListEvidencesParams, opts ...option.RequestOption) (res *shared.CursorPage[DisputeEvidence], err error)
List evidence metadata for a dispute.
func (*DisputeService) ListEvidencesAutoPaging ¶
func (r *DisputeService) ListEvidencesAutoPaging(ctx context.Context, disputeToken string, query DisputeListEvidencesParams, opts ...option.RequestOption) *shared.CursorPageAutoPager[DisputeEvidence]
List evidence metadata for a dispute.
func (*DisputeService) New ¶
func (r *DisputeService) New(ctx context.Context, body DisputeNewParams, opts ...option.RequestOption) (res *Dispute, err error)
Initiate a dispute.
func (*DisputeService) Update ¶
func (r *DisputeService) Update(ctx context.Context, disputeToken string, body DisputeUpdateParams, opts ...option.RequestOption) (res *Dispute, err error)
Update dispute. Can only be modified if status is `NEW`.
func (*DisputeService) UploadEvidence ¶
func (r *DisputeService) UploadEvidence(ctx context.Context, disputeToken string, file io.Reader, opts ...option.RequestOption) (err error)
type DisputeStatus ¶
type DisputeStatus string
Status types:
- `NEW` - New dispute case is opened.
- `PENDING_CUSTOMER` - Lithic is waiting for customer to provide more information.
- `SUBMITTED` - Dispute is submitted to the card network.
- `REPRESENTMENT` - Case has entered second presentment.
- `PREARBITRATION` - Case has entered prearbitration.
- `ARBITRATION` - Case has entered arbitration.
- `CASE_WON` - Case was won and credit will be issued.
- `CASE_CLOSED` - Case was lost or withdrawn.
const ( DisputeStatusNew DisputeStatus = "NEW" DisputeStatusPendingCustomer DisputeStatus = "PENDING_CUSTOMER" DisputeStatusSubmitted DisputeStatus = "SUBMITTED" DisputeStatusRepresentment DisputeStatus = "REPRESENTMENT" DisputeStatusPrearbitration DisputeStatus = "PREARBITRATION" DisputeStatusArbitration DisputeStatus = "ARBITRATION" DisputeStatusCaseWon DisputeStatus = "CASE_WON" DisputeStatusCaseClosed DisputeStatus = "CASE_CLOSED" )
type DisputeUpdateParams ¶
type DisputeUpdateParams struct { // Amount to dispute Amount param.Field[int64] `json:"amount"` // Date the customer filed the dispute CustomerFiledDate param.Field[time.Time] `json:"customer_filed_date" format:"date-time"` // Customer description of dispute CustomerNote param.Field[string] `json:"customer_note"` // Reason for dispute Reason param.Field[DisputeUpdateParamsReason] `json:"reason"` }
func (DisputeUpdateParams) MarshalJSON ¶
func (r DisputeUpdateParams) MarshalJSON() (data []byte, err error)
type DisputeUpdateParamsReason ¶
type DisputeUpdateParamsReason string
Reason for dispute
const ( DisputeUpdateParamsReasonAtmCashMisdispense DisputeUpdateParamsReason = "ATM_CASH_MISDISPENSE" DisputeUpdateParamsReasonCancelled DisputeUpdateParamsReason = "CANCELLED" DisputeUpdateParamsReasonDuplicated DisputeUpdateParamsReason = "DUPLICATED" DisputeUpdateParamsReasonFraudCardNotPresent DisputeUpdateParamsReason = "FRAUD_CARD_NOT_PRESENT" DisputeUpdateParamsReasonFraudCardPresent DisputeUpdateParamsReason = "FRAUD_CARD_PRESENT" DisputeUpdateParamsReasonFraudOther DisputeUpdateParamsReason = "FRAUD_OTHER" DisputeUpdateParamsReasonGoodsServicesNotAsDescribed DisputeUpdateParamsReason = "GOODS_SERVICES_NOT_AS_DESCRIBED" DisputeUpdateParamsReasonGoodsServicesNotReceived DisputeUpdateParamsReason = "GOODS_SERVICES_NOT_RECEIVED" DisputeUpdateParamsReasonIncorrectAmount DisputeUpdateParamsReason = "INCORRECT_AMOUNT" DisputeUpdateParamsReasonMissingAuth DisputeUpdateParamsReason = "MISSING_AUTH" DisputeUpdateParamsReasonOther DisputeUpdateParamsReason = "OTHER" DisputeUpdateParamsReasonProcessingError DisputeUpdateParamsReason = "PROCESSING_ERROR" DisputeUpdateParamsReasonRecurringTransactionNotCancelled DisputeUpdateParamsReason = "RECURRING_TRANSACTION_NOT_CANCELLED" DisputeUpdateParamsReasonRefundNotProcessed DisputeUpdateParamsReason = "REFUND_NOT_PROCESSED" )
type DisputeUploadEvidenceParams ¶ added in v0.3.1
type DisputeUploadEvidenceParams struct { }
type Event ¶
type Event struct { // Globally unique identifier. Token string `json:"token,required"` // An RFC 3339 timestamp for when the event was created. UTC time zone. // // If no timezone is specified, UTC will be used. Created time.Time `json:"created,required" format:"date-time"` // Event types: // // - `card.created` - Notification that a card has been created. // - `card.shipped` - Physical card shipment notification. See // https://docs.lithic.com/docs/cards#physical-card-shipped-webhook. // - `card_transaction.updated` - Transaction Lifecycle webhook. See // https://docs.lithic.com/docs/transaction-webhooks. // - `dispute.updated` - A dispute has been updated. // - `digital_wallet.tokenization_approval_request` - Card network's request to // Lithic to activate a digital wallet token. // - `digital_wallet.tokenization_two_factor_authentication_code` - A code to be // passed to an end user to complete digital wallet authentication. See // https://docs.lithic.com/docs/tokenization-control#digital-wallet-tokenization-auth-code. EventType EventEventType `json:"event_type,required"` Payload map[string]interface{} `json:"payload,required"` JSON eventJSON }
A single event that affects the transaction state and lifecycle.
func (*Event) UnmarshalJSON ¶
type EventEventType ¶
type EventEventType string
Event types:
- `card.created` - Notification that a card has been created.
- `card.shipped` - Physical card shipment notification. See https://docs.lithic.com/docs/cards#physical-card-shipped-webhook.
- `card_transaction.updated` - Transaction Lifecycle webhook. See https://docs.lithic.com/docs/transaction-webhooks.
- `dispute.updated` - A dispute has been updated.
- `digital_wallet.tokenization_approval_request` - Card network's request to Lithic to activate a digital wallet token.
- `digital_wallet.tokenization_two_factor_authentication_code` - A code to be passed to an end user to complete digital wallet authentication. See https://docs.lithic.com/docs/tokenization-control#digital-wallet-tokenization-auth-code.
const ( EventEventTypeCardCreated EventEventType = "card.created" EventEventTypeCardShipped EventEventType = "card.shipped" EventEventTypeCardTransactionUpdated EventEventType = "card_transaction.updated" EventEventTypeDigitalWalletTokenizationApprovalRequest EventEventType = "digital_wallet.tokenization_approval_request" EventEventTypeDigitalWalletTokenizationTwoFactorAuthenticationCode EventEventType = "digital_wallet.tokenization_two_factor_authentication_code" EventEventTypeDisputeUpdated EventEventType = "dispute.updated" )
type EventListParams ¶
type EventListParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // A cursor representing an item's token before which a page of results should end. // Used to retrieve the previous page of results before this item. EndingBefore param.Field[string] `query:"ending_before"` // Event types to filter events by. EventTypes param.Field[[]EventListParamsEventType] `query:"event_types"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` // A cursor representing an item's token after which a page of results should // begin. Used to retrieve the next page of results after this item. StartingAfter param.Field[string] `query:"starting_after"` }
func (EventListParams) URLQuery ¶
func (r EventListParams) URLQuery() (v url.Values)
URLQuery serializes EventListParams's query parameters as `url.Values`.
type EventListParamsEventType ¶ added in v0.5.0
type EventListParamsEventType string
const ( EventListParamsEventTypeCardCreated EventListParamsEventType = "card.created" EventListParamsEventTypeCardShipped EventListParamsEventType = "card.shipped" EventListParamsEventTypeCardTransactionUpdated EventListParamsEventType = "card_transaction.updated" EventListParamsEventTypeDigitalWalletTokenizationApprovalRequest EventListParamsEventType = "digital_wallet.tokenization_approval_request" EventListParamsEventTypeDigitalWalletTokenizationTwoFactorAuthenticationCode EventListParamsEventType = "digital_wallet.tokenization_two_factor_authentication_code" EventListParamsEventTypeDisputeUpdated EventListParamsEventType = "dispute.updated" )
type EventService ¶
type EventService struct { Options []option.RequestOption Subscriptions *EventSubscriptionService }
EventService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.
func NewEventService ¶
func NewEventService(opts ...option.RequestOption) (r *EventService)
NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EventService) Get ¶
func (r *EventService) Get(ctx context.Context, eventToken string, opts ...option.RequestOption) (res *Event, err error)
Get an event.
func (*EventService) List ¶
func (r *EventService) List(ctx context.Context, query EventListParams, opts ...option.RequestOption) (res *shared.CursorPage[Event], err error)
List all events.
func (*EventService) ListAutoPaging ¶
func (r *EventService) ListAutoPaging(ctx context.Context, query EventListParams, opts ...option.RequestOption) *shared.CursorPageAutoPager[Event]
List all events.
type EventSubscription ¶
type EventSubscription struct { // Globally unique identifier. Token string `json:"token,required"` // A description of the subscription. Description string `json:"description,required"` // Whether the subscription is disabled. Disabled bool `json:"disabled,required"` EventTypes []EventSubscriptionEventType `json:"event_types,required,nullable"` URL string `json:"url,required" format:"uri"` JSON eventSubscriptionJSON }
A subscription to specific event types.
func (*EventSubscription) UnmarshalJSON ¶
func (r *EventSubscription) UnmarshalJSON(data []byte) (err error)
type EventSubscriptionEventType ¶ added in v0.5.0
type EventSubscriptionEventType string
const ( EventSubscriptionEventTypeCardCreated EventSubscriptionEventType = "card.created" EventSubscriptionEventTypeCardShipped EventSubscriptionEventType = "card.shipped" EventSubscriptionEventTypeCardTransactionUpdated EventSubscriptionEventType = "card_transaction.updated" EventSubscriptionEventTypeDigitalWalletTokenizationApprovalRequest EventSubscriptionEventType = "digital_wallet.tokenization_approval_request" EventSubscriptionEventTypeDigitalWalletTokenizationTwoFactorAuthenticationCode EventSubscriptionEventType = "digital_wallet.tokenization_two_factor_authentication_code" EventSubscriptionEventTypeDisputeUpdated EventSubscriptionEventType = "dispute.updated" )
type EventSubscriptionGetSecretResponse ¶ added in v0.5.0
type EventSubscriptionGetSecretResponse struct { Key string `json:"key"` JSON eventSubscriptionGetSecretResponseJSON }
func (*EventSubscriptionGetSecretResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *EventSubscriptionGetSecretResponse) UnmarshalJSON(data []byte) (err error)
type EventSubscriptionListParams ¶
type EventSubscriptionListParams struct { // A cursor representing an item's token before which a page of results should end. // Used to retrieve the previous page of results before this item. EndingBefore param.Field[string] `query:"ending_before"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` // A cursor representing an item's token after which a page of results should // begin. Used to retrieve the next page of results after this item. StartingAfter param.Field[string] `query:"starting_after"` }
func (EventSubscriptionListParams) URLQuery ¶
func (r EventSubscriptionListParams) URLQuery() (v url.Values)
URLQuery serializes EventSubscriptionListParams's query parameters as `url.Values`.
type EventSubscriptionNewParams ¶
type EventSubscriptionNewParams struct { // URL to which event webhooks will be sent. URL must be a valid HTTPS address. URL param.Field[string] `json:"url,required" format:"uri"` // Event subscription description. Description param.Field[string] `json:"description"` // Whether the event subscription is active (false) or inactive (true). Disabled param.Field[bool] `json:"disabled"` // Indicates types of events that will be sent to this subscription. If left blank, // all types will be sent. EventTypes param.Field[[]EventSubscriptionNewParamsEventType] `json:"event_types"` }
func (EventSubscriptionNewParams) MarshalJSON ¶
func (r EventSubscriptionNewParams) MarshalJSON() (data []byte, err error)
type EventSubscriptionNewParamsEventType ¶ added in v0.5.0
type EventSubscriptionNewParamsEventType string
const ( EventSubscriptionNewParamsEventTypeCardCreated EventSubscriptionNewParamsEventType = "card.created" EventSubscriptionNewParamsEventTypeCardShipped EventSubscriptionNewParamsEventType = "card.shipped" EventSubscriptionNewParamsEventTypeCardTransactionUpdated EventSubscriptionNewParamsEventType = "card_transaction.updated" EventSubscriptionNewParamsEventTypeDigitalWalletTokenizationApprovalRequest EventSubscriptionNewParamsEventType = "digital_wallet.tokenization_approval_request" EventSubscriptionNewParamsEventTypeDigitalWalletTokenizationTwoFactorAuthenticationCode EventSubscriptionNewParamsEventType = "digital_wallet.tokenization_two_factor_authentication_code" EventSubscriptionNewParamsEventTypeDisputeUpdated EventSubscriptionNewParamsEventType = "dispute.updated" )
type EventSubscriptionRecoverParams ¶
type EventSubscriptionRecoverParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` }
func (EventSubscriptionRecoverParams) URLQuery ¶
func (r EventSubscriptionRecoverParams) URLQuery() (v url.Values)
URLQuery serializes EventSubscriptionRecoverParams's query parameters as `url.Values`.
type EventSubscriptionReplayMissingParams ¶
type EventSubscriptionReplayMissingParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` }
func (EventSubscriptionReplayMissingParams) URLQuery ¶
func (r EventSubscriptionReplayMissingParams) URLQuery() (v url.Values)
URLQuery serializes EventSubscriptionReplayMissingParams's query parameters as `url.Values`.
type EventSubscriptionService ¶
type EventSubscriptionService struct {
Options []option.RequestOption
}
EventSubscriptionService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventSubscriptionService method instead.
func NewEventSubscriptionService ¶
func NewEventSubscriptionService(opts ...option.RequestOption) (r *EventSubscriptionService)
NewEventSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EventSubscriptionService) Delete ¶
func (r *EventSubscriptionService) Delete(ctx context.Context, eventSubscriptionToken string, opts ...option.RequestOption) (err error)
Delete an event subscription.
func (*EventSubscriptionService) Get ¶
func (r *EventSubscriptionService) Get(ctx context.Context, eventSubscriptionToken string, opts ...option.RequestOption) (res *EventSubscription, err error)
Get an event subscription.
func (*EventSubscriptionService) GetSecret ¶
func (r *EventSubscriptionService) GetSecret(ctx context.Context, eventSubscriptionToken string, opts ...option.RequestOption) (res *EventSubscriptionGetSecretResponse, err error)
Get the secret for an event subscription.
func (*EventSubscriptionService) List ¶
func (r *EventSubscriptionService) List(ctx context.Context, query EventSubscriptionListParams, opts ...option.RequestOption) (res *shared.CursorPage[EventSubscription], err error)
List all the event subscriptions.
func (*EventSubscriptionService) ListAutoPaging ¶
func (r *EventSubscriptionService) ListAutoPaging(ctx context.Context, query EventSubscriptionListParams, opts ...option.RequestOption) *shared.CursorPageAutoPager[EventSubscription]
List all the event subscriptions.
func (*EventSubscriptionService) New ¶
func (r *EventSubscriptionService) New(ctx context.Context, body EventSubscriptionNewParams, opts ...option.RequestOption) (res *EventSubscription, err error)
Create a new event subscription.
func (*EventSubscriptionService) Recover ¶
func (r *EventSubscriptionService) Recover(ctx context.Context, eventSubscriptionToken string, body EventSubscriptionRecoverParams, opts ...option.RequestOption) (err error)
Resend all failed messages since a given time.
func (*EventSubscriptionService) ReplayMissing ¶
func (r *EventSubscriptionService) ReplayMissing(ctx context.Context, eventSubscriptionToken string, body EventSubscriptionReplayMissingParams, opts ...option.RequestOption) (err error)
Replays messages to the endpoint. Only messages that were created after `begin` will be sent. Messages that were previously sent to the endpoint are not resent.
func (*EventSubscriptionService) RotateSecret ¶
func (r *EventSubscriptionService) RotateSecret(ctx context.Context, eventSubscriptionToken string, opts ...option.RequestOption) (err error)
Rotate the secret for an event subscription. The previous secret will be valid for the next 24 hours.
func (*EventSubscriptionService) Update ¶
func (r *EventSubscriptionService) Update(ctx context.Context, eventSubscriptionToken string, body EventSubscriptionUpdateParams, opts ...option.RequestOption) (res *EventSubscription, err error)
Update an event subscription.
type EventSubscriptionUpdateParams ¶
type EventSubscriptionUpdateParams struct { // URL to which event webhooks will be sent. URL must be a valid HTTPS address. URL param.Field[string] `json:"url,required" format:"uri"` // Event subscription description. Description param.Field[string] `json:"description"` // Whether the event subscription is active (false) or inactive (true). Disabled param.Field[bool] `json:"disabled"` // Indicates types of events that will be sent to this subscription. If left blank, // all types will be sent. EventTypes param.Field[[]EventSubscriptionUpdateParamsEventType] `json:"event_types"` }
func (EventSubscriptionUpdateParams) MarshalJSON ¶
func (r EventSubscriptionUpdateParams) MarshalJSON() (data []byte, err error)
type EventSubscriptionUpdateParamsEventType ¶ added in v0.5.0
type EventSubscriptionUpdateParamsEventType string
const ( EventSubscriptionUpdateParamsEventTypeCardCreated EventSubscriptionUpdateParamsEventType = "card.created" EventSubscriptionUpdateParamsEventTypeCardShipped EventSubscriptionUpdateParamsEventType = "card.shipped" EventSubscriptionUpdateParamsEventTypeCardTransactionUpdated EventSubscriptionUpdateParamsEventType = "card_transaction.updated" EventSubscriptionUpdateParamsEventTypeDigitalWalletTokenizationApprovalRequest EventSubscriptionUpdateParamsEventType = "digital_wallet.tokenization_approval_request" EventSubscriptionUpdateParamsEventTypeDigitalWalletTokenizationTwoFactorAuthenticationCode EventSubscriptionUpdateParamsEventType = "digital_wallet.tokenization_two_factor_authentication_code" EventSubscriptionUpdateParamsEventTypeDisputeUpdated EventSubscriptionUpdateParamsEventType = "dispute.updated" )
type FinancialAccount ¶
type FinancialAccount struct { // Globally unique identifier for the financial account. Token string `json:"token,required" format:"uuid"` // Date and time for when the financial account was first created. Created time.Time `json:"created,required" format:"date-time"` // Type of financial account Type FinancialAccountType `json:"type,required"` // Date and time for when the financial account was last updated. Updated time.Time `json:"updated,required" format:"date-time"` // Account number for your Lithic-assigned bank account number, if applicable. AccountNumber string `json:"account_number"` // Routing number for your Lithic-assigned bank account number, if applicable. RoutingNumber string `json:"routing_number"` JSON financialAccountJSON }
Financial Account
func (*FinancialAccount) UnmarshalJSON ¶
func (r *FinancialAccount) UnmarshalJSON(data []byte) (err error)
type FinancialAccountBalanceListParams ¶
type FinancialAccountBalanceListParams struct { // UTC date of the balance to retrieve. Defaults to latest available balance BalanceDate param.Field[time.Time] `query:"balance_date" format:"date-time"` // Balance after a given financial event occured. For example, passing the // event_token of a $5 CARD_CLEARING financial event will return a balance // decreased by $5 LastTransactionEventToken param.Field[string] `query:"last_transaction_event_token" format:"uuid"` }
func (FinancialAccountBalanceListParams) URLQuery ¶
func (r FinancialAccountBalanceListParams) URLQuery() (v url.Values)
URLQuery serializes FinancialAccountBalanceListParams's query parameters as `url.Values`.
type FinancialAccountBalanceService ¶
type FinancialAccountBalanceService struct {
Options []option.RequestOption
}
FinancialAccountBalanceService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinancialAccountBalanceService method instead.
func NewFinancialAccountBalanceService ¶
func NewFinancialAccountBalanceService(opts ...option.RequestOption) (r *FinancialAccountBalanceService)
NewFinancialAccountBalanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FinancialAccountBalanceService) List ¶
func (r *FinancialAccountBalanceService) List(ctx context.Context, financialAccountToken string, query FinancialAccountBalanceListParams, opts ...option.RequestOption) (res *shared.SinglePage[Balance], err error)
Get the balances for a given financial account.
func (*FinancialAccountBalanceService) ListAutoPaging ¶
func (r *FinancialAccountBalanceService) ListAutoPaging(ctx context.Context, financialAccountToken string, query FinancialAccountBalanceListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[Balance]
Get the balances for a given financial account.
type FinancialAccountFinancialTransactionService ¶
type FinancialAccountFinancialTransactionService struct {
Options []option.RequestOption
}
FinancialAccountFinancialTransactionService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinancialAccountFinancialTransactionService method instead.
func NewFinancialAccountFinancialTransactionService ¶
func NewFinancialAccountFinancialTransactionService(opts ...option.RequestOption) (r *FinancialAccountFinancialTransactionService)
NewFinancialAccountFinancialTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FinancialAccountFinancialTransactionService) Get ¶
func (r *FinancialAccountFinancialTransactionService) Get(ctx context.Context, financialAccountToken string, financialTransactionToken string, opts ...option.RequestOption) (res *FinancialTransaction, err error)
Get the financial transaction for the provided token.
func (*FinancialAccountFinancialTransactionService) List ¶
func (r *FinancialAccountFinancialTransactionService) List(ctx context.Context, financialAccountToken string, query FinancialTransactionListParams, opts ...option.RequestOption) (res *shared.SinglePage[FinancialTransaction], err error)
List the financial transactions for a given financial account.
func (*FinancialAccountFinancialTransactionService) ListAutoPaging ¶
func (r *FinancialAccountFinancialTransactionService) ListAutoPaging(ctx context.Context, financialAccountToken string, query FinancialTransactionListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[FinancialTransaction]
List the financial transactions for a given financial account.
type FinancialAccountListParams ¶
type FinancialAccountListParams struct { // List financial accounts for a given account_token AccountToken param.Field[string] `query:"account_token" format:"uuid"` // List financial accounts of a given type Type param.Field[FinancialAccountListParamsType] `query:"type"` }
func (FinancialAccountListParams) URLQuery ¶
func (r FinancialAccountListParams) URLQuery() (v url.Values)
URLQuery serializes FinancialAccountListParams's query parameters as `url.Values`.
type FinancialAccountListParamsType ¶
type FinancialAccountListParamsType string
List financial accounts of a given type
const ( FinancialAccountListParamsTypeIssuing FinancialAccountListParamsType = "ISSUING" FinancialAccountListParamsTypeReserve FinancialAccountListParamsType = "RESERVE" )
type FinancialAccountParam ¶
type FinancialAccountParam struct { // Globally unique identifier for the financial account. Token param.Field[string] `json:"token,required" format:"uuid"` // Date and time for when the financial account was first created. Created param.Field[time.Time] `json:"created,required" format:"date-time"` // Type of financial account Type param.Field[FinancialAccountType] `json:"type,required"` // Date and time for when the financial account was last updated. Updated param.Field[time.Time] `json:"updated,required" format:"date-time"` // Account number for your Lithic-assigned bank account number, if applicable. AccountNumber param.Field[string] `json:"account_number"` // Routing number for your Lithic-assigned bank account number, if applicable. RoutingNumber param.Field[string] `json:"routing_number"` }
Financial Account
func (FinancialAccountParam) MarshalJSON ¶
func (r FinancialAccountParam) MarshalJSON() (data []byte, err error)
type FinancialAccountService ¶
type FinancialAccountService struct { Options []option.RequestOption Balances *FinancialAccountBalanceService FinancialTransactions *FinancialAccountFinancialTransactionService }
FinancialAccountService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFinancialAccountService method instead.
func NewFinancialAccountService ¶
func NewFinancialAccountService(opts ...option.RequestOption) (r *FinancialAccountService)
NewFinancialAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FinancialAccountService) List ¶
func (r *FinancialAccountService) List(ctx context.Context, query FinancialAccountListParams, opts ...option.RequestOption) (res *shared.SinglePage[FinancialAccount], err error)
Retrieve information on your financial accounts including routing and account number.
func (*FinancialAccountService) ListAutoPaging ¶
func (r *FinancialAccountService) ListAutoPaging(ctx context.Context, query FinancialAccountListParams, opts ...option.RequestOption) *shared.SinglePageAutoPager[FinancialAccount]
Retrieve information on your financial accounts including routing and account number.
type FinancialAccountType ¶
type FinancialAccountType string
Type of financial account
const ( FinancialAccountTypeIssuing FinancialAccountType = "ISSUING" FinancialAccountTypeReserve FinancialAccountType = "RESERVE" )
type FinancialTransaction ¶
type FinancialTransaction struct { // Globally unique identifier. Token string `json:"token" format:"uuid"` // Status types: // // - `CARD` - Issuing card transaction. // - `ACH` - Transaction over ACH. // - `TRANSFER` - Internal transfer of funds between financial accounts in your // program. Category FinancialTransactionCategory `json:"category"` // Date and time when the financial transaction first occurred. UTC time zone. Created time.Time `json:"created" format:"date-time"` // 3-digit alphabetic ISO 4217 code for the settling currency of the transaction. Currency string `json:"currency"` // A string that provides a description of the financial transaction; may be useful // to display to users. Descriptor string `json:"descriptor"` // A list of all financial events that have modified this financial transaction. Events []FinancialTransactionEvent `json:"events"` // Pending amount of the transaction in the currency's smallest unit (e.g., cents), // including any acquirer fees. The value of this field will go to zero over time // once the financial transaction is settled. PendingAmount int64 `json:"pending_amount"` // APPROVED transactions were successful while DECLINED transactions were declined // by user, Lithic, or the network. Result FinancialTransactionResult `json:"result"` // Amount of the transaction that has been settled in the currency's smallest unit // (e.g., cents), including any acquirer fees. This may change over time. SettledAmount int64 `json:"settled_amount"` // Status types: // // - `DECLINED` - The card transaction was declined. // - `EXPIRED` - Lithic reversed the card authorization as it has passed its // expiration time. // - `PENDING` - Authorization is pending completion from the merchant or pending // release from ACH hold period // - `SETTLED` - The financial transaction is completed. // - `VOIDED` - The merchant has voided the previously pending card authorization. Status FinancialTransactionStatus `json:"status"` // Date and time when the financial transaction was last updated. UTC time zone. Updated time.Time `json:"updated" format:"date-time"` JSON financialTransactionJSON }
func (*FinancialTransaction) UnmarshalJSON ¶
func (r *FinancialTransaction) UnmarshalJSON(data []byte) (err error)
type FinancialTransactionCategory ¶
type FinancialTransactionCategory string
Status types:
- `CARD` - Issuing card transaction.
- `ACH` - Transaction over ACH.
- `TRANSFER` - Internal transfer of funds between financial accounts in your program.
const ( FinancialTransactionCategoryCard FinancialTransactionCategory = "CARD" FinancialTransactionCategoryACH FinancialTransactionCategory = "ACH" FinancialTransactionCategoryTransfer FinancialTransactionCategory = "TRANSFER" )
type FinancialTransactionEvent ¶ added in v0.5.0
type FinancialTransactionEvent struct { // Globally unique identifier. Token string `json:"token" format:"uuid"` // Amount of the financial event that has been settled in the currency's smallest // unit (e.g., cents). Amount int64 `json:"amount"` // Date and time when the financial event occurred. UTC time zone. Created time.Time `json:"created" format:"date-time"` // APPROVED financial events were successful while DECLINED financial events were // declined by user, Lithic, or the network. Result FinancialTransactionEventsResult `json:"result"` // Event types: // // - `ACH_INSUFFICIENT_FUNDS` - Attempted ACH origination declined due to // insufficient balance. // - `ACH_ORIGINATION_PENDING` - ACH origination pending release from an ACH hold. // - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to // available balance. // - `ACH_RECEIPT_PENDING` - ACH receipt pending release from an ACH holder. // - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available // balance. // - `ACH_RETURN` - ACH origination returned by the Receiving Depository Financial // Institution. // - `AUTHORIZATION` - Authorize a card transaction. // - `AUTHORIZATION_ADVICE` - Advice on a card transaction. // - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by // Lithic. // - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. // - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has // occurred on a card. // - `CLEARING` - Card Transaction is settled. // - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). // - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). // - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a // merchant. // - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on // your behalf by the network. // - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds // without additional clearing. // - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or // credit card funds without additional clearing. // - `RETURN` - A card refund has been processed on the transaction. // - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant // reverses an incorrect refund). // - `TRANSFER` - Successful internal transfer of funds between financial accounts. // - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to // insufficient balance of the sender. Type FinancialTransactionEventsType `json:"type"` JSON financialTransactionEventJSON }
func (*FinancialTransactionEvent) UnmarshalJSON ¶ added in v0.5.0
func (r *FinancialTransactionEvent) UnmarshalJSON(data []byte) (err error)
type FinancialTransactionEventsResult ¶
type FinancialTransactionEventsResult string
APPROVED financial events were successful while DECLINED financial events were declined by user, Lithic, or the network.
const ( FinancialTransactionEventsResultApproved FinancialTransactionEventsResult = "APPROVED" FinancialTransactionEventsResultDeclined FinancialTransactionEventsResult = "DECLINED" )
type FinancialTransactionEventsType ¶
type FinancialTransactionEventsType string
Event types:
- `ACH_INSUFFICIENT_FUNDS` - Attempted ACH origination declined due to insufficient balance.
- `ACH_ORIGINATION_PENDING` - ACH origination pending release from an ACH hold.
- `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance.
- `ACH_RECEIPT_PENDING` - ACH receipt pending release from an ACH holder.
- `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance.
- `ACH_RETURN` - ACH origination returned by the Receiving Depository Financial Institution.
- `AUTHORIZATION` - Authorize a card transaction.
- `AUTHORIZATION_ADVICE` - Advice on a card transaction.
- `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic.
- `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant.
- `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on a card.
- `CLEARING` - Card Transaction is settled.
- `CORRECTION_DEBIT` - Manual card transaction correction (Debit).
- `CORRECTION_CREDIT` - Manual card transaction correction (Credit).
- `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant.
- `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf by the network.
- `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without additional clearing.
- `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card funds without additional clearing.
- `RETURN` - A card refund has been processed on the transaction.
- `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an incorrect refund).
- `TRANSFER` - Successful internal transfer of funds between financial accounts.
- `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient balance of the sender.
const ( FinancialTransactionEventsTypeACHInsufficientFunds FinancialTransactionEventsType = "ACH_INSUFFICIENT_FUNDS" FinancialTransactionEventsTypeACHOriginationPending FinancialTransactionEventsType = "ACH_ORIGINATION_PENDING" FinancialTransactionEventsTypeACHOriginationReleased FinancialTransactionEventsType = "ACH_ORIGINATION_RELEASED" FinancialTransactionEventsTypeACHReceiptPending FinancialTransactionEventsType = "ACH_RECEIPT_PENDING" FinancialTransactionEventsTypeACHReceiptReleased FinancialTransactionEventsType = "ACH_RECEIPT_RELEASED" FinancialTransactionEventsTypeACHReturn FinancialTransactionEventsType = "ACH_RETURN" FinancialTransactionEventsTypeAuthorization FinancialTransactionEventsType = "AUTHORIZATION" FinancialTransactionEventsTypeAuthorizationAdvice FinancialTransactionEventsType = "AUTHORIZATION_ADVICE" FinancialTransactionEventsTypeAuthorizationExpiry FinancialTransactionEventsType = "AUTHORIZATION_EXPIRY" FinancialTransactionEventsTypeAuthorizationReversal FinancialTransactionEventsType = "AUTHORIZATION_REVERSAL" FinancialTransactionEventsTypeBalanceInquiry FinancialTransactionEventsType = "BALANCE_INQUIRY" FinancialTransactionEventsTypeClearing FinancialTransactionEventsType = "CLEARING" FinancialTransactionEventsTypeCorrectionDebit FinancialTransactionEventsType = "CORRECTION_DEBIT" FinancialTransactionEventsTypeCorrectionCredit FinancialTransactionEventsType = "CORRECTION_CREDIT" FinancialTransactionEventsTypeCreditAuthorization FinancialTransactionEventsType = "CREDIT_AUTHORIZATION" FinancialTransactionEventsTypeCreditAuthorizationAdvice FinancialTransactionEventsType = "CREDIT_AUTHORIZATION_ADVICE" FinancialTransactionEventsTypeFinancialAuthorization FinancialTransactionEventsType = "FINANCIAL_AUTHORIZATION" FinancialTransactionEventsTypeFinancialCreditAuthorization FinancialTransactionEventsType = "FINANCIAL_CREDIT_AUTHORIZATION" FinancialTransactionEventsTypeReturn FinancialTransactionEventsType = "RETURN" FinancialTransactionEventsTypeReturnReversal FinancialTransactionEventsType = "RETURN_REVERSAL" FinancialTransactionEventsTypeTransfer FinancialTransactionEventsType = "TRANSFER" FinancialTransactionEventsTypeTransferInsufficientFunds FinancialTransactionEventsType = "TRANSFER_INSUFFICIENT_FUNDS" )
type FinancialTransactionListParams ¶
type FinancialTransactionListParams struct { // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Financial Transaction category to be returned. Category param.Field[FinancialTransactionListParamsCategory] `query:"category"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // A cursor representing an item's token before which a page of results should end. // Used to retrieve the previous page of results before this item. EndingBefore param.Field[string] `query:"ending_before"` // Financial Transaction result to be returned. Result param.Field[FinancialTransactionListParamsResult] `query:"result"` // A cursor representing an item's token after which a page of results should // begin. Used to retrieve the next page of results after this item. StartingAfter param.Field[string] `query:"starting_after"` // Financial Transaction status to be returned. Status param.Field[FinancialTransactionListParamsStatus] `query:"status"` }
func (FinancialTransactionListParams) URLQuery ¶
func (r FinancialTransactionListParams) URLQuery() (v url.Values)
URLQuery serializes FinancialTransactionListParams's query parameters as `url.Values`.
type FinancialTransactionListParamsCategory ¶
type FinancialTransactionListParamsCategory string
Financial Transaction category to be returned.
const ( FinancialTransactionListParamsCategoryACH FinancialTransactionListParamsCategory = "ACH" FinancialTransactionListParamsCategoryCard FinancialTransactionListParamsCategory = "CARD" FinancialTransactionListParamsCategoryTransfer FinancialTransactionListParamsCategory = "TRANSFER" )
type FinancialTransactionListParamsResult ¶
type FinancialTransactionListParamsResult string
Financial Transaction result to be returned.
const ( FinancialTransactionListParamsResultApproved FinancialTransactionListParamsResult = "APPROVED" FinancialTransactionListParamsResultDeclined FinancialTransactionListParamsResult = "DECLINED" )
type FinancialTransactionListParamsStatus ¶
type FinancialTransactionListParamsStatus string
Financial Transaction status to be returned.
const ( FinancialTransactionListParamsStatusDeclined FinancialTransactionListParamsStatus = "DECLINED" FinancialTransactionListParamsStatusExpired FinancialTransactionListParamsStatus = "EXPIRED" FinancialTransactionListParamsStatusPending FinancialTransactionListParamsStatus = "PENDING" FinancialTransactionListParamsStatusSettled FinancialTransactionListParamsStatus = "SETTLED" FinancialTransactionListParamsStatusVoided FinancialTransactionListParamsStatus = "VOIDED" )
type FinancialTransactionResult ¶
type FinancialTransactionResult string
APPROVED transactions were successful while DECLINED transactions were declined by user, Lithic, or the network.
const ( FinancialTransactionResultApproved FinancialTransactionResult = "APPROVED" FinancialTransactionResultDeclined FinancialTransactionResult = "DECLINED" )
type FinancialTransactionStatus ¶
type FinancialTransactionStatus string
Status types:
- `DECLINED` - The card transaction was declined.
- `EXPIRED` - Lithic reversed the card authorization as it has passed its expiration time.
- `PENDING` - Authorization is pending completion from the merchant or pending release from ACH hold period
- `SETTLED` - The financial transaction is completed.
- `VOIDED` - The merchant has voided the previously pending card authorization.
const ( FinancialTransactionStatusDeclined FinancialTransactionStatus = "DECLINED" FinancialTransactionStatusExpired FinancialTransactionStatus = "EXPIRED" FinancialTransactionStatusPending FinancialTransactionStatus = "PENDING" FinancialTransactionStatusSettled FinancialTransactionStatus = "SETTLED" FinancialTransactionStatusVoided FinancialTransactionStatus = "VOIDED" )
type ResponderEndpointCheckStatusParams ¶
type ResponderEndpointCheckStatusParams struct { // The type of the endpoint. Type param.Field[ResponderEndpointCheckStatusParamsType] `query:"type,required"` }
func (ResponderEndpointCheckStatusParams) URLQuery ¶
func (r ResponderEndpointCheckStatusParams) URLQuery() (v url.Values)
URLQuery serializes ResponderEndpointCheckStatusParams's query parameters as `url.Values`.
type ResponderEndpointCheckStatusParamsType ¶
type ResponderEndpointCheckStatusParamsType string
The type of the endpoint.
const (
ResponderEndpointCheckStatusParamsTypeTokenizationDecisioning ResponderEndpointCheckStatusParamsType = "TOKENIZATION_DECISIONING"
)
type ResponderEndpointDeleteParams ¶
type ResponderEndpointDeleteParams struct { // The type of the endpoint. Type param.Field[ResponderEndpointDeleteParamsType] `query:"type,required"` }
func (ResponderEndpointDeleteParams) URLQuery ¶
func (r ResponderEndpointDeleteParams) URLQuery() (v url.Values)
URLQuery serializes ResponderEndpointDeleteParams's query parameters as `url.Values`.
type ResponderEndpointDeleteParamsType ¶
type ResponderEndpointDeleteParamsType string
The type of the endpoint.
const (
ResponderEndpointDeleteParamsTypeTokenizationDecisioning ResponderEndpointDeleteParamsType = "TOKENIZATION_DECISIONING"
)
type ResponderEndpointNewParams ¶
type ResponderEndpointNewParams struct { // The type of the endpoint. Type param.Field[ResponderEndpointNewParamsType] `json:"type"` // The URL for the responder endpoint (must be http(s)). URL param.Field[string] `json:"url" format:"uri"` }
func (ResponderEndpointNewParams) MarshalJSON ¶
func (r ResponderEndpointNewParams) MarshalJSON() (data []byte, err error)
type ResponderEndpointNewParamsType ¶
type ResponderEndpointNewParamsType string
The type of the endpoint.
const (
ResponderEndpointNewParamsTypeTokenizationDecisioning ResponderEndpointNewParamsType = "TOKENIZATION_DECISIONING"
)
type ResponderEndpointNewResponse ¶ added in v0.5.0
type ResponderEndpointNewResponse struct { // True if the endpoint was enrolled successfully. Enrolled bool `json:"enrolled"` JSON responderEndpointNewResponseJSON }
func (*ResponderEndpointNewResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *ResponderEndpointNewResponse) UnmarshalJSON(data []byte) (err error)
type ResponderEndpointService ¶
type ResponderEndpointService struct {
Options []option.RequestOption
}
ResponderEndpointService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewResponderEndpointService method instead.
func NewResponderEndpointService ¶
func NewResponderEndpointService(opts ...option.RequestOption) (r *ResponderEndpointService)
NewResponderEndpointService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ResponderEndpointService) CheckStatus ¶
func (r *ResponderEndpointService) CheckStatus(ctx context.Context, query ResponderEndpointCheckStatusParams, opts ...option.RequestOption) (res *ResponderEndpointStatus, err error)
Check the status of a responder endpoint
func (*ResponderEndpointService) Delete ¶
func (r *ResponderEndpointService) Delete(ctx context.Context, body ResponderEndpointDeleteParams, opts ...option.RequestOption) (err error)
Disenroll a responder endpoint
func (*ResponderEndpointService) New ¶
func (r *ResponderEndpointService) New(ctx context.Context, body ResponderEndpointNewParams, opts ...option.RequestOption) (res *ResponderEndpointNewResponse, err error)
Enroll a responder endpoint
type ResponderEndpointStatus ¶
type ResponderEndpointStatus struct { // True if the instance has an endpoint enrolled. Enrolled bool `json:"enrolled"` // The URL of the currently enrolled endpoint or null. URL string `json:"url,nullable" format:"uri"` JSON responderEndpointStatusJSON }
func (*ResponderEndpointStatus) UnmarshalJSON ¶
func (r *ResponderEndpointStatus) UnmarshalJSON(data []byte) (err error)
type ShippingAddressParam ¶
type ShippingAddressParam = shared.ShippingAddressParam
This is an alias to an internal type.
type SpendLimitDuration ¶
type SpendLimitDuration string
Spend limit duration values:
- `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
- `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
- `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. Month is calculated as this calendar date one month prior.
- `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.
const ( SpendLimitDurationAnnually SpendLimitDuration = "ANNUALLY" SpendLimitDurationForever SpendLimitDuration = "FOREVER" SpendLimitDurationMonthly SpendLimitDuration = "MONTHLY" SpendLimitDurationTransaction SpendLimitDuration = "TRANSACTION" )
type TokenizationDecisioningRotateSecretResponse ¶
type TokenizationDecisioningRotateSecretResponse struct { // The new Tokenization Decisioning HMAC secret Secret string `json:"secret"` JSON tokenizationDecisioningRotateSecretResponseJSON }
func (*TokenizationDecisioningRotateSecretResponse) UnmarshalJSON ¶
func (r *TokenizationDecisioningRotateSecretResponse) UnmarshalJSON(data []byte) (err error)
type TokenizationDecisioningService ¶
type TokenizationDecisioningService struct {
Options []option.RequestOption
}
TokenizationDecisioningService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenizationDecisioningService method instead.
func NewTokenizationDecisioningService ¶
func NewTokenizationDecisioningService(opts ...option.RequestOption) (r *TokenizationDecisioningService)
NewTokenizationDecisioningService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenizationDecisioningService) GetSecret ¶
func (r *TokenizationDecisioningService) GetSecret(ctx context.Context, opts ...option.RequestOption) (res *TokenizationSecret, err error)
Retrieve the Tokenization Decisioning secret key. If one does not exist your program yet, calling this endpoint will create one for you. The headers of the Tokenization Decisioning request will contain a hmac signature which you can use to verify requests originate from Lithic. See [this page](https://docs.lithic.com/docs/events-api#verifying-webhooks) for more detail about verifying Tokenization Decisioning requests.
func (*TokenizationDecisioningService) RotateSecret ¶
func (r *TokenizationDecisioningService) RotateSecret(ctx context.Context, opts ...option.RequestOption) (res *TokenizationDecisioningRotateSecretResponse, err error)
Generate a new Tokenization Decisioning secret key. The old Tokenization Decisioning secret key will be deactivated 24 hours after a successful request to this endpoint.
type TokenizationSecret ¶
type TokenizationSecret struct { // The Tokenization Decisioning HMAC secret Secret string `json:"secret"` JSON tokenizationSecretJSON }
func (*TokenizationSecret) UnmarshalJSON ¶
func (r *TokenizationSecret) UnmarshalJSON(data []byte) (err error)
type Transaction ¶
type Transaction struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // A fixed-width 23-digit numeric identifier for the Transaction that may be set if // the transaction originated from the Mastercard network. This number may be used // for dispute tracking. AcquirerReferenceNumber string `json:"acquirer_reference_number,required,nullable"` // Authorization amount of the transaction (in cents), including any acquirer fees. // This may change over time, and will represent the settled amount once the // transaction is settled. Amount int64 `json:"amount,required"` // Authorization amount (in cents) of the transaction, including any acquirer fees. // This amount always represents the amount authorized for the transaction, // unaffected by settlement. AuthorizationAmount int64 `json:"authorization_amount,required"` // A fixed-width 6-digit numeric identifier that can be used to identify a // transaction with networks. AuthorizationCode string `json:"authorization_code,required"` // Token for the card used in this transaction. CardToken string `json:"card_token,required" format:"uuid"` // Date and time when the transaction first occurred. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` // A list of all events that have modified this transaction. Events []TransactionEvent `json:"events,required"` Merchant TransactionMerchant `json:"merchant,required"` // Analogous to the "amount" property, but will represent the amount in the // transaction's local currency (smallest unit), including any acquirer fees. MerchantAmount int64 `json:"merchant_amount,required"` // Analogous to the "authorization_amount" property, but will represent the amount // in the transaction's local currency (smallest unit), including any acquirer // fees. MerchantAuthorizationAmount int64 `json:"merchant_authorization_amount,required"` // 3-digit alphabetic ISO 4217 code for the local currency of the transaction. MerchantCurrency string `json:"merchant_currency,required"` // Card network of the authorization. Can be `INTERLINK`, `MAESTRO`, `MASTERCARD`, // `VISA`, or `UNKNOWN`. Value is `UNKNOWN` when Lithic cannot determine the // network code from the upstream provider. Network TransactionNetwork `json:"network,required,nullable"` // `APPROVED` or decline reason. See Event result types Result TransactionResult `json:"result,required"` // Amount of the transaction that has been settled (in cents), including any // acquirer fees. This may change over time. SettledAmount int64 `json:"settled_amount,required"` // Status types: // // - `DECLINED` - The transaction was declined. // - `EXPIRED` - Lithic reversed the authorization as it has passed its expiration // time. // - `PENDING` - Authorization is pending completion from the merchant. // - `SETTLED` - The transaction is complete. // - `VOIDED` - The merchant has voided the previously pending authorization. Status TransactionStatus `json:"status,required"` CardholderAuthentication TransactionCardholderAuthentication `json:"cardholder_authentication,nullable"` JSON transactionJSON }
func (*Transaction) UnmarshalJSON ¶
func (r *Transaction) UnmarshalJSON(data []byte) (err error)
type TransactionCardholderAuthentication ¶
type TransactionCardholderAuthentication struct { // 3-D Secure Protocol version. Possible values: // // - `1`: 3-D Secure Protocol version 1.x applied to the transaction. // - `2`: 3-D Secure Protocol version 2.x applied to the transaction. // - `null`: 3-D Secure was not used for the transaction ThreeDSVersion string `json:"3ds_version,required,nullable"` // Exemption applied by the ACS to authenticate the transaction without requesting // a challenge. Possible values: // // - `AUTHENTICATION_OUTAGE_EXCEPTION`: Authentication Outage Exception exemption. // - `LOW_VALUE`: Low Value Payment exemption. // - `MERCHANT_INITIATED_TRANSACTION`: Merchant Initiated Transaction (3RI). // - `NONE`: No exemption applied. // - `RECURRING_PAYMENT`: Recurring Payment exemption. // - `SECURE_CORPORATE_PAYMENT`: Secure Corporate Payment exemption. // - `STRONG_CUSTOMER_AUTHENTICATION_DELEGATION`: Strong Customer Authentication // Delegation exemption. // - `TRANSACTION_RISK_ANALYSIS`: Acquirer Low-Fraud and Transaction Risk Analysis // exemption. // // Maps to the 3-D Secure `transChallengeExemption` field. AcquirerExemption TransactionCardholderAuthenticationAcquirerExemption `json:"acquirer_exemption,required"` // Indicates whether chargeback liability shift applies to the transaction. // Possible values: // // - `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D // Secure flow, chargeback liability shift applies. // - `ACQUIRER_EXEMPTION`: The acquirer utilised an exemption to bypass Strong // Customer Authentication (`transStatus = N`, or `transStatus = I`). Liability // remains with the acquirer and in this case the `acquirer_exemption` field is // expected to be not `NONE`. // - `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the // merchant is liable. // - `TOKEN_AUTHENTICATED`: The transaction was a tokenized payment with validated // cryptography, possibly recurring. Chargeback liability shift to the issuer // applies. LiabilityShift TransactionCardholderAuthenticationLiabilityShift `json:"liability_shift,required"` // Verification attempted values: // // - `APP_LOGIN`: Out-of-band login verification was attempted by the ACS. // - `BIOMETRIC`: Out-of-band biometric verification was attempted by the ACS. // - `NONE`: No cardholder verification was attempted by the Access Control Server // (e.g. frictionless 3-D Secure flow, no 3-D Secure, or stand-in Risk Based // Analysis). // - `OTHER`: Other method was used by the ACS to verify the cardholder (e.g. // Mastercard Identity Check Express, recurring transactions, etc.) // - `OTP`: One-time password verification was attempted by the ACS. VerificationAttempted TransactionCardholderAuthenticationVerificationAttempted `json:"verification_attempted,required"` // This field partially maps to the `transStatus` field in the // [EMVCo 3-D Secure specification](https://www.emvco.com/emv-technologies/3d-secure/) // and Mastercard SPA2 AAV leading indicators. // // Verification result values: // // - `CANCELLED`: Authentication/Account verification could not be performed, // `transStatus = U`. // - `FAILED`: Transaction was not authenticated. `transStatus = N`, note: the // utilization of exemptions could also result in `transStatus = N`, inspect the // `acquirer_exemption` field for more information. // - `FRICTIONLESS`: Attempts processing performed, the transaction was not // authenticated, but a proof of attempted authentication/verification is // provided. `transStatus = A` and the leading AAV indicator was one of {`kE`, // `kF`, `kQ`}. // - `NOT_ATTEMPTED`: A 3-D Secure flow was not applied to this transaction. // Leading AAV indicator was one of {`kN`, `kX`} or no AAV was provided for the // transaction. // - `REJECTED`: Authentication/Account Verification rejected; `transStatus = R`. // Issuer is rejecting authentication/verification and requests that // authorization not be attempted. // - `SUCCESS`: Authentication verification successful. `transStatus = Y` and // leading AAV indicator for the transaction was one of {`kA`, `kB`, `kC`, `kD`, // `kO`, `kP`, `kR`, `kS`}. // // Note that the following `transStatus` values are not represented by this field: // // - `C`: Challenge Required // - `D`: Challenge Required; decoupled authentication confirmed // - `I`: Informational only // - `S`: Challenge using Secure Payment Confirmation (SPC) VerificationResult TransactionCardholderAuthenticationVerificationResult `json:"verification_result,required"` JSON transactionCardholderAuthenticationJSON }
func (*TransactionCardholderAuthentication) UnmarshalJSON ¶
func (r *TransactionCardholderAuthentication) UnmarshalJSON(data []byte) (err error)
type TransactionCardholderAuthenticationAcquirerExemption ¶
type TransactionCardholderAuthenticationAcquirerExemption string
Exemption applied by the ACS to authenticate the transaction without requesting a challenge. Possible values:
- `AUTHENTICATION_OUTAGE_EXCEPTION`: Authentication Outage Exception exemption.
- `LOW_VALUE`: Low Value Payment exemption.
- `MERCHANT_INITIATED_TRANSACTION`: Merchant Initiated Transaction (3RI).
- `NONE`: No exemption applied.
- `RECURRING_PAYMENT`: Recurring Payment exemption.
- `SECURE_CORPORATE_PAYMENT`: Secure Corporate Payment exemption.
- `STRONG_CUSTOMER_AUTHENTICATION_DELEGATION`: Strong Customer Authentication Delegation exemption.
- `TRANSACTION_RISK_ANALYSIS`: Acquirer Low-Fraud and Transaction Risk Analysis exemption.
Maps to the 3-D Secure `transChallengeExemption` field.
const ( TransactionCardholderAuthenticationAcquirerExemptionAuthenticationOutageException TransactionCardholderAuthenticationAcquirerExemption = "AUTHENTICATION_OUTAGE_EXCEPTION" TransactionCardholderAuthenticationAcquirerExemptionLowValue TransactionCardholderAuthenticationAcquirerExemption = "LOW_VALUE" TransactionCardholderAuthenticationAcquirerExemptionMerchantInitiatedTransaction TransactionCardholderAuthenticationAcquirerExemption = "MERCHANT_INITIATED_TRANSACTION" TransactionCardholderAuthenticationAcquirerExemptionNone TransactionCardholderAuthenticationAcquirerExemption = "NONE" TransactionCardholderAuthenticationAcquirerExemptionRecurringPayment TransactionCardholderAuthenticationAcquirerExemption = "RECURRING_PAYMENT" TransactionCardholderAuthenticationAcquirerExemptionSecureCorporatePayment TransactionCardholderAuthenticationAcquirerExemption = "SECURE_CORPORATE_PAYMENT" TransactionCardholderAuthenticationAcquirerExemptionStrongCustomerAuthenticationDelegation TransactionCardholderAuthenticationAcquirerExemption = "STRONG_CUSTOMER_AUTHENTICATION_DELEGATION" TransactionCardholderAuthenticationAcquirerExemptionTransactionRiskAnalysis TransactionCardholderAuthenticationAcquirerExemption = "TRANSACTION_RISK_ANALYSIS" )
type TransactionCardholderAuthenticationLiabilityShift ¶
type TransactionCardholderAuthenticationLiabilityShift string
Indicates whether chargeback liability shift applies to the transaction. Possible values:
- `3DS_AUTHENTICATED`: The transaction was fully authenticated through a 3-D Secure flow, chargeback liability shift applies.
- `ACQUIRER_EXEMPTION`: The acquirer utilised an exemption to bypass Strong Customer Authentication (`transStatus = N`, or `transStatus = I`). Liability remains with the acquirer and in this case the `acquirer_exemption` field is expected to be not `NONE`.
- `NONE`: Chargeback liability shift has not shifted to the issuer, i.e. the merchant is liable.
- `TOKEN_AUTHENTICATED`: The transaction was a tokenized payment with validated cryptography, possibly recurring. Chargeback liability shift to the issuer applies.
const ( TransactionCardholderAuthenticationLiabilityShift3DSAuthenticated TransactionCardholderAuthenticationLiabilityShift = "3DS_AUTHENTICATED" TransactionCardholderAuthenticationLiabilityShiftAcquirerExemption TransactionCardholderAuthenticationLiabilityShift = "ACQUIRER_EXEMPTION" TransactionCardholderAuthenticationLiabilityShiftNone TransactionCardholderAuthenticationLiabilityShift = "NONE" TransactionCardholderAuthenticationLiabilityShiftTokenAuthenticated TransactionCardholderAuthenticationLiabilityShift = "TOKEN_AUTHENTICATED" )
type TransactionCardholderAuthenticationVerificationAttempted ¶
type TransactionCardholderAuthenticationVerificationAttempted string
Verification attempted values:
- `APP_LOGIN`: Out-of-band login verification was attempted by the ACS.
- `BIOMETRIC`: Out-of-band biometric verification was attempted by the ACS.
- `NONE`: No cardholder verification was attempted by the Access Control Server (e.g. frictionless 3-D Secure flow, no 3-D Secure, or stand-in Risk Based Analysis).
- `OTHER`: Other method was used by the ACS to verify the cardholder (e.g. Mastercard Identity Check Express, recurring transactions, etc.)
- `OTP`: One-time password verification was attempted by the ACS.
const ( TransactionCardholderAuthenticationVerificationAttemptedAppLogin TransactionCardholderAuthenticationVerificationAttempted = "APP_LOGIN" TransactionCardholderAuthenticationVerificationAttemptedBiometric TransactionCardholderAuthenticationVerificationAttempted = "BIOMETRIC" TransactionCardholderAuthenticationVerificationAttemptedNone TransactionCardholderAuthenticationVerificationAttempted = "NONE" TransactionCardholderAuthenticationVerificationAttemptedOther TransactionCardholderAuthenticationVerificationAttempted = "OTHER" TransactionCardholderAuthenticationVerificationAttemptedOtp TransactionCardholderAuthenticationVerificationAttempted = "OTP" )
type TransactionCardholderAuthenticationVerificationResult ¶
type TransactionCardholderAuthenticationVerificationResult string
This field partially maps to the `transStatus` field in the [EMVCo 3-D Secure specification](https://www.emvco.com/emv-technologies/3d-secure/) and Mastercard SPA2 AAV leading indicators.
Verification result values:
- `CANCELLED`: Authentication/Account verification could not be performed, `transStatus = U`.
- `FAILED`: Transaction was not authenticated. `transStatus = N`, note: the utilization of exemptions could also result in `transStatus = N`, inspect the `acquirer_exemption` field for more information.
- `FRICTIONLESS`: Attempts processing performed, the transaction was not authenticated, but a proof of attempted authentication/verification is provided. `transStatus = A` and the leading AAV indicator was one of {`kE`, `kF`, `kQ`}.
- `NOT_ATTEMPTED`: A 3-D Secure flow was not applied to this transaction. Leading AAV indicator was one of {`kN`, `kX`} or no AAV was provided for the transaction.
- `REJECTED`: Authentication/Account Verification rejected; `transStatus = R`. Issuer is rejecting authentication/verification and requests that authorization not be attempted.
- `SUCCESS`: Authentication verification successful. `transStatus = Y` and leading AAV indicator for the transaction was one of {`kA`, `kB`, `kC`, `kD`, `kO`, `kP`, `kR`, `kS`}.
Note that the following `transStatus` values are not represented by this field:
- `C`: Challenge Required - `D`: Challenge Required; decoupled authentication confirmed - `I`: Informational only - `S`: Challenge using Secure Payment Confirmation (SPC)
const ( TransactionCardholderAuthenticationVerificationResultCancelled TransactionCardholderAuthenticationVerificationResult = "CANCELLED" TransactionCardholderAuthenticationVerificationResultFailed TransactionCardholderAuthenticationVerificationResult = "FAILED" TransactionCardholderAuthenticationVerificationResultFrictionless TransactionCardholderAuthenticationVerificationResult = "FRICTIONLESS" TransactionCardholderAuthenticationVerificationResultNotAttempted TransactionCardholderAuthenticationVerificationResult = "NOT_ATTEMPTED" TransactionCardholderAuthenticationVerificationResultRejected TransactionCardholderAuthenticationVerificationResult = "REJECTED" TransactionCardholderAuthenticationVerificationResultSuccess TransactionCardholderAuthenticationVerificationResult = "SUCCESS" )
type TransactionEvent ¶ added in v0.5.0
type TransactionEvent struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // Amount of the transaction event (in cents), including any acquirer fees. Amount int64 `json:"amount,required"` // RFC 3339 date and time this event entered the system. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` // `APPROVED` or decline reason. // // Result types: // // - `ACCOUNT_STATE_TRANSACTION_FAIL` - Contact // [support@lithic.com](mailto:support@lithic.com). // - `APPROVED` - Transaction is approved. // - `BANK_CONNECTION_ERROR` - Please reconnect a funding source. // - `BANK_NOT_VERIFIED` - Please confirm the funding source. // - `CARD_CLOSED` - Card state was closed at the time of authorization. // - `CARD_PAUSED` - Card state was paused at the time of authorization. // - `FRAUD_ADVICE` - Transaction declined due to risk. // - `GLOBAL_TRANSACTION_LIMIT` - Platform spend limit exceeded, contact // [support@lithic.com](mailto:support@lithic.com). // - `GLOBAL_WEEKLY_LIMIT` - Platform spend limit exceeded, contact // [support@lithic.com](mailto:support@lithic.com). // - `GLOBAL_MONTHLY_LIMIT` - Platform spend limit exceeded, contact // [support@lithic.com](mailto:support@lithic.com). // - `INACTIVE_ACCOUNT` - Account is inactive. Contact // [support@lithic.com](mailto:support@lithic.com). // - `INCORRECT_PIN` - PIN verification failed. // - `INVALID_CARD_DETAILS` - Incorrect CVV or expiry date. // - `INSUFFICIENT_FUNDS` - Please ensure the funding source is connected and up to // date. // - `MERCHANT_BLACKLIST` - This merchant is disallowed on the platform. // - `SINGLE_USE_RECHARGED` - Single use card attempted multiple times. // - `SWITCH_INOPERATIVE_ADVICE` - Network error, re-attempt the transaction. // - `UNAUTHORIZED_MERCHANT` - Merchant locked card attempted at different // merchant. // - `UNKNOWN_HOST_TIMEOUT` - Network error, re-attempt the transaction. // - `USER_TRANSACTION_LIMIT` - User-set spend limit exceeded. Result TransactionEventsResult `json:"result,required"` // Event types: // // - `AUTHORIZATION` - Authorize a transaction. // - `AUTHORIZATION_ADVICE` - Advice on a transaction. // - `AUTHORIZATION_EXPIRY` - Authorization has expired and reversed by Lithic. // - `AUTHORIZATION_REVERSAL` - Authorization was reversed by the merchant. // - `BALANCE_INQUIRY` - A balance inquiry (typically a $0 authorization) has // occurred on a card. // - `CLEARING` - Transaction is settled. // - `CORRECTION_DEBIT` - Manual transaction correction (Debit). // - `CORRECTION_CREDIT` - Manual transaction correction (Credit). // - `CREDIT_AUTHORIZATION` - A refund or credit authorization from a merchant. // - `CREDIT_AUTHORIZATION_ADVICE` - A credit authorization was approved on your // behalf by the network. // - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit funds without // additional clearing. // - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or // credit funds without additional clearing. // - `RETURN` - A refund has been processed on the transaction. // - `RETURN_REVERSAL` - A refund has been reversed (e.g., when a merchant reverses // an incorrect refund). Type TransactionEventsType `json:"type,required"` JSON transactionEventJSON }
A single card transaction may include multiple events that affect the transaction state and lifecycle.
func (*TransactionEvent) UnmarshalJSON ¶ added in v0.5.0
func (r *TransactionEvent) UnmarshalJSON(data []byte) (err error)
type TransactionEventsResult ¶
type TransactionEventsResult string
`APPROVED` or decline reason.
Result types:
- `ACCOUNT_STATE_TRANSACTION_FAIL` - Contact [support@lithic.com](mailto:support@lithic.com).
- `APPROVED` - Transaction is approved.
- `BANK_CONNECTION_ERROR` - Please reconnect a funding source.
- `BANK_NOT_VERIFIED` - Please confirm the funding source.
- `CARD_CLOSED` - Card state was closed at the time of authorization.
- `CARD_PAUSED` - Card state was paused at the time of authorization.
- `FRAUD_ADVICE` - Transaction declined due to risk.
- `GLOBAL_TRANSACTION_LIMIT` - Platform spend limit exceeded, contact [support@lithic.com](mailto:support@lithic.com).
- `GLOBAL_WEEKLY_LIMIT` - Platform spend limit exceeded, contact [support@lithic.com](mailto:support@lithic.com).
- `GLOBAL_MONTHLY_LIMIT` - Platform spend limit exceeded, contact [support@lithic.com](mailto:support@lithic.com).
- `INACTIVE_ACCOUNT` - Account is inactive. Contact [support@lithic.com](mailto:support@lithic.com).
- `INCORRECT_PIN` - PIN verification failed.
- `INVALID_CARD_DETAILS` - Incorrect CVV or expiry date.
- `INSUFFICIENT_FUNDS` - Please ensure the funding source is connected and up to date.
- `MERCHANT_BLACKLIST` - This merchant is disallowed on the platform.
- `SINGLE_USE_RECHARGED` - Single use card attempted multiple times.
- `SWITCH_INOPERATIVE_ADVICE` - Network error, re-attempt the transaction.
- `UNAUTHORIZED_MERCHANT` - Merchant locked card attempted at different merchant.
- `UNKNOWN_HOST_TIMEOUT` - Network error, re-attempt the transaction.
- `USER_TRANSACTION_LIMIT` - User-set spend limit exceeded.
const ( TransactionEventsResultAccountStateTransaction TransactionEventsResult = "ACCOUNT_STATE_TRANSACTION" TransactionEventsResultApproved TransactionEventsResult = "APPROVED" TransactionEventsResultBankConnectionError TransactionEventsResult = "BANK_CONNECTION_ERROR" TransactionEventsResultBankNotVerified TransactionEventsResult = "BANK_NOT_VERIFIED" TransactionEventsResultCardClosed TransactionEventsResult = "CARD_CLOSED" TransactionEventsResultCardPaused TransactionEventsResult = "CARD_PAUSED" TransactionEventsResultFraudAdvice TransactionEventsResult = "FRAUD_ADVICE" TransactionEventsResultGlobalTransactionLimit TransactionEventsResult = "GLOBAL_TRANSACTION_LIMIT" TransactionEventsResultGlobalWeeklyLimit TransactionEventsResult = "GLOBAL_WEEKLY_LIMIT" TransactionEventsResultGlobalMonthlyLimit TransactionEventsResult = "GLOBAL_MONTHLY_LIMIT" TransactionEventsResultInactiveAccount TransactionEventsResult = "INACTIVE_ACCOUNT" TransactionEventsResultIncorrectPin TransactionEventsResult = "INCORRECT_PIN" TransactionEventsResultInvalidCardDetails TransactionEventsResult = "INVALID_CARD_DETAILS" TransactionEventsResultInsufficientFunds TransactionEventsResult = "INSUFFICIENT_FUNDS" TransactionEventsResultMerchantBlacklist TransactionEventsResult = "MERCHANT_BLACKLIST" TransactionEventsResultSingleUseRecharged TransactionEventsResult = "SINGLE_USE_RECHARGED" TransactionEventsResultSwitchInoperativeAdvice TransactionEventsResult = "SWITCH_INOPERATIVE_ADVICE" TransactionEventsResultUnknownHostTimeout TransactionEventsResult = "UNKNOWN_HOST_TIMEOUT" TransactionEventsResultUserTransactionLimit TransactionEventsResult = "USER_TRANSACTION_LIMIT" )
type TransactionEventsType ¶
type TransactionEventsType string
Event types:
- `AUTHORIZATION` - Authorize a transaction.
- `AUTHORIZATION_ADVICE` - Advice on a transaction.
- `AUTHORIZATION_EXPIRY` - Authorization has expired and reversed by Lithic.
- `AUTHORIZATION_REVERSAL` - Authorization was reversed by the merchant.
- `BALANCE_INQUIRY` - A balance inquiry (typically a $0 authorization) has occurred on a card.
- `CLEARING` - Transaction is settled.
- `CORRECTION_DEBIT` - Manual transaction correction (Debit).
- `CORRECTION_CREDIT` - Manual transaction correction (Credit).
- `CREDIT_AUTHORIZATION` - A refund or credit authorization from a merchant.
- `CREDIT_AUTHORIZATION_ADVICE` - A credit authorization was approved on your behalf by the network.
- `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit funds without additional clearing.
- `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit funds without additional clearing.
- `RETURN` - A refund has been processed on the transaction.
- `RETURN_REVERSAL` - A refund has been reversed (e.g., when a merchant reverses an incorrect refund).
const ( TransactionEventsTypeAuthorization TransactionEventsType = "AUTHORIZATION" TransactionEventsTypeAuthorizationAdvice TransactionEventsType = "AUTHORIZATION_ADVICE" TransactionEventsTypeAuthorizationExpiry TransactionEventsType = "AUTHORIZATION_EXPIRY" TransactionEventsTypeAuthorizationReversal TransactionEventsType = "AUTHORIZATION_REVERSAL" TransactionEventsTypeBalanceInquiry TransactionEventsType = "BALANCE_INQUIRY" TransactionEventsTypeClearing TransactionEventsType = "CLEARING" TransactionEventsTypeCorrectionDebit TransactionEventsType = "CORRECTION_DEBIT" TransactionEventsTypeCorrectionCredit TransactionEventsType = "CORRECTION_CREDIT" TransactionEventsTypeCreditAuthorization TransactionEventsType = "CREDIT_AUTHORIZATION" TransactionEventsTypeCreditAuthorizationAdvice TransactionEventsType = "CREDIT_AUTHORIZATION_ADVICE" TransactionEventsTypeFinancialAuthorization TransactionEventsType = "FINANCIAL_AUTHORIZATION" TransactionEventsTypeFinancialCreditAuthorization TransactionEventsType = "FINANCIAL_CREDIT_AUTHORIZATION" TransactionEventsTypeReturn TransactionEventsType = "RETURN" TransactionEventsTypeReturnReversal TransactionEventsType = "RETURN_REVERSAL" TransactionEventsTypeVoid TransactionEventsType = "VOID" )
type TransactionListParams ¶
type TransactionListParams struct { // Filters for transactions associated with a specific account. AccountToken param.Field[string] `query:"account_token" format:"uuid"` // Date string in RFC 3339 format. Only entries created after the specified date // will be included. UTC time zone. Begin param.Field[time.Time] `query:"begin" format:"date-time"` // Filters for transactions associated with a specific card. CardToken param.Field[string] `query:"card_token" format:"uuid"` // Date string in RFC 3339 format. Only entries created before the specified date // will be included. UTC time zone. End param.Field[time.Time] `query:"end" format:"date-time"` // Page (for pagination). Page param.Field[int64] `query:"page"` // Page size (for pagination). PageSize param.Field[int64] `query:"page_size"` // Filters for transactions using transaction result field. Can filter by // `APPROVED`, and `DECLINED`. Result param.Field[TransactionListParamsResult] `query:"result"` }
func (TransactionListParams) URLQuery ¶
func (r TransactionListParams) URLQuery() (v url.Values)
URLQuery serializes TransactionListParams's query parameters as `url.Values`.
type TransactionListParamsResult ¶
type TransactionListParamsResult string
Filters for transactions using transaction result field. Can filter by `APPROVED`, and `DECLINED`.
const ( TransactionListParamsResultApproved TransactionListParamsResult = "APPROVED" TransactionListParamsResultDeclined TransactionListParamsResult = "DECLINED" )
type TransactionMerchant ¶
type TransactionMerchant struct { // Unique identifier to identify the payment card acceptor. AcceptorID string `json:"acceptor_id"` // City of card acceptor. City string `json:"city"` // Uppercase country of card acceptor (see ISO 8583 specs). Country string `json:"country"` // Short description of card acceptor. Descriptor string `json:"descriptor"` // Merchant category code (MCC). A four-digit number listed in ISO 18245. An MCC is // used to classify a business by the types of goods or services it provides. Mcc string `json:"mcc"` // Geographic state of card acceptor (see ISO 8583 specs). State string `json:"state"` JSON transactionMerchantJSON }
func (*TransactionMerchant) UnmarshalJSON ¶
func (r *TransactionMerchant) UnmarshalJSON(data []byte) (err error)
type TransactionNetwork ¶
type TransactionNetwork string
Card network of the authorization. Can be `INTERLINK`, `MAESTRO`, `MASTERCARD`, `VISA`, or `UNKNOWN`. Value is `UNKNOWN` when Lithic cannot determine the network code from the upstream provider.
const ( TransactionNetworkInterlink TransactionNetwork = "INTERLINK" TransactionNetworkMaestro TransactionNetwork = "MAESTRO" TransactionNetworkMastercard TransactionNetwork = "MASTERCARD" TransactionNetworkVisa TransactionNetwork = "VISA" TransactionNetworkUnknown TransactionNetwork = "UNKNOWN" )
type TransactionResult ¶
type TransactionResult string
`APPROVED` or decline reason. See Event result types
const ( TransactionResultAccountStateTransaction TransactionResult = "ACCOUNT_STATE_TRANSACTION" TransactionResultApproved TransactionResult = "APPROVED" TransactionResultBankConnectionError TransactionResult = "BANK_CONNECTION_ERROR" TransactionResultBankNotVerified TransactionResult = "BANK_NOT_VERIFIED" TransactionResultCardClosed TransactionResult = "CARD_CLOSED" TransactionResultCardPaused TransactionResult = "CARD_PAUSED" TransactionResultFraudAdvice TransactionResult = "FRAUD_ADVICE" TransactionResultGlobalTransactionLimit TransactionResult = "GLOBAL_TRANSACTION_LIMIT" TransactionResultGlobalWeeklyLimit TransactionResult = "GLOBAL_WEEKLY_LIMIT" TransactionResultGlobalMonthlyLimit TransactionResult = "GLOBAL_MONTHLY_LIMIT" TransactionResultInactiveAccount TransactionResult = "INACTIVE_ACCOUNT" TransactionResultIncorrectPin TransactionResult = "INCORRECT_PIN" TransactionResultInvalidCardDetails TransactionResult = "INVALID_CARD_DETAILS" TransactionResultInsufficientFunds TransactionResult = "INSUFFICIENT_FUNDS" TransactionResultMerchantBlacklist TransactionResult = "MERCHANT_BLACKLIST" TransactionResultSingleUseRecharged TransactionResult = "SINGLE_USE_RECHARGED" TransactionResultSwitchInoperativeAdvice TransactionResult = "SWITCH_INOPERATIVE_ADVICE" TransactionResultUnknownHostTimeout TransactionResult = "UNKNOWN_HOST_TIMEOUT" TransactionResultUserTransactionLimit TransactionResult = "USER_TRANSACTION_LIMIT" )
type TransactionService ¶
type TransactionService struct {
Options []option.RequestOption
}
TransactionService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransactionService method instead.
func NewTransactionService ¶
func NewTransactionService(opts ...option.RequestOption) (r *TransactionService)
NewTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransactionService) Get ¶
func (r *TransactionService) Get(ctx context.Context, transactionToken string, opts ...option.RequestOption) (res *Transaction, err error)
Get specific transaction.
func (*TransactionService) List ¶
func (r *TransactionService) List(ctx context.Context, query TransactionListParams, opts ...option.RequestOption) (res *shared.Page[Transaction], err error)
List transactions.
func (*TransactionService) ListAutoPaging ¶
func (r *TransactionService) ListAutoPaging(ctx context.Context, query TransactionListParams, opts ...option.RequestOption) *shared.PageAutoPager[Transaction]
List transactions.
func (*TransactionService) SimulateAuthorization ¶
func (r *TransactionService) SimulateAuthorization(ctx context.Context, body TransactionSimulateAuthorizationParams, opts ...option.RequestOption) (res *TransactionSimulateAuthorizationResponse, err error)
Simulates an authorization request from the payment network as if it came from a merchant acquirer. If you're configured for ASA, simulating auths requires your ASA client to be set up properly (respond with a valid JSON to the ASA request). For users that are not configured for ASA, a daily transaction limit of $5000 USD is applied by default. This limit can be modified via the [update account](https://docs.lithic.com/reference/patchaccountbytoken) endpoint.
func (*TransactionService) SimulateAuthorizationAdvice ¶
func (r *TransactionService) SimulateAuthorizationAdvice(ctx context.Context, body TransactionSimulateAuthorizationAdviceParams, opts ...option.RequestOption) (res *TransactionSimulateAuthorizationAdviceResponse, err error)
Simulates an authorization advice request from the payment network as if it came from a merchant acquirer. An authorization advice request changes the amount of the transaction.
func (*TransactionService) SimulateClearing ¶
func (r *TransactionService) SimulateClearing(ctx context.Context, body TransactionSimulateClearingParams, opts ...option.RequestOption) (res *TransactionSimulateClearingResponse, err error)
Clears an existing authorization. After this event, the transaction is no longer pending.
If no `amount` is supplied to this endpoint, the amount of the transaction will be captured. Any transaction that has any amount completed at all do not have access to this behavior.
func (*TransactionService) SimulateCreditAuthorization ¶
func (r *TransactionService) SimulateCreditAuthorization(ctx context.Context, body TransactionSimulateCreditAuthorizationParams, opts ...option.RequestOption) (res *TransactionSimulateCreditAuthorizationResponse, err error)
Simulates a credit authorization advice message from the payment network. This message indicates that a credit authorization was approved on your behalf by the network.
func (*TransactionService) SimulateReturn ¶
func (r *TransactionService) SimulateReturn(ctx context.Context, body TransactionSimulateReturnParams, opts ...option.RequestOption) (res *TransactionSimulateReturnResponse, err error)
Returns (aka refunds) an amount back to a card. Returns are cleared immediately and do not spend time in a `PENDING` state.
func (*TransactionService) SimulateReturnReversal ¶
func (r *TransactionService) SimulateReturnReversal(ctx context.Context, body TransactionSimulateReturnReversalParams, opts ...option.RequestOption) (res *TransactionSimulateReturnReversalResponse, err error)
Voids a settled credit transaction – i.e., a transaction with a negative amount and `SETTLED` status. These can be credit authorizations that have already cleared or financial credit authorizations.
func (*TransactionService) SimulateVoid ¶
func (r *TransactionService) SimulateVoid(ctx context.Context, body TransactionSimulateVoidParams, opts ...option.RequestOption) (res *TransactionSimulateVoidResponse, err error)
Voids an existing, uncleared (aka pending) authorization. If amount is not sent the full amount will be voided. Cannot be used on partially completed transactions, but can be used on partially voided transactions. _Note that simulating an authorization expiry on credit authorizations or credit authorization advice is not currently supported but will be added soon._
type TransactionSimulateAuthorizationAdviceParams ¶
type TransactionSimulateAuthorizationAdviceParams struct { // The transaction token returned from the /v1/simulate/authorize response. Token param.Field[string] `json:"token,required" format:"uuid"` // Amount (in cents) to authorize. This amount will override the transaction's // amount that was originally set by /v1/simulate/authorize. Amount param.Field[int64] `json:"amount,required"` }
func (TransactionSimulateAuthorizationAdviceParams) MarshalJSON ¶
func (r TransactionSimulateAuthorizationAdviceParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateAuthorizationAdviceResponse ¶
type TransactionSimulateAuthorizationAdviceResponse struct { // A unique token to reference this transaction. Token string `json:"token" format:"uuid"` // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateAuthorizationAdviceResponseJSON }
func (*TransactionSimulateAuthorizationAdviceResponse) UnmarshalJSON ¶
func (r *TransactionSimulateAuthorizationAdviceResponse) UnmarshalJSON(data []byte) (err error)
type TransactionSimulateAuthorizationParams ¶
type TransactionSimulateAuthorizationParams struct { // Amount (in cents) to authorize. For credit authorizations and financial credit // authorizations, any value entered will be converted into a negative amount in // the simulated transaction. For example, entering 100 in this field will appear // as a -100 amount in the transaction. For balance inquiries, this field must be // set to 0. Amount param.Field[int64] `json:"amount,required"` // Merchant descriptor. Descriptor param.Field[string] `json:"descriptor,required"` // Sixteen digit card number. Pan param.Field[string] `json:"pan,required"` // Merchant category code for the transaction to be simulated. A four-digit number // listed in ISO 18245. Supported merchant category codes can be found // [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs). Mcc param.Field[string] `json:"mcc"` // Unique identifier to identify the payment card acceptor. MerchantAcceptorID param.Field[string] `json:"merchant_acceptor_id"` // Amount of the transaction to be simulated in currency specified in // merchant_currency, including any acquirer fees. MerchantAmount param.Field[int64] `json:"merchant_amount"` // 3-digit alphabetic ISO 4217 currency code. MerchantCurrency param.Field[string] `json:"merchant_currency"` // Set to true if the terminal is capable of partial approval otherwise false. // Partial approval is when part of a transaction is approved and another payment // must be used for the remainder. PartialApprovalCapable param.Field[bool] `json:"partial_approval_capable"` // Type of event to simulate. // // - `AUTHORIZATION` is a dual message purchase authorization, meaning a subsequent // clearing step is required to settle the transaction. // - `BALANCE_INQUIRY` is a $0 authorization that includes a request for the // balance held on the card, and is most typically seen when a cardholder // requests to view a card's balance at an ATM. // - `CREDIT_AUTHORIZATION` is a dual message request from a merchant to authorize // a refund or credit, meaning a subsequent clearing step is required to settle // the transaction. // - `FINANCIAL_AUTHORIZATION` is a single message request from a merchant to debit // funds immediately (such as an ATM withdrawal), and no subsequent clearing is // required to settle the transaction. // - `FINANCIAL_CREDIT_AUTHORIZATION` is a single message request from a merchant // to credit funds immediately, and no subsequent clearing is required to settle // the transaction. Status param.Field[TransactionSimulateAuthorizationParamsStatus] `json:"status"` }
func (TransactionSimulateAuthorizationParams) MarshalJSON ¶
func (r TransactionSimulateAuthorizationParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateAuthorizationParamsStatus ¶
type TransactionSimulateAuthorizationParamsStatus string
Type of event to simulate.
- `AUTHORIZATION` is a dual message purchase authorization, meaning a subsequent clearing step is required to settle the transaction.
- `BALANCE_INQUIRY` is a $0 authorization that includes a request for the balance held on the card, and is most typically seen when a cardholder requests to view a card's balance at an ATM.
- `CREDIT_AUTHORIZATION` is a dual message request from a merchant to authorize a refund or credit, meaning a subsequent clearing step is required to settle the transaction.
- `FINANCIAL_AUTHORIZATION` is a single message request from a merchant to debit funds immediately (such as an ATM withdrawal), and no subsequent clearing is required to settle the transaction.
- `FINANCIAL_CREDIT_AUTHORIZATION` is a single message request from a merchant to credit funds immediately, and no subsequent clearing is required to settle the transaction.
const ( TransactionSimulateAuthorizationParamsStatusAuthorization TransactionSimulateAuthorizationParamsStatus = "AUTHORIZATION" TransactionSimulateAuthorizationParamsStatusBalanceInquiry TransactionSimulateAuthorizationParamsStatus = "BALANCE_INQUIRY" TransactionSimulateAuthorizationParamsStatusCreditAuthorization TransactionSimulateAuthorizationParamsStatus = "CREDIT_AUTHORIZATION" TransactionSimulateAuthorizationParamsStatusFinancialAuthorization TransactionSimulateAuthorizationParamsStatus = "FINANCIAL_AUTHORIZATION" TransactionSimulateAuthorizationParamsStatusFinancialCreditAuthorization TransactionSimulateAuthorizationParamsStatus = "FINANCIAL_CREDIT_AUTHORIZATION" )
type TransactionSimulateAuthorizationResponse ¶
type TransactionSimulateAuthorizationResponse struct { // A unique token to reference this transaction with later calls to void or clear // the authorization. Token string `json:"token" format:"uuid"` // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateAuthorizationResponseJSON }
func (*TransactionSimulateAuthorizationResponse) UnmarshalJSON ¶
func (r *TransactionSimulateAuthorizationResponse) UnmarshalJSON(data []byte) (err error)
type TransactionSimulateClearingParams ¶
type TransactionSimulateClearingParams struct { // The transaction token returned from the /v1/simulate/authorize response. Token param.Field[string] `json:"token,required" format:"uuid"` // Amount (in cents) to complete. Typically this will match the original // authorization, but may be more or less. // // If no amount is supplied to this endpoint, the amount of the transaction will be // captured. Any transaction that has any amount completed at all do not have // access to this behavior. Amount param.Field[int64] `json:"amount"` }
func (TransactionSimulateClearingParams) MarshalJSON ¶
func (r TransactionSimulateClearingParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateClearingResponse ¶
type TransactionSimulateClearingResponse struct { // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateClearingResponseJSON }
func (*TransactionSimulateClearingResponse) UnmarshalJSON ¶
func (r *TransactionSimulateClearingResponse) UnmarshalJSON(data []byte) (err error)
type TransactionSimulateCreditAuthorizationParams ¶
type TransactionSimulateCreditAuthorizationParams struct { // Amount (in cents). Any value entered will be converted into a negative amount in // the simulated transaction. For example, entering 100 in this field will appear // as a -100 amount in the transaction. Amount param.Field[int64] `json:"amount,required"` // Merchant descriptor. Descriptor param.Field[string] `json:"descriptor,required"` // Sixteen digit card number. Pan param.Field[string] `json:"pan,required"` // Merchant category code for the transaction to be simulated. A four-digit number // listed in ISO 18245. Supported merchant category codes can be found // [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs). Mcc param.Field[string] `json:"mcc"` // Unique identifier to identify the payment card acceptor. MerchantAcceptorID param.Field[string] `json:"merchant_acceptor_id"` }
func (TransactionSimulateCreditAuthorizationParams) MarshalJSON ¶
func (r TransactionSimulateCreditAuthorizationParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateCreditAuthorizationResponse ¶
type TransactionSimulateCreditAuthorizationResponse struct { // A unique token to reference this transaction. Token string `json:"token" format:"uuid"` // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateCreditAuthorizationResponseJSON }
func (*TransactionSimulateCreditAuthorizationResponse) UnmarshalJSON ¶
func (r *TransactionSimulateCreditAuthorizationResponse) UnmarshalJSON(data []byte) (err error)
type TransactionSimulateReturnParams ¶
type TransactionSimulateReturnParams struct { // Amount (in cents) to authorize. Amount param.Field[int64] `json:"amount,required"` // Merchant descriptor. Descriptor param.Field[string] `json:"descriptor,required"` // Sixteen digit card number. Pan param.Field[string] `json:"pan,required"` }
func (TransactionSimulateReturnParams) MarshalJSON ¶
func (r TransactionSimulateReturnParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateReturnResponse ¶
type TransactionSimulateReturnResponse struct { // A unique token to reference this transaction. Token string `json:"token" format:"uuid"` // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateReturnResponseJSON }
func (*TransactionSimulateReturnResponse) UnmarshalJSON ¶
func (r *TransactionSimulateReturnResponse) UnmarshalJSON(data []byte) (err error)
type TransactionSimulateReturnReversalParams ¶
type TransactionSimulateReturnReversalParams struct { // The transaction token returned from the /v1/simulate/authorize response. Token param.Field[string] `json:"token,required" format:"uuid"` }
func (TransactionSimulateReturnReversalParams) MarshalJSON ¶
func (r TransactionSimulateReturnReversalParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateReturnReversalResponse ¶
type TransactionSimulateReturnReversalResponse struct { // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateReturnReversalResponseJSON }
func (*TransactionSimulateReturnReversalResponse) UnmarshalJSON ¶
func (r *TransactionSimulateReturnReversalResponse) UnmarshalJSON(data []byte) (err error)
type TransactionSimulateVoidParams ¶
type TransactionSimulateVoidParams struct { // The transaction token returned from the /v1/simulate/authorize response. Token param.Field[string] `json:"token,required" format:"uuid"` // Amount (in cents) to void. Typically this will match the original authorization, // but may be less. Amount param.Field[int64] `json:"amount"` // Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`. // // - `AUTHORIZATION_EXPIRY` indicates authorization has expired and been reversed // by Lithic. // - `AUTHORIZATION_REVERSAL` indicates authorization was reversed by the merchant. Type param.Field[TransactionSimulateVoidParamsType] `json:"type"` }
func (TransactionSimulateVoidParams) MarshalJSON ¶
func (r TransactionSimulateVoidParams) MarshalJSON() (data []byte, err error)
type TransactionSimulateVoidParamsType ¶
type TransactionSimulateVoidParamsType string
Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`.
- `AUTHORIZATION_EXPIRY` indicates authorization has expired and been reversed by Lithic.
- `AUTHORIZATION_REVERSAL` indicates authorization was reversed by the merchant.
const ( TransactionSimulateVoidParamsTypeAuthorizationExpiry TransactionSimulateVoidParamsType = "AUTHORIZATION_EXPIRY" TransactionSimulateVoidParamsTypeAuthorizationReversal TransactionSimulateVoidParamsType = "AUTHORIZATION_REVERSAL" )
type TransactionSimulateVoidResponse ¶
type TransactionSimulateVoidResponse struct { // Debugging request ID to share with Lithic Support team. DebuggingRequestID string `json:"debugging_request_id" format:"uuid"` JSON transactionSimulateVoidResponseJSON }
func (*TransactionSimulateVoidResponse) UnmarshalJSON ¶
func (r *TransactionSimulateVoidResponse) UnmarshalJSON(data []byte) (err error)
type TransactionStatus ¶
type TransactionStatus string
Status types:
- `DECLINED` - The transaction was declined.
- `EXPIRED` - Lithic reversed the authorization as it has passed its expiration time.
- `PENDING` - Authorization is pending completion from the merchant.
- `SETTLED` - The transaction is complete.
- `VOIDED` - The merchant has voided the previously pending authorization.
const ( TransactionStatusBounced TransactionStatus = "BOUNCED" TransactionStatusDeclined TransactionStatus = "DECLINED" TransactionStatusExpired TransactionStatus = "EXPIRED" TransactionStatusPending TransactionStatus = "PENDING" TransactionStatusSettled TransactionStatus = "SETTLED" TransactionStatusSettling TransactionStatus = "SETTLING" TransactionStatusVoided TransactionStatus = "VOIDED" )
type Transfer ¶
type Transfer struct { // Globally unique identifier for the transfer event. Token string `json:"token" format:"uuid"` // Status types: // // - `TRANSFER` - Internal transfer of funds between financial accounts in your // program. Category TransferCategory `json:"category"` // Date and time when the transfer occurred. UTC time zone. Created time.Time `json:"created" format:"date-time"` // 3-digit alphabetic ISO 4217 code for the settling currency of the transaction. Currency string `json:"currency"` // A string that provides a description of the transfer; may be useful to display // to users. Descriptor string `json:"descriptor"` // A list of all financial events that have modified this trasnfer. Events []TransferEvent `json:"events"` // The updated balance of the sending financial account. FromBalance []Balance `json:"from_balance"` // Pending amount of the transaction in the currency's smallest unit (e.g., cents), // including any acquirer fees. The value of this field will go to zero over time // once the financial transaction is settled. PendingAmount int64 `json:"pending_amount"` // APPROVED transactions were successful while DECLINED transactions were declined // by user, Lithic, or the network. Result TransferResult `json:"result"` // Amount of the transaction that has been settled in the currency's smallest unit // (e.g., cents). SettledAmount int64 `json:"settled_amount"` // Status types: // // - `DECLINED` - The transfer was declined. // - `EXPIRED` - The transfer was held in pending for too long and expired. // - `PENDING` - The transfer is pending release from a hold. // - `SETTLED` - The transfer is completed. // - `VOIDED` - The transfer was reversed before it settled. Status TransferStatus `json:"status"` // The updated balance of the receiving financial account. ToBalance []Balance `json:"to_balance"` // Date and time when the financial transaction was last updated. UTC time zone. Updated time.Time `json:"updated" format:"date-time"` JSON transferJSON }
func (*Transfer) UnmarshalJSON ¶
type TransferCategory ¶
type TransferCategory string
Status types:
- `TRANSFER` - Internal transfer of funds between financial accounts in your program.
const (
TransferCategoryTransfer TransferCategory = "TRANSFER"
)
type TransferEvent ¶ added in v0.5.0
type TransferEvent struct { // Globally unique identifier. Token string `json:"token" format:"uuid"` // Amount of the financial event that has been settled in the currency's smallest // unit (e.g., cents). Amount int64 `json:"amount"` // Date and time when the financial event occurred. UTC time zone. Created time.Time `json:"created" format:"date-time"` // APPROVED financial events were successful while DECLINED financial events were // declined by user, Lithic, or the network. Result TransferEventsResult `json:"result"` // Event types: // // - `ACH_INSUFFICIENT_FUNDS` - Attempted ACH origination declined due to // insufficient balance. // - `ACH_ORIGINATION_PENDING` - ACH origination pending release from an ACH hold. // - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to // available balance. // - `ACH_RECEIPT_PENDING` - ACH receipt pending release from an ACH holder. // - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available // balance. // - `ACH_RETURN` - ACH origination returned by the Receiving Depository Financial // Institution. // - `AUTHORIZATION` - Authorize a card transaction. // - `AUTHORIZATION_ADVICE` - Advice on a card transaction. // - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by // Lithic. // - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. // - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has // occurred on a card. // - `CLEARING` - Card Transaction is settled. // - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). // - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). // - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a // merchant. // - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on // your behalf by the network. // - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds // without additional clearing. // - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or // credit card funds without additional clearing. // - `RETURN` - A card refund has been processed on the transaction. // - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant // reverses an incorrect refund). // - `TRANSFER` - Successful internal transfer of funds between financial accounts. // - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to // insufficient balance of the sender. Type TransferEventsType `json:"type"` JSON transferEventJSON }
func (*TransferEvent) UnmarshalJSON ¶ added in v0.5.0
func (r *TransferEvent) UnmarshalJSON(data []byte) (err error)
type TransferEventsResult ¶
type TransferEventsResult string
APPROVED financial events were successful while DECLINED financial events were declined by user, Lithic, or the network.
const ( TransferEventsResultApproved TransferEventsResult = "APPROVED" TransferEventsResultDeclined TransferEventsResult = "DECLINED" )
type TransferEventsType ¶
type TransferEventsType string
Event types:
- `ACH_INSUFFICIENT_FUNDS` - Attempted ACH origination declined due to insufficient balance.
- `ACH_ORIGINATION_PENDING` - ACH origination pending release from an ACH hold.
- `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance.
- `ACH_RECEIPT_PENDING` - ACH receipt pending release from an ACH holder.
- `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance.
- `ACH_RETURN` - ACH origination returned by the Receiving Depository Financial Institution.
- `AUTHORIZATION` - Authorize a card transaction.
- `AUTHORIZATION_ADVICE` - Advice on a card transaction.
- `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic.
- `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant.
- `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on a card.
- `CLEARING` - Card Transaction is settled.
- `CORRECTION_DEBIT` - Manual card transaction correction (Debit).
- `CORRECTION_CREDIT` - Manual card transaction correction (Credit).
- `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant.
- `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf by the network.
- `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without additional clearing.
- `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card funds without additional clearing.
- `RETURN` - A card refund has been processed on the transaction.
- `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an incorrect refund).
- `TRANSFER` - Successful internal transfer of funds between financial accounts.
- `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient balance of the sender.
const ( TransferEventsTypeACHInsufficientFunds TransferEventsType = "ACH_INSUFFICIENT_FUNDS" TransferEventsTypeACHOriginationPending TransferEventsType = "ACH_ORIGINATION_PENDING" TransferEventsTypeACHOriginationReleased TransferEventsType = "ACH_ORIGINATION_RELEASED" TransferEventsTypeACHReceiptPending TransferEventsType = "ACH_RECEIPT_PENDING" TransferEventsTypeACHReceiptReleased TransferEventsType = "ACH_RECEIPT_RELEASED" TransferEventsTypeACHReturn TransferEventsType = "ACH_RETURN" TransferEventsTypeAuthorization TransferEventsType = "AUTHORIZATION" TransferEventsTypeAuthorizationAdvice TransferEventsType = "AUTHORIZATION_ADVICE" TransferEventsTypeAuthorizationExpiry TransferEventsType = "AUTHORIZATION_EXPIRY" TransferEventsTypeAuthorizationReversal TransferEventsType = "AUTHORIZATION_REVERSAL" TransferEventsTypeBalanceInquiry TransferEventsType = "BALANCE_INQUIRY" TransferEventsTypeClearing TransferEventsType = "CLEARING" TransferEventsTypeCorrectionDebit TransferEventsType = "CORRECTION_DEBIT" TransferEventsTypeCorrectionCredit TransferEventsType = "CORRECTION_CREDIT" TransferEventsTypeCreditAuthorization TransferEventsType = "CREDIT_AUTHORIZATION" TransferEventsTypeCreditAuthorizationAdvice TransferEventsType = "CREDIT_AUTHORIZATION_ADVICE" TransferEventsTypeFinancialAuthorization TransferEventsType = "FINANCIAL_AUTHORIZATION" TransferEventsTypeFinancialCreditAuthorization TransferEventsType = "FINANCIAL_CREDIT_AUTHORIZATION" TransferEventsTypeReturn TransferEventsType = "RETURN" TransferEventsTypeReturnReversal TransferEventsType = "RETURN_REVERSAL" TransferEventsTypeTransfer TransferEventsType = "TRANSFER" TransferEventsTypeTransferInsufficientFunds TransferEventsType = "TRANSFER_INSUFFICIENT_FUNDS" )
type TransferNewParams ¶
type TransferNewParams struct { // Amount to be transferred in the currency’s smallest unit (e.g., cents for USD). // This should always be a positive value. Amount param.Field[int64] `json:"amount,required"` // Financial Account From param.Field[FinancialAccountParam] `json:"from,required"` // Financial Account To param.Field[FinancialAccountParam] `json:"to,required"` // Optional descriptor for the transfer. Memo param.Field[string] `json:"memo"` // Customer-provided transaction_token that will serve as an idempotency token. TransactionToken param.Field[string] `json:"transaction_token" format:"uuid"` }
func (TransferNewParams) MarshalJSON ¶
func (r TransferNewParams) MarshalJSON() (data []byte, err error)
type TransferNewResponse ¶ added in v0.5.0
type TransferNewResponse struct { Data Transfer `json:"data"` JSON transferNewResponseJSON }
func (*TransferNewResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *TransferNewResponse) UnmarshalJSON(data []byte) (err error)
type TransferResult ¶
type TransferResult string
APPROVED transactions were successful while DECLINED transactions were declined by user, Lithic, or the network.
const ( TransferResultApproved TransferResult = "APPROVED" TransferResultDeclined TransferResult = "DECLINED" )
type TransferService ¶
type TransferService struct {
Options []option.RequestOption
}
TransferService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTransferService method instead.
func NewTransferService ¶
func NewTransferService(opts ...option.RequestOption) (r *TransferService)
NewTransferService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TransferService) New ¶
func (r *TransferService) New(ctx context.Context, body TransferNewParams, opts ...option.RequestOption) (res *TransferNewResponse, err error)
Transfer funds between two financial accounts
type TransferStatus ¶
type TransferStatus string
Status types:
- `DECLINED` - The transfer was declined. - `EXPIRED` - The transfer was held in pending for too long and expired. - `PENDING` - The transfer is pending release from a hold. - `SETTLED` - The transfer is completed. - `VOIDED` - The transfer was reversed before it settled.
const ( TransferStatusDeclined TransferStatus = "DECLINED" TransferStatusExpired TransferStatus = "EXPIRED" TransferStatusPending TransferStatus = "PENDING" TransferStatusSettled TransferStatus = "SETTLED" TransferStatusVoided TransferStatus = "VOIDED" )
type WebhookService ¶
type WebhookService struct {
Options []option.RequestOption
}
WebhookService contains methods and other services that help with interacting with the lithic API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookService method instead.
func NewWebhookService ¶
func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)
NewWebhookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WebhookService) VerifySignature ¶
func (r *WebhookService) VerifySignature(payload []byte, headers http.Header, secret string, now time.Time) (err error)
Validates whether or not the webhook payload was sent by Lithic.
An error will be raised if the webhook payload was not sent by Lithic.
type WebhookVerifySignatureParams ¶ added in v0.3.1
type WebhookVerifySignatureParams struct { }
Source Files ¶
- account.go
- accountholder.go
- aggregatebalance.go
- aliases.go
- authrule.go
- authstreamenrollment.go
- balance.go
- card.go
- client.go
- dispute.go
- event.go
- eventsubscription.go
- field.go
- financialaccount.go
- financialaccountbalance.go
- financialtransaction.go
- lithic.go
- responderendpoint.go
- tokenizationdecisioning.go
- transaction.go
- transfer.go
- webhook.go