moov

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const ENV_MOOV_HOST = "MOOV_HOST"
View Source
const ENV_MOOV_PUBLIC_KEY = "MOOV_PUBLIC_KEY"
View Source
const ENV_MOOV_SECRET_KEY = "MOOV_SECRET_KEY" // #nosec G101

Variables

View Source
var (
	StatusCompleted = callStatus("completed", false) // Completely fully
	StatusStarted   = callStatus("started", true)    // Returned as async. This can be due to timing out, or started as async

	StatusBadRequest       = callStatus("bad_request", false)       // bad request, body, headers, etc...
	StatusStateConflict    = callStatus("state_conflict", false)    // violates some stateful constraint.
	StatusFailedValidation = callStatus("failed_validation", false) // request structure is valid but failed validation.
	StatusNotFound         = callStatus("not_found", false)         // did not find the specific item.

	StatusUnauthenticated = callStatus("unauthenticated", false) // Token or credentials don't exist or are expired.
	StatusUnauthorized    = callStatus("unauthorized", false)    // Not allowed to see or invalid method or url

	StatusRateLimited = callStatus("rate_limited", true) // Rate limited and able to be retried after a little bit

	StatusServerError = callStatus("server_error", true) // Unknown server issue...
)
View Source
var (
	ErrCredentialsNotSet            = errors.New("api credentials not set")
	ErrAccountNotFound              = errors.New("no account with the specified accountID was found")
	ErrAlreadyExists                = errors.New("resource already exists")
	ErrMicroDepositAmountsIncorrect = errors.New("the amounts provided are incorrect or the bank account is in an unexpected state")
	ErrInstantVerificationFailed    = errors.New("attempted verification failed")
	ErrXIdempotencyKey              = errors.New("attempted to create a transfer using a duplicate X-Idempotency-Key header")
)
View Source
var Scopes scopeList = scopeList{}

Setup namespacing so when you use these scopes its `moov.Scopes.AccountsRead()`

Functions

func AcceptJson

func AcceptJson() callArg

func CompletedListOrError

func CompletedListOrError[A interface{}](resp CallResponse) ([]A, error)

Helper for a common pattern of successful API calls returning a body with a slice of objects or an error

func CompletedNilOrError

func CompletedNilOrError(resp CallResponse) error

Helper function for a common pattern of API calls that return no body so its either an error or not.

func CompletedObjectOrError

func CompletedObjectOrError[A interface{}](resp CallResponse) (*A, error)

Helper for a common pattern of successful API calls returning an object body or an error

func DebugPrintResponse

func DebugPrintResponse(err error, f func(format string, a ...any) (n int, err error))

func DefaultHttpClient

func DefaultHttpClient() *http.Client

func IdempotencyKey

func IdempotencyKey(uuid string) callArg

func JsonBody

func JsonBody(body any) callArg

func MultipartBody

func MultipartBody(parts ...multipartFn) callArg

func MultipartField

func MultipartField(key, value string) multipartFn

func MultipartFile

func MultipartFile(key, filename string, file io.Reader, contentType string) multipartFn

func NoopArg

func NoopArg() callArg

func OccurrenceByID added in v0.5.0

func OccurrenceByID(id string) scheduleOccurrenceFilterArg

Occurrence with the specific ID

func OccurrenceLatest added in v0.5.0

func OccurrenceLatest() scheduleOccurrenceFilterArg

Occurrence closest to now without going over.

func OccurrenceLatestToTime added in v0.5.0

func OccurrenceLatestToTime(t time.Time) scheduleOccurrenceFilterArg

Occurrence closest to time `t` without going over.

func PtrOf

func PtrOf[A interface{}](c A) *A

Can turn a const or hard coded value into a pointer to itself.

func UnmarshalListResponse

func UnmarshalListResponse[A interface{}](resp CallResponse) ([]A, error)

func UnmarshalObjectResponse

func UnmarshalObjectResponse[A interface{}](resp CallResponse) (*A, error)

func WaitFor

func WaitFor(state string) callArg

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	// String passed to the authorization server to gain access to the system
	AccessToken string `json:"access_token,omitempty"`
	// String passed to the authorization server to gain access to the system
	RefreshToken string `json:"refresh_token,omitempty"`
	// Type of token returned. Opaque is not parse-able while JWT follows JWT spec.
	TokenType string `json:"token_type,omitempty"`
	// Number of seconds the token is valid for.
	ExpiresIn int32 `json:"expires_in,omitempty"`
	// A space-delimited list of [scopes](https://docs.moov.io/guides/developer-tools/api-keys/scopes/) that are allowed
	Scope string `json:"scope,omitempty"`
}

AccessTokenResponse Possible responses that can be made to the /token endpoints. The type of response returned here will mirror the type of the request

type Account

type Account struct {
	Mode        Mode        `json:"mode,omitempty"`
	AccountID   string      `json:"accountID,omitempty"`
	AccountType AccountType `json:"accountType,omitempty"`
	DisplayName string      `json:"displayName,omitempty"`
	Profile     Profile     `json:"profile,omitempty"`
	// Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
	Metadata       map[string]string   `json:"metadata,omitempty"`
	TermsOfService *TermsOfService     `json:"termsOfService,omitempty"`
	Capabilities   []AccountCapability `json:"capabilities,omitempty"`
	Verification   Verification        `json:"verification,omitempty"`
	// Optional alias from a foreign/external system which can be used to reference this resource.
	ForeignID       string           `json:"foreignID,omitempty"`
	CustomerSupport *CustomerSupport `json:"customerSupport,omitempty"`
	Settings        *AccountSettings `json:"settings,omitempty"`
	CreatedOn       time.Time        `json:"createdOn,omitempty"`
	UpdatedOn       time.Time        `json:"updatedOn,omitempty"`
	DisconnectedOn  *time.Time       `json:"disconnectedOn,omitempty"`
}

Account Describes a Moov account.

type AccountCapability added in v0.3.0

type AccountCapability struct {
	Capability CapabilityName   `json:"capability,omitempty"`
	Status     CapabilityStatus `json:"status,omitempty"`
}

type AccountNameVerification added in v0.3.0

type AccountNameVerification struct {
	FirstName  CardVerificationResult `json:"firstName,omitempty"`
	LastName   CardVerificationResult `json:"lastName,omitempty"`
	MiddleName CardVerificationResult `json:"middleName,omitempty"`
	FullName   CardVerificationResult `json:"fullName,omitempty"`
}

type AccountSettings

type AccountSettings struct {
	CardPayment *CardPaymentSettings `json:"cardPayment,omitempty"`
	AchPayment  *AchPaymentSettings  `json:"achPayment,omitempty"`
}

AccountSettings User provided settings to manage an account.

type AccountType

type AccountType string

AccountType The type of entity represented by this account.

const (
	AccountType_Individual AccountType = "individual"
	AccountType_Business   AccountType = "business"
)

List of AccountType

type AccountVerificationStatus

type AccountVerificationStatus string

AccountVerificationStatus The status of an identity verification for a profile.

const (
	AccountVerificationStatus_Unverified AccountVerificationStatus = "unverified"
	AccountVerificationStatus_Pending    AccountVerificationStatus = "pending"
	AccountVerificationStatus_Resubmit   AccountVerificationStatus = "resubmit"
	AccountVerificationStatus_Review     AccountVerificationStatus = "review"
	AccountVerificationStatus_Verified   AccountVerificationStatus = "verified"
	AccountVerificationStatus_Failed     AccountVerificationStatus = "failed"
)

List of AccountVerificationStatus

type AchDetails

type AchDetails struct {
	Status      AchStatus     `json:"status"`
	TraceNumber string        `json:"traceNumber"`
	Return      *AchException `json:"return,omitempty"`
	Correction  *AchException `json:"correction,omitempty"`
	// An optional override of the default NACHA company entry description for a transfer.
	CompanyEntryDescription string `json:"companyEntryDescription,omitempty"`
	// An optional override of the default NACHA company name for a transfer.
	OriginatingCompanyName string     `json:"originatingCompanyName,omitempty"`
	SecCode                SecCode    `json:"secCode,omitempty"`
	InitiatedOn            *time.Time `json:"initiatedOn,omitempty"`
	OriginatedOn           *time.Time `json:"originatedOn,omitempty"`
	CorrectedOn            *time.Time `json:"correctedOn,omitempty"`
	ReturnedOn             *time.Time `json:"returnedOn,omitempty"`
	CompletedOn            *time.Time `json:"completedOn,omitempty"`
	CanceledOn             *time.Time `json:"canceledOn,omitempty"`
}

AchDetails ACH specific details about the transaction.

type AchDetailsSource

type AchDetailsSource struct {
	Status      AchStatus     `json:"status"`
	TraceNumber string        `json:"traceNumber"`
	Return      *AchException `json:"return,omitempty"`
	Correction  *AchException `json:"correction,omitempty"`
	// An optional override of the default NACHA company entry description for a transfer.
	CompanyEntryDescription string `json:"companyEntryDescription,omitempty"`
	// An optional override of the default NACHA company name for a transfer.
	OriginatingCompanyName string          `json:"originatingCompanyName,omitempty"`
	SecCode                SecCode         `json:"secCode,omitempty"`
	InitiatedOn            *time.Time      `json:"initiatedOn,omitempty"`
	OriginatedOn           *time.Time      `json:"originatedOn,omitempty"`
	CorrectedOn            *time.Time      `json:"correctedOn,omitempty"`
	ReturnedOn             *time.Time      `json:"returnedOn,omitempty"`
	CompletedOn            *time.Time      `json:"completedOn,omitempty"`
	CanceledOn             *time.Time      `json:"canceledOn,omitempty"`
	DebitHoldPeriod        DebitHoldPeriod `json:"debitHoldPeriod,omitempty"`
}

AchDetailsSource struct for AchDetailsSource

type AchException

type AchException struct {
	Code        string `json:"code,omitempty"`
	Reason      string `json:"reason,omitempty"`
	Description string `json:"description,omitempty"`
}

AchException struct for AchException

type AchLocation

type AchLocation struct {
	Address             string `json:"address,omitempty"`
	City                string `json:"city,omitempty"`
	State               string `json:"state,omitempty"`
	PostalCode          string `json:"postalCode,omitempty"`
	PostalCodeExtension string `json:"postalCodeExtension,omitempty"`
}

type AchParticipant

type AchParticipant struct {
	RoutingNumber      string           `json:"routingNumber,omitempty"`
	OfficeCode         string           `json:"officeCode,omitempty"`
	ServicingFRBNumber string           `json:"servicingFRBNumber,omitempty"`
	RecordTypeCode     string           `json:"recordTypeCode,omitempty"`
	Revised            string           `json:"revised,omitempty"`
	NewRoutingNumber   string           `json:"newRoutingNumber,omitempty"`
	CustomerName       string           `json:"customerName,omitempty"`
	PhoneNumber        string           `json:"phoneNumber,omitempty"`
	StatusCode         string           `json:"statusCode,omitempty"`
	ViewCode           string           `json:"viewCode,omitempty"`
	CleanName          string           `json:"cleanName,omitempty"`
	AchLocation        AchLocation      `json:"achLocation,omitempty"`
}

type AchPaymentSettings

type AchPaymentSettings struct {
	// The description that shows up on ACH transactions. This will default to the account's display name on account creation.
	CompanyName string `json:"companyName,omitempty"`
}

AchPaymentSettings User provided settings to manage ACH payments.

type AchReturnCode

type AchReturnCode string

AchReturnCode is the return code of an ACH transaction that caused the bank account status to change.

const (
	AchReturnCode_R02 AchReturnCode = "R02"
	AchReturnCode_R03 AchReturnCode = "R03"
	AchReturnCode_R04 AchReturnCode = "R04"
	AchReturnCode_R05 AchReturnCode = "R05"
	AchReturnCode_R07 AchReturnCode = "R07"
	AchReturnCode_R08 AchReturnCode = "R08"
	AchReturnCode_R10 AchReturnCode = "R10"
	AchReturnCode_R11 AchReturnCode = "R11"
	AchReturnCode_R12 AchReturnCode = "R12"
	AchReturnCode_R13 AchReturnCode = "R13"
	AchReturnCode_R14 AchReturnCode = "R14"
	AchReturnCode_R15 AchReturnCode = "R15"
	AchReturnCode_R16 AchReturnCode = "R16"
	AchReturnCode_R17 AchReturnCode = "R17"
	AchReturnCode_R20 AchReturnCode = "R20"
	AchReturnCode_R23 AchReturnCode = "R23"
	AchReturnCode_R29 AchReturnCode = "R29"
	AchReturnCode_R34 AchReturnCode = "R34"
	AchReturnCode_R38 AchReturnCode = "R38"
	AchReturnCode_R39 AchReturnCode = "R39"
)

List of ACHReturnCode

type AchStatus

type AchStatus string

AchStatus Status of the ACH lifecycle.

const (
	AchStatus_Initied    AchStatus = "initiated"
	AchStatus_Originated AchStatus = "originated"
	AchStatus_Corrected  AchStatus = "corrected"
	AchStatus_Returned   AchStatus = "returned"
	AchStatus_Completed  AchStatus = "completed"
)

List of ACHStatus

type Address

type Address struct {
	AddressLine1    string `json:"addressLine1"`
	AddressLine2    string `json:"addressLine2,omitempty"`
	City            string `json:"city"`
	StateOrProvince string `json:"stateOrProvince"`
	PostalCode      string `json:"postalCode"`
	Country         string `json:"country"`
}

Address struct for Address

type AddressPatch added in v0.4.0

type AddressPatch struct {
	AddressLine1    *string `json:"addressLine1"`
	AddressLine2    *string `json:"addressLine2,omitempty"`
	City            *string `json:"city"`
	StateOrProvince *string `json:"stateOrProvince"`
	PostalCode      *string `json:"postalCode"`
	Country         *string `json:"country"`
}

AddressPatch is for partial address updates. Only fields that are non-nil will be updated.

type Amount

type Amount struct {
	// A 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty" otel:"currency"`
	// Quantity in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99.
	Value int64 `json:"value,omitempty" otel:"value"`
}

Amount A representation of money containing an integer value and its currency.

type ApplePay

type ApplePay struct {
	Brand           string     `json:"brand,omitempty"`
	CardType        string     `json:"cardType,omitempty"`
	CardDisplayName string     `json:"cardDisplayName,omitempty"`
	Fingerprint     string     `json:"fingerprint,omitempty"`
	Expiration      Expiration `json:"expiration,omitempty"`
	DynamicLastFour string     `json:"dynamicLastFour,omitempty"`
}

type ApplePayBillingContact

type ApplePayBillingContact struct {
	AddressLines       []string `json:"addressLines,omitempty"`
	Locality           string   `json:"locality,omitempty"`
	PostalCode         string   `json:"postalCode,omitempty"`
	AdministrativeArea string   `json:"administrativeArea,omitempty"`
	CountryCode        string   `json:"countryCode,omitempty"`
}

type ApplePayDomains

type ApplePayDomains struct {
	DisplayName string   `json:"displayName,omitempty"`
	Domains     []string `json:"domains,omitempty"`
}

type ApplePayDomainsResponse

type ApplePayDomainsResponse struct {
	AccountID   string    `json:"accountID,omitempty"`
	DisplayName string    `json:"displayName,omitempty"`
	Domains     []string  `json:"domains,omitempty"`
	CreatedOn   time.Time `json:"createdOn,omitempty"`
	UpdatedOn   time.Time `json:"updatedOn,omitempty"`
}

type ApplePayPaymentMethod

type ApplePayPaymentMethod struct {
	Brand    CardBrand `json:"brand,omitempty"`
	CardType CardType  `json:"cardType,omitempty"`
	// User-friendly name of the tokenized card returned by Apple.  It usually contains the brand and the last four digits of the underlying card for example, \"Visa 1256\".  There is no standard format.
	CardDisplayName string `json:"cardDisplayName,omitempty"`
	// Uniquely identifies a linked payment card or token. For Apple Pay, the fingerprint is based on the tokenized card number and may vary based on the user's device. This field can be used to identify specific payment methods across multiple accounts on your platform.
	Fingerprint string         `json:"fingerprint,omitempty"`
	Expiration  CardExpiration `json:"expiration,omitempty"`
	// The last four digits of the Apple Pay token, which may differ from the tokenized card's last four digits
	DynamicLastFour string `json:"dynamicLastFour,omitempty"`
}

ApplePayResponse Describes an Apple Pay token on a Moov account.

type ApplePayToken

type ApplePayToken struct {
	PaymentData           ApplePaymentData   `json:"paymentData"`
	PaymentMethod         ApplePaymentMethod `json:"paymentMethod"`
	TransactionIdentifier string             `json:"transactionIdentifier"`
}

type ApplePaymentData

type ApplePaymentData struct {
	Version   string                 `json:"version"`
	Data      string                 `json:"data"`
	Signature string                 `json:"signature"`
	Header    ApplePaymentDataHeader `json:"header"`
}

type ApplePaymentDataHeader

type ApplePaymentDataHeader struct {
	EphemeralPublicKey string `json:"ephemeralPublicKey"`
	PublicKeyHash      string `json:"publicKeyHash"`
	TransactionId      string `json:"transactionId"`
}

type ApplePaymentMethod

type ApplePaymentMethod struct {
	DisplayName string `json:"displayName"`
	Network     string `json:"network"`
	Type        string `json:"type"`
}

type Application added in v0.9.0

type Application struct {
	ApplicationID string `json:"applicationID,omitempty" otel:"application_id"`
	AccountID     string `json:"accountID,omitempty" otel:"account_id"`

	CreatedOn  time.Time  `json:"createdOn,omitempty" otel:"created_on"`
	UpdatedOn  time.Time  `json:"updatedOn,omitempty" otel:"updated_on"`
	DisabledOn *time.Time `json:"disabledOn,omitempty" otel:"disabled_on"`

	AllowedScopes []ApplicationScope `json:"allowedScopes,omitempty"`
	Name          string             `json:"name,omitempty"`
	Description   string             `json:"description,omitempty"`

	// don't use this, it's not used by the API
	AccountMode uint `json:"accountMode,omitempty"`
}

type ApplicationKeyWithSecret added in v0.9.0

type ApplicationKeyWithSecret struct {
	ApplicationKeyID string `json:"applicationKeyID"`
	ApplicationID    string `json:"applicationID"`
	AccountID        string `json:"accountID"`

	Name         string    `json:"name"`
	Description  string    `json:"description"`
	ClientId     string    `json:"clientId"`
	ClientSecret string    `json:"clientSecret"`
	LastUsed     time.Time `json:"lastUsed"`
	Origins      []string  `json:"origins"`

	CreatedOn time.Time `json:"createdOn"`

	UpdatedOn time.Time `json:"updatedOn"`

	DisabledOn *time.Time `json:"disabledOn"`
}

type ApplicationScope added in v0.9.0

type ApplicationScope string

type AvailableBalance

type AvailableBalance struct {
	// A 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty" otel:"currency"`
	// Quantity in the smallest unit of the specified currency. In USD this is cents, so $12.04 is 1204 and $0.99 would be 99.
	Value int64 `json:"value" otel:"value"`
	// Same as `value`, but a decimal-formatted numerical string that represents up to 9 decimal place precision.
	ValueDecimal string `json:"valueDecimal"`
}

type BankAccount

type BankAccount struct {
	BankAccountID string `json:"bankAccountID,omitempty"`
	// Once the bank account is linked, we don't reveal the full bank account number. The fingerprint acts as a way to identify whether two linked bank accounts are the same.
	Fingerprint           string                  `json:"fingerprint,omitempty"`
	Status                BankAccountStatus       `json:"status,omitempty"`
	HolderName            string                  `json:"holderName,omitempty"`
	HolderType            HolderType              `json:"holderType,omitempty"`
	BankName              string                  `json:"bankName,omitempty"`
	BankAccountType       BankAccountType         `json:"bankAccountType,omitempty"`
	RoutingNumber         string                  `json:"routingNumber,omitempty"`
	LastFourAccountNumber string                  `json:"lastFourAccountNumber,omitempty"`
	UpdatedOn             time.Time               `json:"updatedOn,omitempty"`
	StatusReason          BankAccountStatusReason `json:"statusReason,omitempty"`
	ExceptionDetails      *ExceptionDetails       `json:"exceptionDetails,omitempty"`

	// Includes any payment methods generated for a newly created bank account, removing the need to  call the List Payment Methods endpoint following a successful Create BankAccount request.
	// **NOTE: This field is only populated for Create BankAccount requests made with the `X-Wait-For` header.**
	PaymentMethods []BasicPaymentMethod `json:"paymentMethods,omitempty"`
}

BankAccountResponse Describes a bank account on a Moov account.

type BankAccountPaymentMethod

type BankAccountPaymentMethod BankAccount

type BankAccountRequest

type BankAccountRequest struct {
	RoutingNumber string          `json:"routingNumber,omitempty"`
	AccountNumber string          `json:"accountNumber,omitempty"`
	AccountType   BankAccountType `json:"bankAccountType,omitempty"`
	HolderName    string          `json:"holderName,omitempty"`
	HolderType    HolderType      `json:"holderType,omitempty"`
}

type BankAccountStatus

type BankAccountStatus string

BankAccountStatus The bank account status.

const (
	BankAccountStatus_New                BankAccountStatus = "new"
	BankAccountStatus_Verified           BankAccountStatus = "verified"
	BankAccountStatus_VerificationFailed BankAccountStatus = "verificationFailed"
	BankAccountStatus_Pending            BankAccountStatus = "pending"
	BankAccountStatus_Errored            BankAccountStatus = "errored"
)

List of BankAccountStatus

type BankAccountStatusReason

type BankAccountStatusReason string

BankAccountStatusReason The reason the bank account status changed to the current value.

const (
	BankAccountStatusReason_BankAccountCreated           BankAccountStatusReason = "bank-account-created"
	BankAccountStatusReason_VerificationInitiated        BankAccountStatusReason = "verification-initiated"
	BankAccountStatusReason_MicroDepositAttemptsExceeded BankAccountStatusReason = "micro-deposit-attempts-exceeded"
	BankAccountStatusReason_MicroDepositExpired          BankAccountStatusReason = "micro-deposit-expired"
	BankAccountStatusReason_MaxVerificationFailures      BankAccountStatusReason = "max-verification-failures"
	BankAccountStatusReason_VerificationSuccessful       BankAccountStatusReason = "verification-successful"
	BankAccountStatusReason_AchDebitReturn               BankAccountStatusReason = "ach-debit-return"
	BankAccountStatusReason_AchCreditReturn              BankAccountStatusReason = "ach-credit-return" // #nosec G101
	BankAccountStatusReason_MicroDepositReturn           BankAccountStatusReason = "micro-deposit-return"
	BankAccountStatusReason_AdminAction                  BankAccountStatusReason = "admin-action"
	BankAccountStatusReason_Other                        BankAccountStatusReason = "other"
)

List of BankAccountStatusReason

type BankAccountType

type BankAccountType string

BankAccountType Defines the type of the bank account

const (
	BankAccountType_Checking      BankAccountType = "checking"
	BankAccountType_Savings       BankAccountType = "savings"
	BankAccountType_GeneralLedger BankAccountType = "general-ledger"
	BankAccountType_Loan          BankAccountType = "loan"
)

List of HolderType

type BankAccountVerification added in v0.7.0

type BankAccountVerification struct {
	VerificationMethod BankAccountVerificationMethod `json:"verificationMethod"`
	Status             BankAccountVerificationStatus `json:"status"`
	ExceptionDetails   *ExceptionDetails             `json:"exceptionDetails"`
}

type BankAccountVerificationMethod added in v0.7.0

type BankAccountVerificationMethod string
const (
	BankAccountVerificationMethodInstant BankAccountVerificationMethod = "instant"
	BankAccountVerificationMethodAch     BankAccountVerificationMethod = "ach"
)

List of BankAccountVerificationMethod

type BankAccountVerificationStatus added in v0.7.0

type BankAccountVerificationStatus string
const (
	BankAccountVerificationStatusNew                 BankAccountVerificationStatus = "new"
	BankAccountVerificationStatusSentCredit          BankAccountVerificationStatus = "sent-credit"
	BankAccountVerificationStatusMaxAttemptsExceeded BankAccountVerificationStatus = "max-attempts-exceeded"
	BankAccountVerificationStatusFailed              BankAccountVerificationStatus = "failed"
	BankAccountVerificationStatusExpired             BankAccountVerificationStatus = "expired"
	BankAccountVerificationStatusSuccessful          BankAccountVerificationStatus = "successful"
)

List of BankAccountVerificationStatus

type BasicPaymentMethod

type BasicPaymentMethod struct {
	PaymentMethodID   string            `json:"paymentMethodID,omitempty"`
	PaymentMethodType PaymentMethodType `json:"paymentMethodType,omitempty"`
}

BasicPaymentMethod struct for BasicPaymentMethod

type Business

type Business struct {
	LegalBusinessName string       `json:"legalBusinessName,omitempty"`
	DoingBusinessAs   string       `json:"doingBusinessAs,omitempty"`
	BusinessType      BusinessType `json:"businessType,omitempty"`
	Address           *Address     `json:"address,omitempty"`
	Phone             *Phone       `json:"phone,omitempty"`
	// Email address.
	Email       string `json:"email,omitempty"`
	Website     string `json:"website,omitempty"`
	Description string `json:"description,omitempty"`
	// Indicates whether a tax ID has been provided for this business.
	TaxIDProvided    bool              `json:"taxIDProvided,omitempty"`
	Representatives  []Representative  `json:"representatives,omitempty"`
	OwnersProvided   bool              `json:"ownersProvided"`
	IndustryCodes    *IndustryCodes    `json:"industryCodes,omitempty"`
	PrimaryRegulator *PrimaryRegulator `json:"primaryRegulator,omitempty"`
}

Business Describes a business.

type BusinessType

type BusinessType string

BusinessType The type of entity represented by this business.

const (
	BusinessType_SoleProprietorship        BusinessType = "soleProprietorship"
	BusinessType_UnincorporatedAssociation BusinessType = "unincorporatedAssociation"
	BusinessType_Trust                     BusinessType = "trust"
	BusinessType_PublicCorporation         BusinessType = "publicCorporation"
	BusinessType_PrivateCorporation        BusinessType = "privateCorporation"
	BusinessType_Llc                       BusinessType = "llc"
	BusinessType_Partnership               BusinessType = "partnership"
	BusinessType_UnincorporatedNonProfit   BusinessType = "unincorporatedNonProfit"
	BusinessType_IncorporatedNonProfit     BusinessType = "incorporatedNonProfit"
)

List of BusinessType

type CallResponse

type CallResponse interface {
	Status() CallStatus

	// Deserializes the body of the response into the item.
	// This is here so the response can handle any content type.
	Unmarshal(item any) error

	// Convert response into an golang error
	Error() string
}

func ErrorAsCallResponse

func ErrorAsCallResponse(err error) CallResponse

type CallStatus

type CallStatus struct {
	Name      string
	Retryable bool
}

type Cancellation added in v0.10.0

type Cancellation struct {
	CancellationID string             `json:"cancellationID"`
	Status         CancellationStatus `json:"status"`
	CreatedOn      time.Time          `json:"createdOn"`
}

type CancellationStatus

type CancellationStatus string

CancellationStatus Cancellation status.

const (
	CancellationStatus_Pending   CancellationStatus = "pending"
	CancellationStatus_Completed CancellationStatus = "completed"
	CancellationStatus_Failed    CancellationStatus = "failed"
)

List of CancellationStatus

type Capability

type Capability struct {
	Capability CapabilityName `json:"capability"`
	// ID of account.
	AccountID    string           `json:"accountID,omitempty"`
	Status       CapabilityStatus `json:"status"`
	Requirements Requirement      `json:"requirements,omitempty"`
	// If status is `disabled`, the reason this capability was disabled.
	DisabledReason string     `json:"disabledReason,omitempty"`
	CreatedOn      time.Time  `json:"createdOn"`
	UpdatedOn      time.Time  `json:"updatedOn"`
	DisabledOn     *time.Time `json:"disabledOn,omitempty"`
}

Capability Describes an action or set of actions that an account is permitted to perform.

type CapabilityName

type CapabilityName string
const (
	CapabilityName_1099             CapabilityName = "1099"
	CapabilityName_CardIssuing      CapabilityName = "card-issuing"
	CapabilityName_CollectFunds     CapabilityName = "collect-funds"
	CapabilityName_DeveloperAccount CapabilityName = "developer-account"
	CapabilityName_ProductionApp    CapabilityName = "production-app"
	CapabilityName_SendFunds        CapabilityName = "send-funds"
	CapabilityName_Transfers        CapabilityName = "transfers"
	CapabilityName_Wallet           CapabilityName = "wallet"
)

type CapabilityStatus

type CapabilityStatus string

CapabilityStatus The status of the capability requested for an account.

const (
	CapabilityStatus_Enabled  CapabilityStatus = "enabled"
	CapabilityStatus_Disabled CapabilityStatus = "disabled"
	CapabilityStatus_Pending  CapabilityStatus = "pending"
)

List of CapabilityStatus

type Card

type Card struct {
	CardID               string             `json:"cardID,omitempty"`
	Fingerprint          string             `json:"fingerprint,omitempty"`
	Brand                string             `json:"brand,omitempty"`
	CardCategory         string             `json:"cardCategory,omitempty"`
	CardType             string             `json:"cardType,omitempty"`
	LastFourCardNumber   string             `json:"lastFourCardNumber,omitempty"`
	Bin                  string             `json:"bin,omitempty"`
	Expiration           Expiration         `json:"expiration,omitempty"`
	HolderName           string             `json:"holderName,omitempty"`
	BillingAddress       Address            `json:"billingAddress,omitempty"`
	CardVerification     CardVerification   `json:"cardVerification,omitempty"`
	Issuer               string             `json:"issuer,omitempty"`
	IssuerCountry        string             `json:"issuerCountry,omitempty"`
	IssuerURL            string             `json:"issuerURL,omitempty"`
	IssuerPhone          string             `json:"issuerPhone,omitempty"`
	Commercial           *bool              `json:"commercial,omitempty"`
	Regulated            *bool              `json:"regulated,omitempty"`
	CardOnFile           bool               `json:"cardOnFile,omitempty"`
	MerchantAccountID    string             `json:"merchantAccountID,omitempty"`
	CardAccountUpdater   CardAccountUpdater `json:"cardAccountUpdater,omitempty"`
	DomesticPushToCard   string             `json:"domesticPushToCard,omitempty"`
	DomesticPullFromCard string             `json:"domesticPullFromCard,omitempty"`
	PaymentMethods       []PaymentMethod    `json:"paymentMethods,omitempty"`
}

type CardAccountUpdater

type CardAccountUpdater struct {
	UpdatedOn  time.Time `json:"updatedOn,omitempty"`
	UpdateType string    `json:"updateType,omitempty"`
}

type CardBrand

type CardBrand string

CardBrand The card brand.

const (
	CardBrand_AmericanExpress CardBrand = "American Express"
	CardBrand_Discover        CardBrand = "Discover"
	CardBrand_Mastercard      CardBrand = "Mastercard"
	CardBrand_Visa            CardBrand = "Visa"
)

List of CardBrand

type CardDetails

type CardDetails struct {
	Status                   CardTransactionStatus `json:"status,omitempty"`
	FailureCode              string                `json:"failureCode,omitempty"`
	DynamicDescriptor        string                `json:"dynamicDescriptor,omitempty"`
	TransactionSource        string                `json:"transactionSource,omitempty"`
	InterchangeQualification string                `json:"interchangeQualification,omitempty"`
	InitiatedOn              *time.Time            `json:"initiatedOn,omitempty"`
	ConfirmedOn              *time.Time            `json:"confirmedOn,omitempty"`
	SettledOn                *time.Time            `json:"settledOn,omitempty"`
	FailedOn                 *time.Time            `json:"failedOn,omitempty"`
	CanceledOn               *time.Time            `json:"canceledOn,omitempty"`
	CompletedOn              *time.Time            `json:"completedOn,omitempty"`
}

type CardExpiration

type CardExpiration struct {
	Month string `json:"month,omitempty"`
	Year  string `json:"year,omitempty"`
}

CardExpiration The expiration date of the linked card or token.

type CardFailureCode

type CardFailureCode string

CardFailureCode the model 'CardFailureCode'

const (
	CardFailureCode_CallIssuer                 CardFailureCode = "call-issuer"
	CardFailureCode_DoNotHonor                 CardFailureCode = "do-not-honor"
	CardFailureCode_ProcessingError            CardFailureCode = "processing-error"
	CardFailureCode_InvalidTransaction         CardFailureCode = "invalid-transaction"
	CardFailureCode_InvalidAmount              CardFailureCode = "invalid-amount"
	CardFailureCode_NoSuchIssuer               CardFailureCode = "no-such-issuer"
	CardFailureCode_ReenterTransaction         CardFailureCode = "reenter-transaction"
	CardFailureCode_CVV_Mismatch               CardFailureCode = "cvv-mismatch"
	CardFailureCode_LostOrStolen               CardFailureCode = "lost-or-stolen"
	CardFailureCode_Insufficient_Funds         CardFailureCode = "insufficient-funds"
	CardFailureCode_InvalidCardNumber          CardFailureCode = "invalid-card-number"
	CardFailureCode_InvalidMerchant            CardFailureCode = "invalid-merchant"
	CardFailureCode_ExpiredCard                CardFailureCode = "expired-card"
	CardFailureCode_IncorrectPin               CardFailureCode = "incorrect-pin"
	CardFailureCode_TransactionNotAllowed      CardFailureCode = "transaction-not-allowed"
	CardFailureCode_SuspectedFraud             CardFailureCode = "suspected-fraud"
	CardFailureCode_AmountLimitedExceeded      CardFailureCode = "amount-limit-exceeded"
	CardFailureCode_VelocityLimitExceeded      CardFailureCode = "velocity-limit-exceeded"
	CardFailureCode_RevocationOfAauthorization CardFailureCode = "revocation-of-authorization"
	CardFailureCode_CardNotActivated           CardFailureCode = "card-not-activated"
	CardFailureCode_IssuerNotAvailable         CardFailureCode = "issuer-not-available"
	CardFailureCode_CouldNotRoute              CardFailureCode = "could-not-route"
	CardFailureCode_CardholderAccounterClosed  CardFailureCode = "cardholder-account-closed"
	CardFailureCode_DuplicateTransaction       CardFailureCode = "duplicate-transaction"
	CardFailureCode_UnknownIssue               CardFailureCode = "unknown-issue"
)

List of CardFailureCode

type CardPaymentMethod

type CardPaymentMethod struct {
	CardID string `json:"cardID,omitempty"`
	// Uniquely identifies a linked payment card or token. For Apple Pay, the fingerprint is based on the tokenized card number and may vary based on the user's device. This field can be used to identify specific payment methods across multiple accounts on your platform.
	Fingerprint        string            `json:"fingerprint,omitempty"`
	Brand              CardBrand         `json:"brand,omitempty"`
	CardType           CardType          `json:"cardType,omitempty"`
	LastFourCardNumber string            `json:"lastFourCardNumber,omitempty"`
	Bin                string            `json:"bin,omitempty"`
	Expiration         CardExpiration    `json:"expiration,omitempty"`
	HolderName         string            `json:"holderName,omitempty"`
	BillingAddress     Address           `json:"billingAddress,omitempty"`
	CardVerification   CardVerifications `json:"cardVerification,omitempty"`
	Issuer             string            `json:"issuer,omitempty"`
	IssuerCountry      string            `json:"issuerCountry,omitempty"`
	// Indicates cardholder has authorized card to be stored for future payments.
	CardOnFile bool `json:"cardOnFile,omitempty"`
	// ID of the Moov account acting as a merchant or other entity authorized to store the card.  Defaults to your platform account ID if cardOnFile is set to true and no other account is provided.
	MerchantAccountID    string               `json:"merchantAccountID,omitempty"`
	CardAccountUpdater   CardAccountUpdater   `json:"cardAccountUpdater,omitempty"`
	DomesticPushToCard   DomesticPushToCard   `json:"domesticPushToCard,omitempty"`
	DomesticPullFromCard DomesticPullFromCard `json:"domesticPullFromCard,omitempty"`
	// Includes any payment methods generated for a newly linked card, removing the need to  call the List Payment Methods endpoint following a successful Link Card request.  **NOTE: This field is only populated for Link Card requests made with the `X-Wait-For` header.**
	PaymentMethods []BasicPaymentMethod `json:"paymentMethods,omitempty"`
}

Card Describes a card on a Moov account.

type CardPaymentSettings

type CardPaymentSettings struct {
	// The description that shows up on credit card transactions. This will default to the accounts display name on account creation.
	StatementDescriptor string `json:"statementDescriptor,omitempty"`
}

CardPaymentSettings User provided settings to manage card payments. This data is only allowed on a business account.

type CardTransactionStatus added in v0.10.0

type CardTransactionStatus string

CardTransactionStatus represents the status of a card transaction within a Transfer

const (
	// Transaction has been initiated
	CardTransactionStatus_Initiated CardTransactionStatus = "initiated"

	// Transaction has been authorized by the card network
	CardTransactionStatus_Confirmed CardTransactionStatus = "confirmed"

	// Transaction settled with issuer; Moov wallet will be credited by 1 PM ET on a banking day, or the next banking day if it is a weekend or a holiday
	CardTransactionStatus_Settled CardTransactionStatus = "settled"

	// Funds have been credited to the merchant Moov wallet
	CardTransactionStatus_Completed CardTransactionStatus = "completed"

	// Transaction was successfully cancelled and authorization has been reversed
	CardTransactionStatus_Canceled CardTransactionStatus = "canceled"

	// Transaction failed; specific failure reason will be in cardDetails.failureCode
	CardTransactionStatus_Failed CardTransactionStatus = "failed"
)

type CardType

type CardType string

CardType The type of the card.

const (
	CardType_Dedit   CardType = "debit"
	CardType_Credit  CardType = "credit"
	CardType_Prepaid CardType = "prepaid"
	CardType_Unknown CardType = "unknown"
)

List of CardType

type CardUpdateFilter

type CardUpdateFilter func(*cardPatch) error

func WithCardBillingAddress

func WithCardBillingAddress(address AddressPatch) CardUpdateFilter

WithCardBillingAddress sets the billing address for the card

func WithCardCVV

func WithCardCVV(cvv string) CardUpdateFilter

WithCardCvv sets the CVV for the card

func WithCardExpiration

func WithCardExpiration(expiration Expiration) CardUpdateFilter

WithCardExpiration sets the expiration date for the card

func WithCardOnFile

func WithCardOnFile(cardOnFile bool) CardUpdateFilter

WithCardOnFile sets the card on file for the card boolean

func WithEndToEndToken added in v0.7.0

func WithEndToEndToken(token EndToEndToken) CardUpdateFilter

WithVerifyName sets the verifyName flag for the card update request

func WithHolderName added in v0.6.0

func WithHolderName(holderName string) CardUpdateFilter

WithHolderName sets the holderName for the card

func WithVerifyName added in v0.6.0

func WithVerifyName(verifyName bool) CardUpdateFilter

WithVerifyName sets the verifyName flag for the card update request

type CardUpdateType added in v0.2.0

type CardUpdateType string
const (
	CardUpdateType_AccountClosed     CardUpdateType = "account-closed"
	CardUpdateType_ContactCardHolder CardUpdateType = "contact-cardholder"
	CardUpdateType_ExpirationUpdate  CardUpdateType = "expiration-update"
	CardUpdateType_NumberUpdate      CardUpdateType = "number-update"
)

List of CardUpdateType

type CardVerification

type CardVerification struct {
	Cvv          string                  `json:"cvv,omitempty"`
	AddressLine1 string                  `json:"addressLine1,omitempty"`
	PostalCode   string                  `json:"postalCode,omitempty"`
	AccountName  AccountNameVerification `json:"accountName,omitempty"`
}

type CardVerificationResult

type CardVerificationResult string

CardVerificationResult the model 'CardVerificationResult'

const (
	CardVerificationResult_NoMatch     CardVerificationResult = "noMatch"
	CardVerificationResult_Match       CardVerificationResult = "match"
	CardVerificationResult_NotChecked  CardVerificationResult = "notChecked"
	CardVerificationResult_Unavailable CardVerificationResult = "unavailable"
)

List of CardVerificationResult

type CardVerifications

type CardVerifications struct {
	Cvv          CardVerificationResult  `json:"cvv,omitempty"`
	AddressLine1 CardVerificationResult  `json:"addressLine1,omitempty"`
	PostalCode   CardVerificationResult  `json:"postalCode,omitempty"`
	AccountName  AccountNameVerification `json:"accountName,omitempty"`
}

CardVerifications The results of submitting cardholder data to a card network for verification.

type CardVolumeDistribution added in v0.2.0

type CardVolumeDistribution struct {
	EcommercePercentage     int32 `json:"ecommercePercentage"`
	CardPresentPercentage   int32 `json:"cardPresentPercentage"`
	MailOrPhonePercentage   int32 `json:"mailOrPhonePercentage"`
	DebtRepaymentPercentage int32 `json:"debtRepaymentPercentage"`
}

type Client

type Client struct {
	Credentials Credentials
	HttpClient  *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(configurables ...ClientConfigurable) (*Client, error)

NewClient returns a moov.Client with credentials read from environment variables.

func (Client) AcceptDispute added in v0.2.0

func (c Client) AcceptDispute(ctx context.Context, accountID string, disputeID string) (*Dispute, error)

AcceptDispute sets the status of the dispute to accepted https://docs.moov.io/api/money-movement/disputes/post/

func (*Client) AccessToken

func (c *Client) AccessToken(ctx context.Context, scopes ...ScopeBuilder) (*AccessTokenResponse, error)

Creates an access token to access a connected account. This allows for a browser to access an account directly against Moov servers without that needing to send sensitive information through the clients backend services.

func (*Client) AccountCreationToken

func (c *Client) AccountCreationToken(ctx context.Context) (*AccessTokenResponse, error)

Creates a access token that can only be used for creating a new account thats connected to the client. This allows for a browser to create the account directly against Moov without that account information needing to send sensitive information through the clients backend services.

func (*Client) CallHttp

func (c *Client) CallHttp(ctx context.Context, endpoint EndpointArg, args ...callArg) (CallResponse, error)

func (Client) CancelSchedule added in v0.5.0

func (c Client) CancelSchedule(ctx context.Context, accountID string, scheduleID string) error

Guide: https://docs.moov.io/guides/money-movement/scheduling/ Documentation: https://docs.moov.io/api/money-movement/schedules/delete/

func (Client) CancelTransfer added in v0.10.0

func (c Client) CancelTransfer(ctx context.Context, accountID string, transferID string) (*Cancellation, error)

CancelTransfer cancels a transfer https://docs.moov.io/api/money-movement/transfers/cancel/

func (Client) CreateAccount

func (c Client) CreateAccount(ctx context.Context, account CreateAccount) (*Account, *Account, error)

CreateAccount creates a new account.

func (Client) CreateApplePayDomain

func (c Client) CreateApplePayDomain(ctx context.Context, accountID string, domain ApplePayDomains) (*ApplePayDomainsResponse, error)

CreateApplePayDomain creates a new Apple Pay domain for the given customer account https://docs.moov.io/api/#tag/Cards/operation/registerApplePayMerchantDomains

func (Client) CreateApplicationKeys added in v0.9.0

func (c Client) CreateApplicationKeys(ctx context.Context, applicationID string, key CreateApplicationKey) (*ApplicationKeyWithSecret, error)

This allows for creating an API key from another API key.

func (Client) CreateBankAccount

func (c Client) CreateBankAccount(ctx context.Context, accountID string, opts ...CreateBankAccountType) (*BankAccount, error)

CreateBankAccount creates a new bank account for the given customer account https://docs.moov.io/api/sources/bank-accounts/create/

func (Client) CreateCard

func (c Client) CreateCard(ctx context.Context, accountID string, card CreateCard) (*Card, error)

CreateCard creates a new card for the given customer linked to their account https://docs.moov.io/api/#tag/Cards/operation/card

func (Client) CreateRepresentative added in v0.2.0

func (c Client) CreateRepresentative(ctx context.Context, accountID string, representative CreateRepresentative) (*Representative, error)

CreateRepresentative creates a new representative for a given account

func (Client) CreateSweepConfig added in v0.5.0

func (c Client) CreateSweepConfig(ctx context.Context, create CreateSweepConfig) (*SweepConfig, error)

CreateSweepConfig creates a sweep config for a wallet. https://docs.moov.io/api/money-movement/sweeps/create-config/

func (Client) CreateTransfer

func (c Client) CreateTransfer(ctx context.Context, partnerAccountID string, transfer CreateTransfer, options ...CreateTransferArgs) CreateTransferBuilder

CreateTransfer creates a new transfer https://docs.moov.io/api/index.html#tag/Transfers/operation/createTransfer

func (Client) DeleteBankAccount

func (c Client) DeleteBankAccount(ctx context.Context, accountID string, bankAccountID string) error

DeleteBankAccount deletes a bank account for the given customer account https://docs.moov.io/api/sources/bank-accounts/delete/

func (Client) DeleteDisputeEvidence added in v0.2.0

func (c Client) DeleteDisputeEvidence(ctx context.Context, accountID string, disputeID, evidenceID string) error

DeleteDisputeEvidence deletes a piece of dispute evidence for the given dispute and evidence id https://docs.moov.io/api/money-movement/disputes/delete

func (Client) DeleteRepresentative added in v0.2.0

func (c Client) DeleteRepresentative(ctx context.Context, accountID string, representativeAccountID string) error

DeleteRepresentative deletes a representative for the given account

func (Client) DisableCapability

func (c Client) DisableCapability(ctx context.Context, accountID string, capability CapabilityName) error

DisableCapability disables a specific capability

func (Client) DisableCard

func (c Client) DisableCard(ctx context.Context, accountID string, cardID string) error

DisableCard disables a card associated with a Moov account https://docs.moov.io/api/#tag/Cards/operation/deleteCard

func (Client) DisconnectAccount

func (c Client) DisconnectAccount(ctx context.Context, accountID string) error

func (Client) GenerateEndToEndPublicKey added in v0.4.2

func (c Client) GenerateEndToEndPublicKey(ctx context.Context) (*jose.JSONWebKey, error)

func (Client) GetAccount

func (c Client) GetAccount(ctx context.Context, accountID string) (*Account, error)

GetAccount returns an account based on accountID.

func (Client) GetApplePayDomain

func (c Client) GetApplePayDomain(ctx context.Context, accountID string) (*ApplePayDomainsResponse, error)

GetApplePayDomain retrieves an Apple Pay domain for the given customer account https://docs.moov.io/api/#tag/Cards/operation/getApplePayMerchantDomains

func (Client) GetBankAccount

func (c Client) GetBankAccount(ctx context.Context, accountID string, bankAccountID string) (*BankAccount, error)

GetBankAccount retrieves a bank account for the given customer account https://docs.moov.io/api/sources/bank-accounts/get/

func (Client) GetCancellation added in v0.10.0

func (c Client) GetCancellation(ctx context.Context, accountID string, transferID string, cancellationID string) (*Cancellation, error)

GetCancellation gets a cancellation https://docs.moov.io/api/money-movement/transfers/cancel-details/

func (Client) GetCapability

func (c Client) GetCapability(ctx context.Context, accountID string, capability CapabilityName) (*Capability, error)

GetCapability returns a given capability for a given account

func (Client) GetCard

func (c Client) GetCard(ctx context.Context, accountID string, cardID string) (*Card, error)

GetCard retrieves a card for the given customer Moov account https://docs.moov.io/api/#tag/Cards/operation/getCard

func (Client) GetDispute

func (c Client) GetDispute(ctx context.Context, accountID string, disputeID string) (*Dispute, error)

GetDispute retrieves a dispute for the given dispute id https://docs.moov.io/api/money-movement/disputes/get/

func (Client) GetDisputeEvidence added in v0.2.0

func (c Client) GetDisputeEvidence(ctx context.Context, accountID string, disputeID, evidenceID string) (*DisputeEvidence, error)

GetDisputeEvidence retrieves the piece of dispute evidence for the given dispute and evidence id https://docs.moov.io/api/money-movement/disputes/get-evidence/

func (Client) GetFile

func (c Client) GetFile(ctx context.Context, accountID string, fileID string) (*File, error)

func (Client) GetInstantBankAccountVerfication added in v0.5.0

func (c Client) GetInstantBankAccountVerfication(ctx context.Context, accountID, bankAccountID string) (*BankAccountVerification, error)

GetInstantBankAccountVerfication retrieves an active bank account verification for the given bank account https://docs.moov.io/api/sources/bank-accounts/get-bank-account-verification/

func (Client) GetPaymentMethod

func (c Client) GetPaymentMethod(ctx context.Context, accountID string, paymentMethodID string) (*PaymentMethod, error)

GetPaymentMethod retrieves a payment method for the given payment method id https://docs.moov.io/api/index.html#tag/Payment-methods/operation/getPaymentMethod

func (Client) GetRefund

func (c Client) GetRefund(ctx context.Context, accountID, transferID, refundID string) (*Refund, error)

GetRefund retrieves a refund for a transfer https://docs.moov.io/api/index.html#tag/Transfers/operation/getRefund

func (Client) GetRepresentative added in v0.2.0

func (c Client) GetRepresentative(ctx context.Context, accountID string, representativeID string) (*Representative, error)

GetRepresentatives returns a representative for a given account

func (Client) GetSchedule added in v0.5.0

func (c Client) GetSchedule(ctx context.Context, accountID string, scheduleID string) (*Schedule, error)

Guide: https://docs.moov.io/guides/money-movement/scheduling/ Documentation: https://docs.moov.io/api/money-movement/schedules/get/

func (Client) GetScheduleOccurrence added in v0.5.0

func (c Client) GetScheduleOccurrence(ctx context.Context, accountID string, scheduleID string, filter scheduleOccurrenceFilterArg) (*Occurrence, error)

Guide: https://docs.moov.io/guides/money-movement/scheduling/

func (Client) GetSweep added in v0.5.0

func (c Client) GetSweep(ctx context.Context, accountID string, walletID string, sweepID string) (*Sweep, error)

GetSweep retrives a sweep for a given sweepID. https://docs.moov.io/api/money-movement/sweeps/get/

func (Client) GetSweepConfig added in v0.5.0

func (c Client) GetSweepConfig(ctx context.Context, accountID string, sweepConfigID string) (*SweepConfig, error)

GetSweepConfig retrieves a sweep config for the given accountID and sweepConfigID https://docs.moov.io/api/money-movement/sweeps/get-config/

func (Client) GetTransfer

func (c Client) GetTransfer(ctx context.Context, accountID, transferID string) (*Transfer, error)

GetTransfer retrieves a transfer https://docs.moov.io/api/index.html#tag/Transfers/operation/getTransfer

func (Client) GetUnderwriting added in v0.2.0

func (c Client) GetUnderwriting(ctx context.Context, accountID string) (*Underwriting, error)

GetUnderwriting returns the underwriting information for the given account.

func (Client) GetWallet

func (c Client) GetWallet(ctx context.Context, accountID string, walletID string) (*Wallet, error)

GetWallet retrieves a wallet for the given wallet id https://docs.moov.io/api/index.html#tag/Wallets/operation/getWalletForAccount

func (Client) GetWalletTransaction

func (c Client) GetWalletTransaction(ctx context.Context, accountID string, walletID string, transactionID string) (*WalletTransaction, error)

GetWalletTransaction retrieves a transaction for the given wallet id and transaction id https://docs.moov.io/api/index.html#tag/Wallet-transactions/operation/getWalletTransaction

func (Client) InstantVerificationComplete added in v0.4.3

func (c Client) InstantVerificationComplete(ctx context.Context, accountID, bankAccountID, code string) error

InstantVerificationComplete confirms a bank account verification for the given bank account https://docs.moov.io/api/sources/bank-accounts/complete-bank-account-verification/

func (Client) InstantVerificationInitiate added in v0.4.3

func (c Client) InstantVerificationInitiate(ctx context.Context, accountID, bankAccountID string) error

InstantVerificationInitiate creates a new bank account verification for the given bank account https://docs.moov.io/api/sources/bank-accounts/initiate-bank-account-verification/

func (Client) LinkApplePayToken

func (c Client) LinkApplePayToken(ctx context.Context, accountID string, req LinkApplePay) (*LinkedApplePayPaymentMethod, error)

ApplePayToken creates a new Apple Pay token for the given customer account https://docs.moov.io/api/#tag/Cards/operation/getApplePayMerchantDomains

func (Client) ListAccounts

func (c Client) ListAccounts(ctx context.Context, opts ...ListAccountFilter) ([]Account, error)

ListAccounts returns a list of accounts.

func (Client) ListApplications added in v0.9.0

func (c Client) ListApplications(ctx context.Context) ([]Application, error)

List your applications so you can get the ID's to create keys on them.

func (Client) ListBankAccounts

func (c Client) ListBankAccounts(ctx context.Context, accountID string) ([]BankAccount, error)

ListBankAccounts lists all bank accounts for the given customer account https://docs.moov.io/api/sources/bank-accounts/list/

func (Client) ListCapabilities

func (c Client) ListCapabilities(ctx context.Context, accountID string) ([]Capability, error)

ListCapabilities returns the capabilities for the given account

func (Client) ListCards

func (c Client) ListCards(ctx context.Context, accountID string) ([]Card, error)

ListCards lists all cards for the given customer Moov account https://docs.moov.io/api/#tag/Cards/operation/listCards

func (Client) ListDisputeEvidence added in v0.2.0

func (c Client) ListDisputeEvidence(ctx context.Context, accountID string, disputeID string) ([]DisputeEvidence, error)

ListDisputeEvidence lists all evidence for the given dispute id https://docs.moov.io/api/money-movement/disputes/list-evidence/

func (Client) ListDisputes

func (c Client) ListDisputes(ctx context.Context, accountID string, filters ...DisputeListFilter) ([]Dispute, error)

ListDisputes lists of Disputes that are associated with a Moov account https://docs.moov.io/api/money-movement/disputes/list/

func (Client) ListFiles

func (c Client) ListFiles(ctx context.Context, accountID string) ([]File, error)

func (Client) ListInstitutions

func (c Client) ListInstitutions(ctx context.Context, rail Rail, opts ...ListInstitutionsFailter) (*FinancialInstitutions, error)

func (Client) ListPaymentMethods

func (c Client) ListPaymentMethods(ctx context.Context, accountID string, opts ...PaymentMethodListFilter) ([]PaymentMethod, error)

ListPaymentMethods lists all payment methods that are associated with a Moov account https://docs.moov.io/api/index.html#tag/Payment-methods/operation/getPaymentMethods

func (Client) ListRefunds

func (c Client) ListRefunds(ctx context.Context, accountID, transferID string) ([]Refund, error)

ListRefunds lists all refunds for a transfer https://docs.moov.io/api/index.html#tag/Transfers/operation/getRefunds

func (Client) ListRepresentatives added in v0.2.0

func (c Client) ListRepresentatives(ctx context.Context, accountID string) ([]Representative, error)

ListRepresentatives returns the representatives for the given account

func (Client) ListSchedule added in v0.5.0

func (c Client) ListSchedule(ctx context.Context, accountID string, args ...callArg) ([]Schedule, error)

Guide: https://docs.moov.io/guides/money-movement/scheduling/ Documentation: https://docs.moov.io/api/money-movement/schedules/list/

func (Client) ListSweepConfigs added in v0.5.0

func (c Client) ListSweepConfigs(ctx context.Context, accountID string) ([]SweepConfig, error)

ListSweepConfigs lists sweep configs associated with the accountID https://docs.moov.io/api/money-movement/sweeps/list-configs/

func (Client) ListSweeps added in v0.5.0

func (c Client) ListSweeps(ctx context.Context, accountID string, walletID string, filters ...ListSweepsFilter) ([]Sweep, error)

ListSweeps lists sweeps associated with a wallet https://docs.moov.io/api/money-movement/sweeps/list/

func (Client) ListTransfers

func (c Client) ListTransfers(ctx context.Context, accountID string, filters ...ListTransferFilter) ([]Transfer, error)

ListTransfers lists all transfers https://docs.moov.io/api/index.html#tag/Transfers/operation/listTransfers

func (Client) ListWalletTransactions

func (c Client) ListWalletTransactions(ctx context.Context, accountID string, walletID string, opts ...ListTransactionFilter) ([]WalletTransaction, error)

ListWalletTransactions lists all transactions for the given wallet id https://docs.moov.io/api/index.html#tag/Wallet-transactions

func (Client) ListWallets

func (c Client) ListWallets(ctx context.Context, accountID string) ([]Wallet, error)

ListWallets lists all wallets that are associated with a Moov account https://docs.moov.io/api/index.html#tag/Wallets/operation/listWalletsForAccount

func (Client) MicroDepositConfirm

func (c Client) MicroDepositConfirm(ctx context.Context, accountID string, bankAccountID string, amounts []int) error

MicroDepositConfirm confirms a micro deposit verification for the given bank account https://docs.moov.io/api/sources/bank-accounts/complete-micro-deposits/

func (Client) MicroDepositInitiate

func (c Client) MicroDepositInitiate(ctx context.Context, accountID string, bankAccountID string) error

MicroDepositInitiate creates a new micro deposit verification for the given bank account https://docs.moov.io/api/sources/bank-accounts/initiate-micro-deposits/

func (Client) PatchTransfer

func (c Client) PatchTransfer(ctx context.Context, accountID, transferID string, patches ...TransferPatcher) (*Transfer, error)

UpdateTransferMetaData updates the metadata for a transfer https://docs.moov.io/api/index.html#tag/Transfers/operation/patchTransfer

func (Client) Ping

func (c Client) Ping(ctx context.Context) error

Ping calls the ping endpoint to make sure we have valid credentials

func (*Client) PingAccessToken

func (c *Client) PingAccessToken(ctx context.Context) (*AccessTokenResponse, error)

Creates an access token that gives access to the ping endpoint. This allows for testing access tokens from server side or browser communications to ensure everything works.

func (*Client) RefreshAccessToken

func (c *Client) RefreshAccessToken(ctx context.Context, refreshToken string) (*AccessTokenResponse, error)

Allows the use of a refresh token to return a new fresh token

func (Client) RefundTransfer

func (c Client) RefundTransfer(ctx context.Context, partnerAccountID, transferID string, refund CreateRefund, options ...CreateRefundArgs) (*Refund, *RefundStarted, error)

RefundTransfer refunds a transfer https://docs.moov.io/api/#tag/Transfers/operation/refundTransfer

func (Client) RequestCapabilities

func (c Client) RequestCapabilities(ctx context.Context, accountID string, capabilities []CapabilityName) ([]Capability, error)

RequestCapabilities adds a new capability for the given account

func (Client) ReverseTransfer

func (c Client) ReverseTransfer(ctx context.Context, partnerAccountID, transferID string, refund CreateReversal, options ...CreateReversalArgs) (*CreatedReversal, error)

ReverseTransfer reverses a transfer https://docs.moov.io/api/index.html#tag/Transfers/operation/reverseTransfer

func (*Client) RevokeAccessToken

func (c *Client) RevokeAccessToken(ctx context.Context, token string) error

Revokes the token and makes it unusable for follow up calls

func (Client) StartApplePaySession

func (c Client) StartApplePaySession(ctx context.Context, accountID string, req StartApplePaySession) (*string, error)

CreateApplePaySession creates a new Apple Pay session for the given customer account https://docs.moov.io/api/#tag/Cards/operation/getApplePayMerchantDomains

func (Client) SubmitDisputeEvidence added in v0.2.0

func (c Client) SubmitDisputeEvidence(ctx context.Context, accountID string, disputeID string) (*Dispute, error)

SubmitDisputeEvidence Submits evidence for a dispute. https://docs.moov.io/api/money-movement/disputes/post-evidence/

func (Client) TestEndToEndToken added in v0.4.2

func (c Client) TestEndToEndToken(ctx context.Context, token string) error

func (Client) TransferOptions

func (c Client) TransferOptions(ctx context.Context, payload CreateTransferOptions) (*TransferOptions, error)

TransferOptions lists all transfer options between a source and destination https://docs.moov.io/api/#tag/Transfers/operation/createTransferOptions

func (Client) UpdateAccount

func (c Client) UpdateAccount(ctx context.Context, account Account) (*Account, error)

UpdateAccount updates an account.

func (Client) UpdateApplePayDomain

func (c Client) UpdateApplePayDomain(ctx context.Context, accountID string, patch PatchApplyPayDomains) error

UpdateApplePayDomain updates an existing Apple Pay domain for the given customer account https://docs.moov.io/api/#tag/Cards/operation/updateApplePayMerchantDomains

func (Client) UpdateCard

func (c Client) UpdateCard(ctx context.Context, accountID string, cardID string, opt1 CardUpdateFilter, opts ...CardUpdateFilter) (*Card, error)

UpdateCard performs a partial update on a card associated with a Moov account. Only fields that are populated (non-nil) in the request will be updated. If a value is provided for CVV, a new verification ($0 authorization) will be submitted for the card. Updating the expiration date or address will update the information stored on file for the card but will not be verified https://docs.moov.io/api/#tag/Cards/operation/updateCard

func (Client) UpdateDisputeEvidence added in v0.2.0

func (c Client) UpdateDisputeEvidence(ctx context.Context, accountID string, disputeID string, evidenceID string, evidenceUpdate DisputesEvidenceUpdate) (*DisputeEvidence, error)

UpdateDisputeEvidence Updates dispute evidence by ID. https://docs.moov.io/api/money-movement/disputes/patch/

func (Client) UpdateRepresentative added in v0.2.0

func (c Client) UpdateRepresentative(ctx context.Context, representativeAccountID string, representativeID string, representative UpdateRepresentative) (*Representative, error)

UpdateRepresentative updates a representative for a given account

func (Client) UpdateSchedule added in v0.5.0

func (c Client) UpdateSchedule(ctx context.Context, accountID string, scheduleID string, schedule UpdateSchedule) (*Schedule, error)

Guide: https://docs.moov.io/guides/money-movement/scheduling/ Documentation: https://docs.moov.io/api/money-movement/schedules/update/

func (Client) UpdateSweepConfig added in v0.5.0

func (c Client) UpdateSweepConfig(ctx context.Context, update UpdateSweepConfig) (*SweepConfig, error)

UpdateSweepConfig updates a sweep config. https://docs.moov.io/api/money-movement/sweeps/patch-config/

func (Client) UploadDisputeEvidence added in v0.2.0

func (c Client) UploadDisputeEvidence(ctx context.Context, accountID string, disputeID string, evidenceText DisputesEvidenceText) (*DisputeEvidence, error)

UploadDisputeEvidence Uploads text as evidence for a dispute. https://docs.moov.io/api/money-movement/disputes/post-text/

func (Client) UploadEvidenceFile added in v0.2.0

func (c Client) UploadEvidenceFile(ctx context.Context, accountID string, disputeID string, evidenceType EvidenceType, filename string, file io.Reader, mimeType string) (*DisputeEvidenceUpload, error)

UploadEvidenceFile uploads a new evidence file for the given dispute id https://docs.moov.io/api/money-movement/disputes/post-file/

func (Client) UploadFile

func (c Client) UploadFile(ctx context.Context, accountID string, upload UploadFile) (*File, error)

func (Client) UpsertUnderwriting added in v0.2.0

func (c Client) UpsertUnderwriting(ctx context.Context, accountID string, underwriting UpdateUnderwriting) (*Underwriting, error)

UpsertUnderwriting adds or updates underwriting information for the given account. The account must have a description and an MCC set to create underwriting. Returns the underwriting information for the account.

type ClientConfigurable

type ClientConfigurable func(c *Client) error

func WithCredentials

func WithCredentials(credentials Credentials) ClientConfigurable

func WithDecoder added in v0.3.0

func WithDecoder(dec Decoder) ClientConfigurable

func WithHttpClient

func WithHttpClient(client *http.Client) ClientConfigurable

type CreateAccount

type CreateAccount struct {
	Type                  AccountType            `json:"accountType"`
	Profile               CreateProfile          `json:"profile"`
	Metadata              map[string]string      `json:"metadata,omitempty"`
	TermsOfService        *TermsOfServicePayload `json:"termsOfService,omitempty"`
	ForeignID             string                 `json:"foreignID,omitempty"`
	CustomerSupport       *CustomerSupport       `json:"customerSupport,omitempty"`
	AccountSettings       *AccountSettings       `json:"settings,omitempty"`
	RequestedCapabilities []CapabilityName       `json:"capabilities,omitempty"`
}

type CreateApplicationKey added in v0.9.0

type CreateApplicationKey struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Origins     []string `json:"origins,omitempty"`
}

type CreateBankAccountType

type CreateBankAccountType callArg

func WaitForPaymentMethod

func WaitForPaymentMethod() CreateBankAccountType

func WithBankAccount

func WithBankAccount(bankAccount BankAccountRequest) CreateBankAccountType

func WithMX

func WithPlaid

func WithPlaid(plaid PlaidRequest) CreateBankAccountType
func WithPlaidLink(plaidLink PlaidLinkRequest) CreateBankAccountType

type CreateBusinessProfile

type CreateBusinessProfile struct {
	Name             string            `json:"legalBusinessName,omitempty"`
	DBA              string            `json:"doingBusinessAs,omitempty"`
	Type             BusinessType      `json:"businessType,omitempty"`
	Address          *Address          `json:"address,omitempty"`
	Phone            *Phone            `json:"phone,omitempty"`
	Email            string            `json:"email,omitempty"`
	Website          string            `json:"website,omitempty"`
	Description      string            `json:"description,omitempty"`
	TaxID            *TaxID            `json:"taxID,omitempty"`
	IndustryCodes    *IndustryCodes    `json:"industryCodes,omitempty"`
	PrimaryRegulator *PrimaryRegulator `json:"primaryRegulator,omitempty"`
}

type CreateCard

type CreateCard struct {
	CardNumber        string     `json:"cardNumber,omitempty"`
	CardCvv           string     `json:"cardCvv,omitempty"`
	Expiration        Expiration `json:"expiration,omitempty"`
	HolderName        string     `json:"holderName,omitempty"`
	VerifyName        bool       `json:"verifyName,omitempty"`
	BillingAddress    Address    `json:"billingAddress,omitempty"`
	CardOnFile        bool       `json:"cardOnFile,omitempty"`
	MerchantAccountID string     `json:"merchantAccountID,omitempty"`

	EndToEndToken *EndToEndToken `json:"e2ee,omitempty"`
}

type CreateIndividualProfile

type CreateIndividualProfile struct {
	Name         Name          `json:"name"`
	Phone        *Phone        `json:"phone,omitempty"`
	Email        string        `json:"email"`
	Address      *Address      `json:"address,omitempty"`
	BirthDate    *Date         `json:"birthDate,omitempty"`
	GovernmentID *GovernmentID `json:"governmentID,omitempty"`
}

type CreateOccurrence added in v0.5.0

type CreateOccurrence struct {
	// RunTransfer details that will be used.
	RunTransfer RunTransfer `json:"runTransfer,omitempty"`

	// Time to kick off the run. Normalize to UTC.
	RunOn time.Time `json:"runOn,omitempty"`
}

type CreateProfile

type CreateProfile struct {
	Individual *CreateIndividualProfile `json:"individual,omitempty"`
	Business   *CreateBusinessProfile   `json:"business,omitempty"`
}

type CreateRefund

type CreateRefund struct {
	// Amount to refund in cents. If null, the original transfer's full amount will be refunded.
	Amount int64 `json:"amount,omitempty"`
}

CreateRefund Specifies a partial amount to refund. This request body is optional, an empty body will issue a refund for the full amount of the original transfer.

type CreateRefundArgs

type CreateRefundArgs callArg

func WithRefundIdempotencyKey

func WithRefundIdempotencyKey(key uuid.UUID) CreateRefundArgs

Can be specified to overwrite a randomly generated one.

func WithRefundWaitForRailResponse

func WithRefundWaitForRailResponse() CreateRefundArgs

type CreateRepresentative added in v0.2.0

type CreateRepresentative struct {
	Name             Name              `json:"name"`
	Phone            *Phone            `json:"phone,omitempty"`
	Email            string            `json:"email,omitempty"`
	Address          *Address          `json:"address,omitempty"`
	BirthDate        *Date             `json:"birthDate,omitempty"`
	GovernmentID     *GovernmentID     `json:"governmentID,omitempty"`
	Responsibilities *Responsibilities `json:"responsibilities,omitempty"`
}

type CreateReversal

type CreateReversal struct {
	// Amount to reverse in cents. If null, the original transfer's full amount will be reversed. Partial amounts will automatically trigger a refund instead of a cancellation.
	Amount int64 `json:"amount,omitempty"`
}

CreateReversal struct for CreateReversal

type CreateReversalArgs

type CreateReversalArgs callArg

func WithReversalsIdempotencyKey

func WithReversalsIdempotencyKey(key uuid.UUID) CreateReversalArgs

Can be specified to overwrite a randomly generated one.

type CreateSchedule added in v0.5.0

type CreateSchedule struct {
	// Description of what this schedule is
	Description string `json:"description,omitempty"`

	// If specified will generate Scheduled transfers based on its configuration
	Recur *Recur `json:"recur,omitempty"`

	// On creating the schedule we can use these occurrences as they planned the schedule
	Occurrences []CreateOccurrence `json:"occurrences,omitempty"`
}

type CreateSweepConfig added in v0.5.0

type CreateSweepConfig struct {
	AccountID           string            `json:"-"`
	WalletID            string            `json:"walletID"`
	Status              SweepConfigStatus `json:"status"`
	PushPaymentMethodID string            `json:"pushPaymentMethodID"`
	PullPaymentMethodID string            `json:"pullPaymentMethodID"`
	// An optional override of the default NACHA company entry description for sweep transfers.
	StatementDescriptor *string `json:"statementDescriptor,omitempty"`
	// An optional field to specify an amount to maintain in the wallet. This is a decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99. If not supplied, the default is 0.00.
	MinimumBalance *string `json:"minimumBalance,omitempty"`
}

type CreateTransfer

type CreateTransfer struct {
	Source         CreateTransfer_Source         `json:"source"`
	Destination    CreateTransfer_Destination    `json:"destination"`
	Amount         Amount                        `json:"amount"`
	FacilitatorFee CreateTransfer_FacilitatorFee `json:"facilitatorFee,omitempty"`
	// An optional description of the transfer for your own internal use.
	Description string `json:"description,omitempty"`
	// Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
	Metadata map[string]string `json:"metadata,omitempty"`
}

CreateTransfer struct for CreateTransfer

type CreateTransferArgs

type CreateTransferArgs func(t *createTransferBuilder) callArg

func WithTransferIdempotencyKey

func WithTransferIdempotencyKey(key uuid.UUID) CreateTransferArgs

Can be specified to overwrite a randomly generated one.

type CreateTransferBuilder added in v0.3.0

type CreateTransferBuilder struct {
	// contains filtered or unexported fields
}

func (CreateTransferBuilder) Started added in v0.3.0

Started initiates the transfers request and doesn't wait beyond creating the transfer

func (CreateTransferBuilder) WaitForRailResponse added in v0.3.0

func (r CreateTransferBuilder) WaitForRailResponse() (*Transfer, *TransferStarted, error)

Starts a transfer request and waits for a response from the rail (e.g. authorized or declined) before returning the result. There are three possible return values (and only one will be not-nil): 1) A full transfer with rail-specific details as a result of waiting for the response from the rail. 2) A transfer that started but the request timed out waiting for a response from the rail. 3) An error attempting to create the transfer.

type CreateTransferOptions

type CreateTransferOptions struct {
	Source      CreateTransferOptionsTarget `json:"source"`
	Destination CreateTransferOptionsTarget `json:"destination"`
	Amount      Amount                      `json:"amount"`
}

CreateTransferOptions struct for CreateTransferOptions

type CreateTransferOptionsTarget

type CreateTransferOptionsTarget struct {
	AccountID       string `json:"accountID,omitempty"`
	PaymentMethodID string `json:"paymentMethodID,omitempty"`
}

CreateTransferOptionsTarget struct for CreateTransferOptionsTarget

type CreateTransfer_AchDetailsBase

type CreateTransfer_AchDetailsBase struct {
	// An optional override of the default NACHA company entry description for a transfer.
	CompanyEntryDescription string `json:"companyEntryDescription,omitempty"`
	// An optional override of the default NACHA company name for a transfer.
	OriginatingCompanyName string `json:"originatingCompanyName,omitempty"`
}

CreateTransfer_AchDetailsBase If transfer involves ACH, override default card acceptance properties.

type CreateTransfer_AchDetailsSource

type CreateTransfer_AchDetailsSource struct {
	// An optional override of the default NACHA company entry description for a transfer.
	CompanyEntryDescription string `json:"companyEntryDescription,omitempty"`
	// An optional override of the default NACHA company name for a transfer.
	OriginatingCompanyName string           `json:"originatingCompanyName,omitempty"`
	DebitHoldPeriod        *DebitHoldPeriod `json:"debitHoldPeriod,omitempty"`
	SecCode                *SecCode         `json:"secCode,omitempty"`
}

CreateTransfer_AchDetailsSource struct for CreateTransfer_AchDetailsSource

type CreateTransfer_CardDetailsDestination

type CreateTransfer_CardDetailsDestination struct {
	// An optional override of the default card statement descriptor for a transfer.
	DynamicDescriptor string `json:"dynamicDescriptor,omitempty"`
}

CreateTransfer_CardDetailsDestination struct for CreateTransfer_CardDetailsDestination

type CreateTransfer_CardDetailsSource

type CreateTransfer_CardDetailsSource struct {
	// An optional override of the default card statement descriptor for a transfer.
	DynamicDescriptor string             `json:"dynamicDescriptor,omitempty"`
	TransactionSource *TransactionSource `json:"transactionSource,omitempty"`
}

CreateTransfer_CardDetailsSource struct for CreateTransfer_CardDetailsSource

type CreateTransfer_Destination

type CreateTransfer_Destination struct {
	PaymentMethodID string                                 `json:"paymentMethodID"`
	CardDetails     *CreateTransfer_CardDetailsDestination `json:"cardDetails,omitempty"`
	AchDetails      *CreateTransfer_AchDetailsBase         `json:"achDetails,omitempty"`
}

CreateTransfer_Destination The final stage of a transfer and the ultimate recipient of the funds.

type CreateTransfer_FacilitatorFee

type CreateTransfer_FacilitatorFee struct {
	// Total facilitator fee in cents. Only either `total` or `totalDecimal` can be set.
	Total *int64 `json:"total,omitempty"`
	// Same as `total`, but a decimal-formatted numerical string that represents up to 9 decimal place precision. Only either `total` or `totalDecimal` can be set. Set this field if you expect the fee to be in fractions of a cent.
	TotalDecimal *string `json:"totalDecimal,omitempty"`
	// Markup facilitator fee in cents. Only either `markup` or `markupDecimal` can be set.
	Markup *int64 `json:"markup,omitempty"`
	// Same as `markup`, but a decimal-formatted numerical string that represents up to 9 decimal place precision. Only either `markup` or `markupDecimal` can be set. Set this field if you expect the fee to be in fractions of a cent.
	MarkupDecimal *string `json:"markupDecimal,omitempty"`
}

CreateTransfer_FacilitatorFee Total or markup fee.

type CreateTransfer_Source

type CreateTransfer_Source struct {
	TransferID      string                            `json:"transferID,omitempty"`
	PaymentMethodID string                            `json:"paymentMethodID,omitempty"`
	CardDetails     *CreateTransfer_CardDetailsSource `json:"cardDetails,omitempty"`
	AchDetails      *CreateTransfer_AchDetailsSource  `json:"achDetails,omitempty"`
}

CreateTransfer_Source Where funds for a transfer originate. For the source, you must include either a `paymentMethodID` or a `transferID`. A `transferID` is used to create a [transfer group](https://docs.moov.io/guides/money-movement/transfer-groups/), associating the new transfer with a parent transfer.

type CreatedCancellation

type CreatedCancellation struct {
	Status    CancellationStatus `json:"status,omitempty"`
	CreatedOn time.Time          `json:"createdOn,omitempty"`
}

CreatedCancellation struct for CreatedCancellation

type CreatedReversal

type CreatedReversal struct {
	Cancellation *CreatedCancellation `json:"cancellation,omitempty"`
	Refund       *Refund              `json:"refund,omitempty"`
}

CreatedReversal struct for CreatedReversal

type Credentials

type Credentials struct {
	PublicKey string `yaml:"public_key,omitempty"`
	SecretKey string `yaml:"secret_key,omitempty"`
	Host      string `yaml:"host,omitempty"`
}

func CredentialsDefault

func CredentialsDefault() Credentials

func CredentialsFromEnv

func CredentialsFromEnv() Credentials

func (*Credentials) Validate

func (c *Credentials) Validate() error

type CustomerSupport

type CustomerSupport struct {
	Phone *Phone `json:"phone,omitempty"`
	// Email address.
	Email   string   `json:"email,omitempty"`
	Address *Address `json:"address,omitempty"`
	Website string   `json:"website,omitempty"`
}

CustomerSupport User-provided information that can be displayed on credit card transactions for customers to use when contacting a customer support team. This data is only allowed on a business account.

type Date

type Date struct {
	Year  int `json:"year,omitempty"`
	Month int `json:"month,omitempty"`
	Day   int `json:"day,omitempty"`
}

type DebitHoldPeriod

type DebitHoldPeriod string

DebitHoldPeriod An optional override of your default ACH hold period in banking days. The hold period must be longer than or equal to your default setting.

const (
	DebitHoldPeriod_NoHold DebitHoldPeriod = "no-hold"
	DebitHoldPeriod_1Day   DebitHoldPeriod = "1-day"
	DebitHoldPeriod_2Days  DebitHoldPeriod = "2-days"
)

List of DebitHoldPeriod

type Decoder added in v0.3.0

type Decoder func(r io.Reader, contentType string, item any) error

type Dispute

type Dispute struct {
	DisputeID                string        `json:"disputeID,omitempty"`
	CreatedOn                time.Time     `json:"createdOn,omitempty"`
	Amount                   Amount        `json:"amount,omitempty"`
	NetworkReasonCode        string        `json:"networkReasonCode,omitempty"`
	NetworkReasonDescription string        `json:"networkReasonDescription,omitempty"`
	Phase                    DisputePhase  `json:"phase,omitempty"`
	RespondBy                time.Time     `json:"respondBy,omitempty"`
	Status                   DisputeStatus `json:"status,omitempty"`
	Transfer                 Transfer      `json:"transfer,omitempty"`
}

type DisputeEvidence added in v0.2.0

type DisputeEvidence struct {
	CreatedOn    time.Time `json:"createdOn,omitempty"`
	DisputeID    string    `json:"disputeID,omitempty"`
	EvidenceID   string    `json:"evidenceID,omitempty"`
	EvidenceType string    `json:"evidenceType,omitempty"`
	FileName     string    `json:"fileName,omitempty"`
	MimeType     string    `json:"mimeType,omitempty"`
	Size         int       `json:"size,omitempty"`
	Text         string    `json:"text,omitempty"`
	UpdatedOn    time.Time `json:"updatedOn,omitempty"`
}

type DisputeEvidenceUpload added in v0.9.0

type DisputeEvidenceUpload struct {
	DisputeID    string    `json:"disputeID,omitempty"`
	EvidenceID   string    `json:"evidenceID,omitempty"`
	EvidenceType string    `json:"evidenceType,omitempty"`
	FileName     string    `json:"fileName,omitempty"`
	MimeType     string    `json:"mimeType,omitempty"`
	Size         int       `json:"size,omitempty"`
	CreatedOn    time.Time `json:"createdOn,omitempty"`
}

type DisputeListFilter

type DisputeListFilter callArg

func WithDisputeCardHolderAccountID

func WithDisputeCardHolderAccountID(id string) DisputeListFilter

func WithDisputeCount

func WithDisputeCount(c int) DisputeListFilter

func WithDisputeEndDate

func WithDisputeEndDate(t time.Time) DisputeListFilter

func WithDisputeMerchantAccountID

func WithDisputeMerchantAccountID(id string) DisputeListFilter

func WithDisputeOrderBy

func WithDisputeOrderBy(orderBy string) DisputeListFilter

func WithDisputeResponseEndDate

func WithDisputeResponseEndDate(t time.Time) DisputeListFilter

func WithDisputeResponseStartDate

func WithDisputeResponseStartDate(t time.Time) DisputeListFilter

func WithDisputeSkip

func WithDisputeSkip(c int) DisputeListFilter

func WithDisputeStartDate

func WithDisputeStartDate(t time.Time) DisputeListFilter

func WithDisputeStatus

func WithDisputeStatus(s string) DisputeListFilter

type DisputePhase added in v0.2.0

type DisputePhase string
const (
	DisputePhase_PreDispute DisputePhase = "pre-dispute"
	DisputePhase_Inquiry    DisputePhase = "inquiry"
	DisputePhase_Chargeback DisputePhase = "chargeback"
	DisputePhase_Unknown    DisputePhase = "unknown"
)

type DisputeStatus added in v0.2.0

type DisputeStatus string
const (
	DisputeStatus_ResponseNeeded DisputeStatus = "response-needed"
	DisputeStatus_Resolved       DisputeStatus = "resolved"
	DisputeStatus_UnderReview    DisputeStatus = "under-review"
	DisputeStatus_Closed         DisputeStatus = "closed"
	DisputeStatus_Accepted       DisputeStatus = "accepted"
	DisputeStatus_Expired        DisputeStatus = "expired"
	DisputeStatus_Won            DisputeStatus = "won"
	DisputeStatus_Lost           DisputeStatus = "lost"
)

type DisputesEvidenceText added in v0.2.0

type DisputesEvidenceText struct {
	Text         string       `json:"text"`
	EvidenceType EvidenceType `json:"evidenceType"`
}

type DisputesEvidenceUpdate added in v0.2.0

type DisputesEvidenceUpdate struct {
	EvidenceType EvidenceType `json:"evidenceType"`
}

type Document

type Document struct {
	// A unique identifier for this document.
	DocumentID  string `json:"documentID"`
	Type        string `json:"type"`
	ContentType string `json:"contentType"`
	// Optional array of errors encountered dring automated parsing.
	ParseErrors []string  `json:"parseErrors,omitempty"`
	UploadedAt  time.Time `json:"uploadedAt"`
}

Document Describes an uploaded file.

type DomesticPullFromCard

type DomesticPullFromCard string

DomesticPullFromCard Indicates if the card supports domestic push-to-card transfer.

const (
	DomesticPullFromCard_NotSupported DomesticPullFromCard = "not-supported"
	DomesticPullFromCard_Supported    DomesticPullFromCard = "supported"
	DomesticPullFromCard_Unknown      DomesticPullFromCard = "unknown"
)

List of DomesticPullFromCard

type DomesticPushToCard

type DomesticPushToCard string

DomesticPushToCard Indicates which level of domestic push-to-card transfer is supported by the card, if any.

const (
	DomesticPushToCard_NotSupported DomesticPushToCard = "not-supported"
	DomesticPushToCard_Standard     DomesticPushToCard = "standard"
	DomesticPushToCard_FastFunds    DomesticPushToCard = "fast-funds"
	DomesticPushToCard_Unknown      DomesticPushToCard = "unknown"
)

List of DomesticPushToCard

type EIN

type EIN struct {
	Number string `json:"number,omitempty"`
}

type EndToEndToken added in v0.7.0

type EndToEndToken struct {
	Token string `json:"token"`
}

type EndpointArg

type EndpointArg callArg

func Endpoint

func Endpoint(method string, pathFmt string, args ...any) EndpointArg

type EvidenceType added in v0.2.0

type EvidenceType string
const (
	EvidenceType_Receipt               EvidenceType = "receipt"
	EvidenceType_ProofOfDelivery       EvidenceType = "proof-of-delivery"
	EvidenceType_CancelationPolicy     EvidenceType = "cancelation-policy"
	EvidenceType_TermsOfService        EvidenceType = "terms-of-service"
	EvidenceType_CustomerCommunication EvidenceType = "customer-communication"
	EvidenceType_GenericEvidence       EvidenceType = "generic-evidence"
	EvidenceType_CoverLetter           EvidenceType = "cover-letter"
	EvidenceType_Other                 EvidenceType = "other"
)

type ExceptionDetails

type ExceptionDetails struct {
	// AchReturnCode is the return code of an ACH transaction that caused the bank account status to change.
	AchReturnCode *AchReturnCode `json:"achReturnCode,omitempty"`

	// Details related to an `errored` or `verificationFailed` bank account status.
	Description string `json:"description,omitempty"`

	// RTPRejectionCode is a rejection code of an RTP transaction that caused the bank account status to change.
	RTPRejectionCode *RTPRejectionCode `json:"rtpRejectionCode"`
}

ExceptionDetails Reason for, and details related to, an `errored` or `verificationFailed` bank account status.

type Expiration

type Expiration struct {
	Month string `json:"month,omitempty"`
	Year  string `json:"year,omitempty"`
}

type FailureReason

type FailureReason string

FailureReason Reason for a transfer's failure.

const (
	FailureReason_Source_Payment_Error      FailureReason = "source-payment-error"
	FailureReason_Destination_Payment_Error FailureReason = "destination-payment-error"
	FailureReason_Wallet_Insufficient_Funds FailureReason = "wallet-insufficient-funds"
	FailureReason_Rejected_HighRisk         FailureReason = "rejected-high-risk"
	FailureReason_Processing_Error          FailureReason = "processing-error"
)

List of FailureReason

type File

type File struct {
	FileID         string      `json:"fileID"`
	FileName       string      `json:"fileName"`
	FilePurpose    FilePurpose `json:"filePurpose"`
	FileStatus     FileStatus  `json:"fileStatus"`
	DecisionReason *string     `json:"decisionReason"`
	Size           int         `json:"fileSizeBytes"`
	Metadata       string      `json:"metadata"`
	AccountID      string      `json:"accountID"`
	CreatedOn      time.Time   `json:"createdOn"`
	UpdatedOn      time.Time   `json:"updatedOn"`
}

type FilePurpose

type FilePurpose string
const (
	FilePurpose_IdentityVerification       FilePurpose = "identity_verification"
	FilePurpose_BusinessVerification       FilePurpose = "business_verification"
	FilePurpose_RepresentativeVerification FilePurpose = "representative_verification"
	FilePurpose_IndividualVerification     FilePurpose = "individual_verification"
	FilePurpose_MerchantUnderwriting       FilePurpose = "merchant_underwriting"
	FilePurpose_AccountRequirement         FilePurpose = "account_requirement"
)

type FileStatus

type FileStatus string
const (
	FileStatus_Pending  FileStatus = "pending"
	FileStatus_Approved FileStatus = "approved"
	FileStatus_Rejected FileStatus = "rejected"
)

type FinancialInstitutions

type FinancialInstitutions struct {
	AchParticipants  []AchParticipant  `json:"achParticipants"`
	WireParticipants []WireParticipant `json:"wireParticipants"`
}

type Fulfillment added in v0.2.0

type Fulfillment struct {
	HasPhysicalGoods     bool         `json:"hasPhysicalGoods"`
	IsShippingProduct    bool         `json:"isShippingProduct"`
	ShipmentDurationDays int32        `json:"shipmentDurationDays"`
	ReturnPolicy         ReturnPolicy `json:"returnPolicy"`
}

type GetDispute

type GetDispute struct {
	DisputeID string    `json:"disputeID,omitempty"`
	CreatedOn time.Time `json:"createdOn,omitempty"`
	Amount    Amount    `json:"amount,omitempty"`
}

GetDispute Details of a card dispute.

type GetFacilitatorFee

type GetFacilitatorFee struct {
	// Total facilitator fee in cents.
	Total int64 `json:"total"`
	// Same as `total`, but a decimal-formatted numerical string that represents up to 9 decimal place precision.
	TotalDecimal string `json:"totalDecimal,omitempty"`
	// Markup facilitator fee in cents.
	Markup int64 `json:"markup,omitempty"`
	// Same as `markup`, but a decimal-formatted numerical string that represents up to 9 decimal place precision.
	MarkupDecimal string `json:"markupDecimal,omitempty"`
}

GetFacilitatorFee Fee you charged your customer for the transfer.

type GovernmentID

type GovernmentID struct {
	SSN  *SSN  `json:"ssn,omitempty"`
	ITIN *ITIN `json:"itin,omitempty"`
}

type HolderType

type HolderType string

HolderType Defines the type of the account holder

const (
	HolderType_Individual HolderType = "individual"
	HolderType_Business   HolderType = "business"
)

List of HolderType

type HttpCallResponse

type HttpCallResponse interface {
	error

	Status() CallStatus
	Unmarshal(item any) error

	RequestId() string
	StatusCode() int
}

func ErrorAsHttpCallResponse

func ErrorAsHttpCallResponse(err error) HttpCallResponse

type ITIN

type ITIN struct {
	Full     string `json:"full,omitempty"`
	LastFour string `json:"lastFour,omitempty"`
}

ITIN is an Individual Taxpayer Identification Number

type Individual

type Individual struct {
	Name  Name   `json:"name,omitempty"`
	Phone *Phone `json:"phone,omitempty"`
	// Email address.
	Email   string   `json:"email,omitempty"`
	Address *Address `json:"address,omitempty"`
	// Indicates whether this individual's birth date has been provided.
	BirthDateProvided bool `json:"birthDateProvided,omitempty"`
	// Indicates whether a government ID (SSN, ITIN, etc.) has been provided for this individual.
	GovernmentIDProvided bool `json:"governmentIDProvided,omitempty"`
}

Individual Describes an individual.

type IndustryCodes

type IndustryCodes struct {
	Naics string `json:"naics,omitempty"`
	Sic   string `json:"sic,omitempty"`
	Mcc   string `json:"mcc,omitempty"`
}

IndustryCodes Describes industry specific identifiers.

type InstitutionLogo struct {
	Name string `json:"name"`
	URL  string `json:"url"`
}

type LinkApplePay

type LinkApplePay struct {
	Token          ApplePayToken          `json:"token"`
	BillingContact ApplePayBillingContact `json:"billingContact,omitempty"`
}

type LinkedApplePayPaymentMethod

type LinkedApplePayPaymentMethod struct {
	// ID of the payment method
	PaymentMethodID   string   `json:"paymentMethodID"`
	PaymentMethodType string   `json:"paymentMethodType"`
	ApplePay          ApplePay `json:"applePay"`
}

type ListAccountFilter

type ListAccountFilter callArg

Func that applies a filter and returns an error if validation fails

func WithAccountCount

func WithAccountCount(count int) ListAccountFilter

WithAccountCount value to limit the number of results in the query. Default is 20

func WithAccountEmail

func WithAccountEmail(email string) ListAccountFilter

WithAccountEmail filter connected accounts by email address.

func WithAccountForeignID

func WithAccountForeignID(foreignID string) ListAccountFilter

WithAccountForeignID filter as an optional alias from a foreign/external system which can be used to reference this resource.

func WithAccountIncludeDisconnected

func WithAccountIncludeDisconnected() ListAccountFilter

WithAccountIncludeDisconnected if true, the response will include disconnected accounts.

func WithAccountName

func WithAccountName(name string) ListAccountFilter

WithAccountName if provided, this query will attempt to find matches against the following Account and Profile fields: diplayName, firstName, middleName, lastName, legalBusinessName

func WithAccountSkip

func WithAccountSkip(skip int) ListAccountFilter

WithAccountSkip the number of items to offset before starting to collect the result set

func WithAccountType

func WithAccountType(accountType string) ListAccountFilter

WithAccountType filter type possible values: individual, business

func WithAccountVerificationStatus

func WithAccountVerificationStatus(verificationStatus string) ListAccountFilter

WithAccountVerificationStatus possible values: unverified, pending, resubmit, review, verified, failed

type ListInstitutionsFailter

type ListInstitutionsFailter callArg

type ListSweepsFilter added in v0.9.0

type ListSweepsFilter callArg

func WithSweepCount added in v0.9.0

func WithSweepCount(count int) ListSweepsFilter

func WithSweepSkip added in v0.9.0

func WithSweepSkip(skip int) ListSweepsFilter

func WithSweepStatementDescriptor added in v0.9.0

func WithSweepStatementDescriptor(statementDescriptor string) ListSweepsFilter

func WithSweepStatus added in v0.9.0

func WithSweepStatus(status string) ListSweepsFilter

type ListTransactionFilter

type ListTransactionFilter callArg

func WithCompletedEndDateTime

func WithCompletedEndDateTime(completedEndDateTime time.Time) ListTransactionFilter

WithCompletedEndDateTime filters transactions by completed end date time

func WithCompletedStartDateTime

func WithCompletedStartDateTime(completedStartDateTime time.Time) ListTransactionFilter

WithCompletedStartDateTime filters transactions by completed start date time

func WithCreatedEndDateTime

func WithCreatedEndDateTime(createdEndDateTime time.Time) ListTransactionFilter

WithCreatedEndDateTime filters transactions by created end date time

func WithCreatedStartDateTime

func WithCreatedStartDateTime(createdStartDateTime time.Time) ListTransactionFilter

WithCreatedStartDateTime filters transactions by created start date time

func WithInstitutionLimit

func WithInstitutionLimit(limit int) ListTransactionFilter

WithInstitutionLimit filters institutions by their name

func WithInstitutionName

func WithInstitutionName(name string) ListTransactionFilter

WithInstitutionName filters institutions by their name

func WithInstitutionRoutingNumber

func WithInstitutionRoutingNumber(routingNumber string) ListTransactionFilter

WithInstitutionRoutingNumber filters institutions by their name

func WithInstitutionState

func WithInstitutionState(state string) ListTransactionFilter

WithInstitutionState filters institutions by their state

func WithSweepID added in v0.5.0

func WithSweepID(sweepID string) ListTransactionFilter

WithSweepID filters for transactions accrued in a sweep

func WithTransactionCount

func WithTransactionCount(count int) ListTransactionFilter

WithTransactionCount filters transactions by transaction count

func WithTransactionSkip

func WithTransactionSkip(skip int) ListTransactionFilter

WithTransactionSkip filters transactions by transaction skip

func WithTransactionSourceID

func WithTransactionSourceID(sourceID string) ListTransactionFilter

WithSourceID filters transactions by source ID

func WithTransactionSourceType

func WithTransactionSourceType(sourceType string) ListTransactionFilter

WithSourceType filters transactions by source type (transfer, dispute, issuing-transaction).

func WithTransactionStatus

func WithTransactionStatus(status string) ListTransactionFilter

WithTransactionStatus filters transactions by transaction status (pending, completed, canceled, failed)

func WithTransactionType

func WithTransactionType(transactionType string) ListTransactionFilter

WithTransactionType filters transactions by transaction type

type ListTransferFilter

type ListTransferFilter callArg

func Count

func Count(count int) ListTransferFilter

func Limit

func Limit(limit int) ListTransferFilter

func Skip

func Skip(skip int) ListTransferFilter

func WithTransferAccountIDs

func WithTransferAccountIDs(accountIDs []string) ListTransferFilter

func WithTransferCount

func WithTransferCount(count int) ListTransferFilter

func WithTransferDisputed

func WithTransferDisputed() ListTransferFilter

func WithTransferEndDate

func WithTransferEndDate(end time.Time) ListTransferFilter

func WithTransferGroup

func WithTransferGroup(groupID string) ListTransferFilter

func WithTransferRefunded

func WithTransferRefunded() ListTransferFilter

func WithTransferSkip

func WithTransferSkip(skip int) ListTransferFilter

func WithTransferStartDate

func WithTransferStartDate(start time.Time) ListTransferFilter

func WithTransferStatus

func WithTransferStatus(status string) ListTransferFilter

type MXRequest

type MXRequest struct {
	AuthorizationCode string `json:"authorizationCode,omitempty"`
}

MxAuthorizationCode The authorization code of a MX account which allows a processor to retrieve a linked payment account. <br><br> `sandbox` - When linking a bank account to a `sandbox` account using a MX authorization code it will utilize MX's sandbox environment. The MX authorization code provided must be generated from MX's sandbox environment.

type Mode

type Mode string

Mode The mode this account is allowed to be used within.

const (
	MODE_SANDBOX    Mode = "sandbox"
	MODE_PRODUCTION Mode = "production"
)

List of Mode

type MoovFeeDetails

type MoovFeeDetails struct {
	// Card scheme fees accrued during authorization and settlement. String type represents dollars with up to 9 decimal place precision.
	CardScheme string `json:"cardScheme,omitempty"`
	// Network interchange fee for Visa, Mastercard, or Discover. String type represents dollars with up to 9 decimal place precision.
	Interchange string `json:"interchange,omitempty"`
	// Network discount fee for American Express. String type represents dollars with up to 9 decimal place precision.
	Discount string `json:"discount,omitempty"`
	// Moov processing fee. String type represents dollars with up to 9 decimal place precision.
	MoovProcessing string `json:"moovProcessing"`
}

MoovFeeDetails Processing and pass-through costs that add up to the moovFee.

type Name

type Name struct {
	// Name this person was given. This is usually the the same as first name.
	FirstName string `json:"firstName"`
	// Name this person was given. This is usually the the same as first name.
	MiddleName string `json:"middleName,omitempty"`
	// Family name of this person. This is usually the the same as last name.
	LastName string `json:"lastName"`
	// Suffix of a given name.
	Suffix string `json:"suffix,omitempty"`
}

Name An individual's name.

type Occurrence added in v0.5.0

type Occurrence struct {
	ScheduleID string `json:"scheduleID,omitempty"`

	// Unique ID for updating a specific occurrence
	OccurrenceID string `json:"occurrenceID,omitempty"`

	// Mode to run the occurence under
	Mode string `json:"mode,omitempty"`

	// If this scheduled transfer was generated or manually added for say a correction
	// If a new interval is specified, all un-ran generated transfers will be re-generated
	Generated bool `json:"generated,omitempty"`

	// Flag if this is part of an indefinite schedule
	Indefinite bool `json:"indefinite,omitempty"`

	// Modified since generated. This could be switching just a single payment method
	Modified bool `json:"modified,omitempty"`

	// Ability to cancel this specific transfer from running
	CanceledOn *time.Time `json:"canceledOn,omitempty"`

	// Time to kick off the run. Normalize to UTC.
	RunOn time.Time `json:"runOn,omitempty"`

	// RunTransfer details that will be used.
	RunTransfer RunTransfer `json:"runTransfer,omitempty"`

	// When the transfer was kicked off. If nil, hasn't ran. Normalize to UTC.
	RanOn *time.Time `json:"ranOn,omitempty"`

	// ID of the transfer that ran
	RunTransferID *string `json:"ranTransferID,omitempty"`

	// Status of the running occurrence
	Status *string `json:"status,omitempty"`

	// Descriptive message of why it errored.
	Error *OccurrenceError `json:"error,omitempty" spanner:"error" otel:"error"`
}

type OccurrenceError added in v0.5.0

type OccurrenceError struct {
	Message string `json:"message,omitempty" otel:"message"`
}

OccurrenceError is where we log any errors or failures that could happen from running the occurrence.

type PatchApplyPayDomains

type PatchApplyPayDomains struct {
	AddDomains    []string `json:"addDomains,omitempty"`
	RemoveDomains []string `json:"removeDomains,omitempty"`
}

type PaymentMethod

type PaymentMethod struct {
	PaymentMethodID   string                    `json:"paymentMethodID,omitempty"`
	PaymentMethodType PaymentMethodType         `json:"paymentMethodType,omitempty"`
	Wallet            *WalletPaymentMethod      `json:"wallet,omitempty"`
	BankAccount       *BankAccountPaymentMethod `json:"bankAccount,omitempty"`
	Card              *CardPaymentMethod        `json:"card,omitempty"`
	ApplePay          *ApplePayPaymentMethod    `json:"applePay,omitempty"`
}

PaymentMethod A method of moving money

type PaymentMethodListFilter

type PaymentMethodListFilter callArg

func WithPaymentMethodSourceID

func WithPaymentMethodSourceID(id string) PaymentMethodListFilter

func WithPaymentMethodType

func WithPaymentMethodType(t string) PaymentMethodListFilter

WithPaymentMethodType filters the payment methods by the payment method type. example: moov-wallet, card-payment, ach-debit-collect

type PaymentMethodType

type PaymentMethodType string

PaymentMethodType The payment method type that represents a payment rail and directionality

const (
	PaymentMethodType_MoovWallet        PaymentMethodType = "moov-wallet"
	PaymentMethodType_AchDebitFund      PaymentMethodType = "ach-debit-fund"
	PaymentMethodType_AchDebitCollect   PaymentMethodType = "ach-debit-collect"
	PaymentMethodType_AchCreditStandard PaymentMethodType = "ach-credit-standard"
	PaymentMethodType_AchCreditSameDay  PaymentMethodType = "ach-credit-same-day" // #nosec G101
	PaymentMethodType_RtpCredit         PaymentMethodType = "rtp-credit"
	PaymentMethodType_CardPayment       PaymentMethodType = "card-payment"
	PaymentMethodType_ApplePay          PaymentMethodType = "apple-pay"
	PaymentMethodType_PushToCard        PaymentMethodType = "push-to-card"
	PaymentMethodType_PullFromCard      PaymentMethodType = "pull-from-card"
)

List of PaymentMethodType

type Phone

type Phone struct {
	Number      string `json:"number,omitempty"`
	CountryCode string `json:"countryCode,omitempty"`
}

Phone struct for Phone

type PlaidLinkRequest

type PlaidLinkRequest struct {
	PublicToken string `json:"publicToken"`
}

type PlaidRequest

type PlaidRequest struct {
	Token string `json:"token"`
}

type PrimaryRegulator added in v0.3.0

type PrimaryRegulator string

PrimaryRegulator If the business is a financial institution, this field describes its primary regulator.

const (
	PrimaryRegulator_OCC  PrimaryRegulator = "OCC"
	PrimaryRegulator_FDIC PrimaryRegulator = "FDIC"
	PrimaryRegulator_NCUA PrimaryRegulator = "NCUA"
	PrimaryRegulator_FRB  PrimaryRegulator = "FRB"
)

List of PrimaryRegulator

type Profile

type Profile struct {
	Individual *Individual `json:"individual,omitempty"`
	Business   *Business   `json:"business,omitempty"`
}

Profile Describes a Moov account profile.

type RTPRejectionCode added in v0.2.0

type RTPRejectionCode string

RTPRejectionCode is a rejection code of an RTP transaction that caused the bank account status to change.

const (
	RTPRejectionCode_AC03 RTPRejectionCode = "AC03" // Account Invalid
	RTPRejectionCode_AC04 RTPRejectionCode = "AC04" // Account Closed
	RTPRejectionCode_AC06 RTPRejectionCode = "AC06" // Account Blocked
	RTPRejectionCode_AC14 RTPRejectionCode = "AC14" // Creditor Account Type Invalid
	RTPRejectionCode_AG01 RTPRejectionCode = "AG01" // Transactions Forbidden On Account
	RTPRejectionCode_AG03 RTPRejectionCode = "AG03" // Transaction Type Not Supported
	RTPRejectionCode_MD07 RTPRejectionCode = "MD07" // Customer Deceased
)

List of RTPRejectionCode

type Rail

type Rail string
var (
	RailAch  Rail = "ach"
	RailWire Rail = "wire"
)

type Recur added in v0.5.0

type Recur struct {
	// If omited the start time for the occurrence will be the timestamp of when the schedule was created.
	Start *time.Time `json:"start,omitempty"`

	// This is the recurrence rule that is used to generate occurrences.
	// Generator available here: https://jkbrzt.github.io/rrule/
	// You can read the details of the format here: https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10
	RecurrenceRule string `json:"recurrenceRule,omitempty"`

	// RunTransfer values to use to create the transfer based on the recurRule
	// When changed, should just modify the transfer of the schedules
	RunTransfer RunTransfer `json:"runTransfer,omitempty"`

	// If the recurrence rule ends up being indefinite
	Indefinite bool `json:"indefinite,omitempty"`
}

https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10

type Refund

type Refund struct {
	RefundID  string       `json:"refundID,omitempty"`
	CreatedOn time.Time    `json:"createdOn,omitempty"`
	UpdatedOn time.Time    `json:"updatedOn,omitempty"`
	Status    RefundStatus `json:"status,omitempty"`
	// This field is deprecated and will be removed in December 2023.
	FailureCode *CardFailureCode   `json:"failureCode,omitempty"`
	Amount      Amount             `json:"amount,omitempty"`
	CardDetails *RefundCardDetails `json:"cardDetails,omitempty"`
}

Refund Details of a card refund.

type RefundCardDetails

type RefundCardDetails struct {
	Status      RefundCardStatus `json:"status,omitempty"`
	FailureCode *CardFailureCode `json:"failureCode,omitempty"`
	InitiatedOn *time.Time       `json:"initiatedOn,omitempty"`
	ConfirmedOn *time.Time       `json:"confirmedOn,omitempty"`
	SettledOn   *time.Time       `json:"settledOn,omitempty"`
	FailedOn    *time.Time       `json:"failedOn,omitempty"`
	CompletedOn *time.Time       `json:"completedOn,omitempty"`
}

RefundCardDetails struct for RefundCardDetails

type RefundCardStatus

type RefundCardStatus string

RefundCardStatus Status of the refund.

const (
	RefundCardStatus_Initiated RefundCardStatus = "initiated"
	RefundCardStatus_Confirmed RefundCardStatus = "confirmed"
	RefundCardStatus_Settled   RefundCardStatus = "settled"
	RefundCardStatus_Failed    RefundCardStatus = "failed"
	RefundCardStatus_Completed RefundCardStatus = "completed"
)

List of RefundCardStatus

type RefundStarted

type RefundStarted struct {
	Transfer
	RefundedTransferID string `otel:"refunded_transfer_id,omitempty"` // original transfer id
}

type RefundStatus

type RefundStatus string

RefundStatus the model 'RefundStatus'

const (
	RefundStatus_Created   RefundStatus = "created"
	RefundStatus_Pending   RefundStatus = "pending"
	RefundStatus_Completed RefundStatus = "completed"
	RefundStatus_Failed    RefundStatus = "failed"
)

List of RefundStatus

type Representative

type Representative struct {
	RepresentativeID string `json:"representativeID,omitempty"`
	Name             Name   `json:"name,omitempty"`
	Phone            *Phone `json:"phone,omitempty"`
	// Email address.
	Email   string   `json:"email,omitempty"`
	Address *Address `json:"address,omitempty"`
	// Indicates whether this representative's birth date has been provided.
	BirthDateProvided bool `json:"birthDateProvided,omitempty"`
	// Indicates whether a government ID (SSN, ITIN, etc.) has been provided for this representative.
	GovernmentIDProvided bool              `json:"governmentIDProvided,omitempty"`
	Responsibilities     *Responsibilities `json:"responsibilities,omitempty"`
	CreatedOn            time.Time         `json:"createdOn,omitempty"`
	UpdatedOn            time.Time         `json:"updatedOn,omitempty"`
	DisabledOn           *time.Time        `json:"disabledOn,omitempty"`
}

Representative Describes a business representative.

type Requirement

type Requirement struct {
	CurrentlyDue []RequirementId    `json:"currentlyDue,omitempty"`
	Errors       []RequirementError `json:"errors,omitempty"`
}

Requirement Represents individual and business data necessary to facilitate the enabling of a capability for an account.

type RequirementError

type RequirementError struct {
	Requirement RequirementId        `json:"requirement,omitempty"`
	ErrorCode   RequirementErrorCode `json:"errorCode,omitempty"`
}

RequirementError Describes an error fulfilling a Requirement

type RequirementErrorCode

type RequirementErrorCode string

RequirementErrorCode the model 'RequirementErrorCode'

const (
	RequirementErrorCode_InvalidValue                RequirementErrorCode = "invalid-value"
	RequirementErrorCode_FailedAutomaticVerification RequirementErrorCode = "failed-automatic-verification"
	RequirementErrorCode_FailedOther                 RequirementErrorCode = "failed-other"
	RequirementErrorCode_InvalidAddress              RequirementErrorCode = "invalid-address"
	RequirementErrorCode_AddressRestricted           RequirementErrorCode = "address-restricted"
	RequirementErrorCode_TaxIdMismatch               RequirementErrorCode = "tax-id-mismatch"
	RequirementErrorCode_DocumentIdMismatch          RequirementErrorCode = "document-id-mismatch"
	RequirementErrorCode_DocumentDateOfBirthMismatch RequirementErrorCode = "document-date-of-birth-mismatch"
	RequirementErrorCode_DocumentNameMismatch        RequirementErrorCode = "document-name-mismatch"
	RequirementErrorCode_DocumentAddressMismatch     RequirementErrorCode = "document-address.mismatch"
	RequirementErrorCode_DocumentNumberMismatch      RequirementErrorCode = "document-number-mismatch"
	RequirementErrorCode_DocumentIncomplete          RequirementErrorCode = "document-incomplete"
	RequirementErrorCode_DocumentFailedRisk          RequirementErrorCode = "document-failed-risk"
	RequirementErrorCode_DocumentIllegible           RequirementErrorCode = "document-illegible"
	RequirementErrorCode_DocumentUnsupported         RequirementErrorCode = "document-unsupported"
	RequirementErrorCode_DocumentNotUploaded         RequirementErrorCode = "document-not-uploaded"
	RequirementErrorCode_DocumentCorrupt             RequirementErrorCode = "document-corrupt"
	RequirementErrorCode_DocumentExpired             RequirementErrorCode = "document-expired"
)

List of RequirementErrorCode

type RequirementId

type RequirementId string

RequirementId The unique ID of what the requirement is asking to be filled out.

const (
	RequirementId_Account_TosAcceptance                    RequirementId = "account.tos-acceptance"
	RequirementId_Individual_Mobile                        RequirementId = "individual.mobile"
	RequirementId_Individual_Email                         RequirementId = "individual.email"
	RequirementId_Individual_EmailOrMobile                 RequirementId = "individual.email-or-mobile"
	RequirementId_Individual_Firstname                     RequirementId = "individual.firstname"
	RequirementId_Individual_Lastname                      RequirementId = "individual.lastname"
	RequirementId_Individual_Address                       RequirementId = "individual.address"
	RequirementId_Individual_SsnLast4                      RequirementId = "individual.ssn-last4"
	RequirementId_Individual_Ssn                           RequirementId = "individual.ssn"
	RequirementId_Individual_BirthDate                     RequirementId = "individual.birthdate"
	RequirementId_Business_LegalName                       RequirementId = "business.legalname"
	RequirementId_Business_DescriptionOrWebsite            RequirementId = "business.description-or-website"
	RequirementId_Business_EntityType                      RequirementId = "business.entity-type"
	RequirementId_Business_Dba                             RequirementId = "business.dba"
	RequirementId_Business_Ein                             RequirementId = "business.ein"
	RequirementId_Business_Address                         RequirementId = "business.address"
	RequirementId_Business_Phone                           RequirementId = "business.phone"
	RequirementId_Business_Admins                          RequirementId = "business.admins"
	RequirementId_Business_Controllers                     RequirementId = "business.controllers"
	RequirementId_Business_Owners                          RequirementId = "business.owners"
	RequirementId_Business_Classification                  RequirementId = "business.classification"
	RequirementId_Business_IndustryCodeMcc                 RequirementId = "business.industry-code-mcc"
	RequirementId_Business_IndicateOwnersProvided          RequirementId = "business.indicate-owners-provided"
	RequirementId_Business_AverageTransactionSize          RequirementId = "business.average-transaction-size"
	RequirementId_Business_MaxTransactionSize              RequirementId = "business.max-transaction-size"
	RequirementId_Business_AverageMonthlyTransactionVolume RequirementId = "business.average-monthly-transaction-volume"
	RequirementId_Business_Description                     RequirementId = "business.description"
	RequirementId_Business_UnderwritingDocumentsTierOne    RequirementId = "business.underwriting-documents-tier-one"
	RequirementId_BankAccounts_Name                        RequirementId = "bank-accounts.name"
	RequirementId_BankAccounts_RoutingNumber               RequirementId = "bank-accounts.routing-number"
	RequirementId_BankAccounts_AccountNumber               RequirementId = "bank-accounts.account-number"
	RequirementId_Representative_Mobile                    RequirementId = "representative.{rep-uuid}.mobile"
	RequirementId_Representative_Email                     RequirementId = "representative.{rep-uuid}.email"
	RequirementId_Representative_EmailOrMobile             RequirementId = "representative.{rep-uuid}.email-or-mobile"
	RequirementId_Representative_Firstname                 RequirementId = "representative.{rep-uuid}.firstname"
	RequirementId_Representative_Lastname                  RequirementId = "representative.{rep-uuid}.lastname"
	RequirementId_Representative_Address                   RequirementId = "representative.{rep-uuid}.address"
	RequirementId_Representative_SsnLast4                  RequirementId = "representative.{rep-uuid}.ssn-last4"
	RequirementId_Representative_Ssn                       RequirementId = "representative.{rep-uuid}.ssn"
	RequirementId_Representative_BirthDate                 RequirementId = "representative.{rep-uuid}.birthdate"
	RequirementId_Representative_JobTitle                  RequirementId = "representative.{rep-uuid}.job-title"
	RequirementId_Representative_IsController              RequirementId = "representative.{rep-uuid}.is-controller"
	RequirementId_Representative_IsOwner                   RequirementId = "representative.{rep-uuid}.is-owner"
	RequirementId_Representative_Ownership                 RequirementId = "representative.{rep-uuid}.ownership"
	RequirementId_Document                                 RequirementId = "document.{doc-uuid}"
)

List of RequirementID

type Responsibilities

type Responsibilities struct {
	// Indicates whether this individual has significant management responsibilities within the business.
	IsController bool `json:"isController"`
	// If `true`, this field indicates that the individual has a business ownership stake of at least 25% in the business. If the representative does not own at least 25% of the business, this field should be `false`.
	IsOwner bool `json:"isOwner"`
	// The percentage of ownership this individual has in the business (required if `isOwner` is `true`).
	OwnershipPercentage int32  `json:"ownershipPercentage"`
	JobTitle            string `json:"jobTitle"`
}

Responsibilities Describes the job responsibilities of an individual.

type ReturnPolicy added in v0.2.0

type ReturnPolicy string
const (
	NONE               ReturnPolicy = "none"
	EXCHANGE_ONLY      ReturnPolicy = "exchangeOnly"
	WITHIN_THIRTY_DAYS ReturnPolicy = "withinThirtyDays"
	OTHER              ReturnPolicy = "other"
)

type RtpDetails

type RtpDetails struct {
	Status RtpStatus `json:"status"`
	// Code returned by rail network on failure.
	NetworkResponseCode      *string         `json:"networkResponseCode,omitempty"`
	FailureCode              *RtpFailureCode `json:"failureCode,omitempty"`
	InitiatedOn              *time.Time      `json:"initiatedOn,omitempty"`
	CompletedOn              *time.Time      `json:"completedOn,omitempty"`
	FailedOn                 *time.Time      `json:"failedOn,omitempty"`
	AcceptedWithoutPostingOn *time.Time      `json:"acceptedWithoutPostingOn,omitempty"`
}

RtpDetails RTP specific details about the transaction.

type RtpFailureCode

type RtpFailureCode string

RtpFailureCode Status codes for RTP failures.

const (
	RtpFailureCode_ProcessingError         RtpFailureCode = "processing-error"
	RtpFailureCode_InvalidAccount          RtpFailureCode = "invalid-account"
	RtpFailureCode_AccountClosed           RtpFailureCode = "account-closed"
	RtpFailureCode_AccountBlocked          RtpFailureCode = "account-blocked"
	RtpFailureCode_InvalidField            RtpFailureCode = "invalid-field"
	RtpFailureCode_TransactionNotSupported RtpFailureCode = "transaction-not-supported"
	RtpFailureCode_LimitExceeded           RtpFailureCode = "limit-exceeded"
	RtpFailureCode_InvalidAmount           RtpFailureCode = "invalid-amount"
	RtpFailureCode_CustomerDeceased        RtpFailureCode = "customer-deceased"
	RtpFailureCode_Other                   RtpFailureCode = "other"
)

List of RTPFailureCode

type RtpStatus

type RtpStatus string

RtpStatus Status of the RTP lifecycle.

const (
	RtpStatus_Initiated              RtpStatus = "initiated"
	RtpStatus_Completed              RtpStatus = "completed"
	RtpStatus_Failed                 RtpStatus = "failed"
	RtpStatus_AcceptedWithoutPosting RtpStatus = "accepted-without-posting"
)

List of RTPStatus

type RunTransfer added in v0.5.0

type RunTransfer struct {
	Description string         `json:"description,omitempty"`
	Amount      ScheduleAmount `json:"amount,omitempty"`

	PartnerAccountID string                `json:"partnerAccountID,omitempty"`
	Source           SchedulePaymentMethod `json:"source,omitempty"`
	Destination      SchedulePaymentMethod `json:"destination,omitempty"`
}

type SSN

type SSN struct {
	Full     string `json:"full,omitempty"`
	LastFour string `json:"lastFour,omitempty"`
}

SSN is an Individual's Social Security Number

type Schedule added in v0.5.0

type Schedule struct {
	// prod or sandbox
	Mode string `json:"mode,omitempty"`

	// Unique ID of the schedule
	ScheduleID string `json:"scheduleID,omitempty"`

	// This is the account ID of the source transfers that the transfer will run using.
	SourceAccountID string `json:"sourceAccountID,omitempty"`

	// This is the destination ID of the destination transfers that the transfer will run using.
	DestinationAccountID string `json:"destinationAccountID,omitempty"`

	// This is the partner ID that the transfer will run using.
	PartnerAccountID string `json:"partnerAccountID,omitempty"`

	// AccountID of the account that created it and is allowed to update it.
	OwnerAccountID string `json:"ownerAccountID,omitempty"`

	// Description of what this schedule is
	Description string `json:"description,omitempty"`

	// If specified will generate Scheduled transfers based on its configuration
	Recur *Recur `json:"recur,omitempty"`

	// List of all generated and manually added transfers to be made.
	Occurrences []Occurrence `json:"occurrences,omitempty"`

	// Date created
	CreatedOn time.Time `json:"createdOn,omitempty"`

	// Date it was last updated for any reason
	UpdatedOn time.Time `json:"updatedOn,omitempty"`

	// When schedule has been disabled and all occurrences canceled
	DisabledOn *time.Time `json:"disabledOn,omitempty"`
}

func (Schedule) ToUpdateSchedule added in v0.5.0

func (s Schedule) ToUpdateSchedule() UpdateSchedule

type ScheduleAchDetails added in v0.5.0

type ScheduleAchDetails struct {
	CompanyEntryDescription *string `json:"companyEntryDescription,omitempty"`
	OriginatingCompanyName  *string `json:"originatingCompanyName,omitempty"`
}

type ScheduleAmount added in v0.5.0

type ScheduleAmount struct {
	Value    int64  `json:"value,omitempty"`
	Currency string `json:"currency,omitempty"`
}

type ScheduleCardDetails added in v0.5.0

type ScheduleCardDetails struct {
	DynamicDescriptor *string `json:"dynamicDescriptor,omitempty"`
}

type SchedulePaymentMethod added in v0.5.0

type SchedulePaymentMethod struct {
	PaymentMethodID string `json:"paymentMethodID,omitempty"`

	AchDetails  *ScheduleAchDetails  `json:"achDetails,omitempty"`
	CardDetails *ScheduleCardDetails `json:"cardDetails,omitempty"`
}

type ScopeBuilder

type ScopeBuilder func(sb *scopeBuilder) error

type SecCode

type SecCode string

SecCode Code used to identify the ACH authorization method.

const (
	SecCode_WEB SecCode = "WEB"
	SecCode_PPD SecCode = "PPD"
	SecCode_CCD SecCode = "CCD"
	SecCode_TEL SecCode = "TEL"
)

List of SECCode

type StartApplePaySession

type StartApplePaySession struct {
	Domain      string `json:"domain"`
	DisplayName string `json:"displayName"`
}

type Sweep added in v0.5.0

type Sweep struct {
	SweepID             string      `json:"sweepID,omitempty"`
	Status              SweepStatus `json:"status,omitempty"`
	AccrualStartedOn    time.Time   `json:"accrualStartedOn,omitempty"`
	AccrualEndedOn      *time.Time  `json:"accrualEndedOn,omitempty"`
	PushPaymentMethodID string      `json:"pushPaymentMethodID,omitempty"`
	PullPaymentMethodID string      `json:"pullPaymentMethodID,omitempty"`
	// The total net Amount of wallet transactions accrued in the sweep.
	// A decimal-formatted numerical string that represents up to 9 decimal place precision.
	AccruedAmount string `json:"accruedAmount,omitempty"`
	// A 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`
	// Only set after the sweep transfer has been created.
	TransferID string `json:"transferID,omitempty"`
	// Only set after the sweep transfer has been created.
	// A decimal-formatted numerical string that represents up to 9 decimal place precision.
	TransferAmount string `json:"transferAmount,omitempty"`
	// Amount remaining in the wallet after the sweep transfer completes.
	// A decimal-formatted numerical string that represents up to 9 decimal place precision.
	ResidualBalance string `json:"residualBalance,omitempty"`
	// The text that appears on the banking statement.
	// The default descriptor is a 10 character ID if an override is not set in the sweep configs statementDescriptor.
	StatementDescriptor string `json:"statementDescriptor,omitempty"`
}

type SweepConfig added in v0.5.0

type SweepConfig struct {
	SweepConfigID string            `json:"sweepConfigID"`
	WalletID      string            `json:"walletID"`
	Status        SweepConfigStatus `json:"status"`
	// The payment method used to push funds to a bank account. `ach-credit-standard` or `ach-credit-same-day` is required.
	PushPaymentMethod SweepConfigPaymentMethod `json:"pushPaymentMethod"`
	// The payment method used to pull funds from a bank account. An `ach-debit-fund` payment method is required.
	PullPaymentMethod SweepConfigPaymentMethod `json:"pullPaymentMethod"`
	// An optional field to specify an amount to maintain in the wallet. This is a decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99. If not supplied, the default is 0.00.
	MinimumBalance *string `json:"minimumBalance"`
	// An optional override of the default NACHA company entry description for sweep transfers.
	StatementDescriptor *string `json:"statementDescriptor,omitempty"`
	// An array of fields that are locked. To request updates, please contact Moov support.
	LockedFields []string   `json:"lockedFields,omitempty"`
	CreatedOn    time.Time  `json:"createdOn"`
	UpdatedOn    time.Time  `json:"updatedOn"`
	DisabledOn   *time.Time `json:"disabledOn,omitempty"`
}

type SweepConfigPaymentMethod added in v0.5.0

type SweepConfigPaymentMethod struct {
	PaymentMethodID string     `json:"paymentMethodID"`
	DisabledOn      *time.Time `json:"disabledOn,omitempty"`
}

type SweepConfigStatus added in v0.5.0

type SweepConfigStatus string
const (
	SweepConfigStatus_Enabled  SweepConfigStatus = "enabled"
	SweepConfigStatus_Disabled SweepConfigStatus = "disabled"
)

type SweepStatus added in v0.5.0

type SweepStatus string
const (
	SweepStatus_Accruing       SweepStatus = "accruing"
	SweepStatus_ActionRequired SweepStatus = "action-required"
	SweepStatus_Canceled       SweepStatus = "canceled"
	SweepStatus_Closed         SweepStatus = "closed"
	SweepStatus_Failed         SweepStatus = "failed"
	SweepStatus_Paid           SweepStatus = "paid"
)

type TaxID

type TaxID struct {
	EIN EIN `json:"ein,omitempty"`
}

type TermsOfService

type TermsOfService struct {
	AcceptedDate time.Time `json:"acceptedDate"`
	AcceptedIP   string    `json:"acceptedIP"`
}

TermsOfService Describes the acceptance of the Terms of Service.

type TermsOfServiceManual

type TermsOfServiceManual struct {
	AcceptanceIP        string    `json:"acceptedIP"`
	AcceptanceDomain    string    `json:"acceptedDomain"`
	AcceptanceUserAgent string    `json:"acceptedUserAgent"`
	AcceptanceDate      time.Time `json:"acceptedDate"`
}

type TermsOfServicePayload

type TermsOfServicePayload struct {
	Token  string                `json:"token,omitempty"`
	Manual *TermsOfServiceManual `json:"manual,omitempty"`
}

type TransactionSource

type TransactionSource string

TransactionSource Specifies the nature and initiator of a transaction. Crucial for recurring and merchant-initiated transactions as per card scheme rules. Omit for customer-initiated e-commerce transactions. - `first-recurring`: Initial transaction in a recurring series or saving a card for future merchant-initiated charges - `recurring`: Regular, merchant-initiated scheduled transactions - `unscheduled`: Non-regular, merchant-initiated transactions like account top-ups

const (
	TransactionSource_FirstRecurring TransactionSource = "first-recurring"
	TransactionSource_Recurring      TransactionSource = "recurring"
	TransactionSource_Unscheduled    TransactionSource = "unscheduled"
)

// List of TransactionSource

type Transfer

type Transfer struct {
	TransferID    string         `json:"transferID,omitempty"`
	CreatedOn     time.Time      `json:"createdOn,omitempty"`
	CompletedOn   *time.Time     `json:"completedOn,omitempty"`
	Status        TransferStatus `json:"status,omitempty"`
	FailureReason *FailureReason `json:"failureReason,omitempty"`
	Amount        Amount         `json:"amount,omitempty"`

	Source      TransferSource      `json:"source,omitempty"`
	Destination TransferDestination `json:"destination,omitempty"`

	// A description of the transfer.
	Description string `json:"description,omitempty"`
	// Free-form key-value pair list. Useful for storing information that is not captured elsewhere.
	Metadata       map[string]string  `json:"metadata,omitempty"`
	FacilitatorFee *GetFacilitatorFee `json:"facilitatorFee,omitempty"`
	// Fees charged to your platform account for transfers.
	MoovFee *int64 `json:"moovFee,omitempty"`
	// Same as `moovFee`, but a decimal-formatted numerical string that represents up to 9 decimal place precision.
	MoovFeeDecimal string          `json:"moovFeeDecimal,omitempty"`
	MoovFeeDetails *MoovFeeDetails `json:"moovFeeDetails,omitempty"`

	// ID for all transfers associated with a [transfer group](https://docs.moov.io/guides/money-movement/transfer-groups/).
	GroupID *string `json:"groupID,omitempty"`
	// ID of the associated sweep sweep.
	SweepID *string `json:"sweepID,omitempty"`
	// ID of the associated schedule.
	ScheduleID *string `json:"scheduleID,omitempty"`
	// ID of the associated occurrence.
	OccurrenceID *string `json:"occurrenceID,omitempty"`
	// The total refunded amount for a card transfer, representing one refunded amount, or multiple partial refunded amounts. Contains an integer value and its currency. See the `refunds` array for additional details.
	RefundedAmount *Amount `json:"refundedAmount,omitempty"`
	// A list of refunds for a card transfer.
	Refunds []Refund `json:"refunds,omitempty"`
	// The total disputed amount for a card transfer.
	DisputedAmount *Amount `json:"disputedAmount,omitempty"`
	// A list of disputes for a card transfer.
	Disputes []GetDispute `json:"disputes,omitempty"`
	// A list of cancellations for a transfer.
	Cancellations []Cancellation `json:"cancellations,omitempty"`
}

Transfer struct for Transfer

type TransferAccount

type TransferAccount struct {
	// ID of account.
	AccountID string `json:"accountID,omitempty"`
	// Email address.
	Email       string `json:"email,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
}

TransferAccount struct for TransferAccount

type TransferDestination

type TransferDestination struct {
	PaymentMethodID   string                    `json:"paymentMethodID,omitempty"`
	PaymentMethodType PaymentMethodType         `json:"paymentMethodType,omitempty"`
	Account           TransferAccount           `json:"account,omitempty"`
	BankAccount       *BankAccountPaymentMethod `json:"bankAccount,omitempty"`
	Wallet            *WalletPaymentMethod      `json:"wallet,omitempty"`
	Card              *CardPaymentMethod        `json:"card,omitempty"`
	ApplePay          *ApplePayPaymentMethod    `json:"applePay,omitempty"`
	AchDetails        *AchDetails               `json:"achDetails,omitempty"`
	CardDetails       *CardDetails              `json:"cardDetails,omitempty"`
	RtpDetails        *RtpDetails               `json:"rtpDetails,omitempty"`
}

TransferDestination struct for TransferDestination

type TransferOptions

type TransferOptions struct {
	SourceOptions      []PaymentMethod `json:"sourceOptions,omitempty"`
	DestinationOptions []PaymentMethod `json:"destinationOptions,omitempty"`
}

CreatedTransferOptions struct for CreatedTransferOptions

type TransferPatcher

type TransferPatcher func(patch *patchTransfer)

func PatchTransferMetadata

func PatchTransferMetadata(metadata map[string]string) TransferPatcher

type TransferSource

type TransferSource struct {
	PaymentMethodID   string                    `json:"paymentMethodID,omitempty"`
	PaymentMethodType PaymentMethodType         `json:"paymentMethodType,omitempty"`
	Account           TransferAccount           `json:"account,omitempty"`
	BankAccount       *BankAccountPaymentMethod `json:"bankAccount,omitempty"`
	Wallet            *WalletPaymentMethod      `json:"wallet,omitempty"`
	Card              *CardPaymentMethod        `json:"card,omitempty"`
	ApplePay          *ApplePayPaymentMethod    `json:"applePay,omitempty"`
	AchDetails        *AchDetailsSource         `json:"achDetails,omitempty"`
	CardDetails       *CardDetails              `json:"cardDetails,omitempty"`
	TransferID        string                    `json:"transferID,omitempty"`
}

TransferSource struct for TransferSource

type TransferStarted

type TransferStarted struct {
	// Identifier for the transfer.
	TransferID string    `json:"transferID,omitempty"`
	CreatedOn  time.Time `json:"createdOn,omitempty"`
}

TransferStarted is where the request to create a transfer was recorded and kicked off but hasn't completed yet

type TransferStatus

type TransferStatus string

TransferStatus Current status of a transfer.

const (
	TransferStatus_Created   TransferStatus = "created"
	TransferStatus_Pending   TransferStatus = "pending"
	TransferStatus_Completed TransferStatus = "completed"
	TransferStatus_Failed    TransferStatus = "failed"
	TransferStatus_Reversed  TransferStatus = "reversed"
	TransferStatus_Queued    TransferStatus = "queued"
	TransferStatus_Canceled  TransferStatus = "canceled"
)

List of TransferStatus

type Underwriting added in v0.2.0

type Underwriting struct {
	AverageTransactionSize          int64                  `json:"averageTransactionSize"`
	MaxTransactionSize              int64                  `json:"maxTransactionSize"`
	AverageMonthlyTransactionVolume int64                  `json:"averageMonthlyTransactionVolume"`
	Status                          UnderwritingStatus     `json:"status"`
	VolumeByCustomerType            VolumeByCustomerType   `json:"volumeByCustomerType"`
	CardVolumeDistribution          CardVolumeDistribution `json:"cardVolumeDistribution"`
	Fulfillment                     Fulfillment            `json:"fulfillment"`
}

type UnderwritingStatus added in v0.2.0

type UnderwritingStatus string
const (
	UnderwritingStatusApproved      UnderwritingStatus = "approved"
	UnderwritingStatusRejected      UnderwritingStatus = "rejected"
	UnderwritingStatusPendingReview UnderwritingStatus = "pendingReview"
	UnderwritingStatusPending       UnderwritingStatus = "pending"
	UnderwritingStatusNotRequested  UnderwritingStatus = "notRequested"
)

type UpdateOccurrence added in v0.5.0

type UpdateOccurrence struct {
	// Leave empty to add a new occurrence or set to the ID of the occurrence to change.
	OccurrenceID *string `json:"occurrenceID,omitempty"`

	// RunTransfer details that will be used.
	RunTransfer RunTransfer `json:"runTransfer,omitempty"`

	// Time to kick off the run. Normalize to UTC.
	RunOn time.Time `json:"runOn,omitempty"`

	// If nil, canceledOn will be unchanged. If set true, it will be canceled. If set false and hasn't ran yet it will be resumed
	Canceled *bool `json:"canceled,omitempty"`
}

type UpdateRepresentative added in v0.2.0

type UpdateRepresentative struct {
	Name             Name              `json:"name"`
	Phone            *Phone            `json:"phone,omitempty"`
	Email            string            `json:"email,omitempty"`
	Address          *Address          `json:"address,omitempty"`
	BirthDate        *Date             `json:"birthDate,omitempty"`
	GovernmentID     *GovernmentID     `json:"governmentID,omitempty"`
	Responsibilities *Responsibilities `json:"responsibilities,omitempty"`
}

type UpdateSchedule added in v0.5.0

type UpdateSchedule struct {
	// Description of what this schedule is
	Description string `json:"description,omitempty"`

	// If specified will generate Scheduled transfers based on its configuration
	Recur *Recur `json:"recur,omitempty"`

	// On creating the schedule we can use these occurrences as they planned the schedule
	Occurrences []UpdateOccurrence `json:"occurrences,omitempty"`
}

type UpdateSweepConfig added in v0.5.0

type UpdateSweepConfig struct {
	AccountID           string             `json:"-"`
	SweepConfigID       string             `json:"-"`
	Status              *SweepConfigStatus `json:"status,omitempty"`
	PushPaymentMethodID *string            `json:"pushPaymentMethodID,omitempty"`
	PullPaymentMethodID *string            `json:"pullPaymentMethodID,omitempty"`
	// An optional override of the default NACHA company entry description for sweep transfers.
	StatementDescriptor *string `json:"statementDescriptor,omitempty"`
	// An optional field to specify an amount to maintain in the wallet. This is a decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99. If not supplied, the default is 0.00.
	MinimumBalance *string `json:"minimumBalance,omitempty"`
}

type UpdateUnderwriting added in v0.2.0

type UpdateUnderwriting struct {
	AverageTransactionSize          int64                  `json:"averageTransactionSize"`
	MaxTransactionSize              int64                  `json:"maxTransactionSize"`
	AverageMonthlyTransactionVolume int64                  `json:"averageMonthlyTransactionVolume"`
	VolumeByCustomerType            VolumeByCustomerType   `json:"volumeByCustomerType"`
	CardVolumeDistribution          CardVolumeDistribution `json:"cardVolumeDistribution"`
	Fulfillment                     Fulfillment            `json:"fulfillment"`
}

type UploadFile

type UploadFile struct {
	FilePurpose FilePurpose
	Metadata    map[string]string

	Filename string
	File     io.Reader
}

type Verification

type Verification struct {
	VerificationStatus AccountVerificationStatus `json:"verificationStatus,omitempty"`
	Status             VerificationStatus        `json:"status"`
	Details            VerificationStatusDetails `json:"details,omitempty"`
	Documents          []Document                `json:"documents,omitempty"`
}

Verification Describes identity verification status and relevant identity verification documents.

type VerificationStatus

type VerificationStatus string

VerificationStatus This field is deprecated but available for use until February 2023.

const (
	VerificationStatus_Unverified VerificationStatus = "unverified"
	VerificationStatus_Pending    VerificationStatus = "pending"
	VerificationStatus_Verified   VerificationStatus = "verified"
	VerificationStatus_Errored    VerificationStatus = "errored"
)

List of VerificationStatus

type VerificationStatusDetails

type VerificationStatusDetails string

VerificationStatusDetails This field is deprecated but available for use until February 2023.

const (
	VerificationStatusDetails_FailedAutoVerify                      VerificationStatusDetails = "failedAutoVerify"
	VerificationStatusDetails_DocumentDobMismatch                   VerificationStatusDetails = "docDobMismatch"
	VerificationStatusDetails_DocumentNameMismatch                  VerificationStatusDetails = "docNameMismatch"
	VerificationStatusDetails_DocumentAddressMismatch               VerificationStatusDetails = "docAddressMismatch"
	VerificationStatusDetails_DocumentNumberMismatch                VerificationStatusDetails = "docNumberMismatch"
	VerificationStatusDetails_DocumentIncomplete                    VerificationStatusDetails = "docIncomplete"
	VerificationStatusDetails_DocumentFailedRisk                    VerificationStatusDetails = "docFailedRisk"
	VerificationStatusDetails_PotentialAccountSanctionsMatch        VerificationStatusDetails = "potentialAccountSanctionsMatch"
	VerificationStatusDetails_PotentialRepresentativeSanctionsMatch VerificationStatusDetails = "potentialRepresentativeSanctionsMatch"
	VerificationStatusDetails_FailedOther                           VerificationStatusDetails = "failedOther"
)

List of VerificationStatusDetails

type VolumeByCustomerType added in v0.2.0

type VolumeByCustomerType struct {
	BusinessToBusinessPercentage int32 `json:"businessToBusinessPercentage"`
	ConsumerToBusinessPercentage int32 `json:"consumerToBusinessPercentage"`
}

type Wallet

type Wallet struct {
	WalletID         string           `json:"walletID,omitempty"`
	AvailableBalance AvailableBalance `json:"availableBalance,omitempty"`
}

type WalletPaymentMethod

type WalletPaymentMethod struct {
	WalletID string `json:"walletID,omitempty"`
}

WalletPaymentMethod A Moov wallet to store funds for transfers.

type WalletTransaction added in v0.8.0

type WalletTransaction struct {
	WalletID                string                      `json:"walletID,omitempty"`
	TransactionID           string                      `json:"transactionID,omitempty"`
	TransactionType         WalletTransactionType       `json:"transactionType,omitempty"`
	SourceType              WalletTransactionSourceType `json:"sourceType,omitempty"`
	SourceID                string                      `json:"sourceID,omitempty"`
	Status                  WalletTransactionStatus     `json:"status,omitempty"`
	Memo                    string                      `json:"memo,omitempty"`
	CreatedOn               time.Time                   `json:"createdOn,omitempty"`
	CompletedOn             time.Time                   `json:"completedOn,omitempty"`
	Currency                string                      `json:"currency,omitempty"`
	GrossAmount             int                         `json:"grossAmount,omitempty"`
	GrossAmountDecimal      string                      `json:"grossAmountDecimal,omitempty"`
	Fee                     int                         `json:"fee,omitempty"`
	FeeDecimal              string                      `json:"feeDecimal,omitempty"`
	NetAmount               int                         `json:"netAmount,omitempty"`
	NetAmountDecimal        string                      `json:"netAmountDecimal,omitempty"`
	AvailableBalance        int                         `json:"availableBalance,omitempty"`
	AvailableBalanceDecimal string                      `json:"availableBalanceDecimal,omitempty"`
	SweepID                 *string                     `json:"sweepID,omitempty"`
}

type WalletTransactionSourceType added in v0.8.0

type WalletTransactionSourceType string
const (
	WalletTransactionSourceTypeTransfer               WalletTransactionSourceType = "transfer"
	WalletTransactionSourceTypeDispute                WalletTransactionSourceType = "dispute"
	WalletTransactionSourceTypeIssuingCardTransaction WalletTransactionSourceType = "issuing-card-transaction"
	WalletTransactionSourceTypeIssuingAuthorization   WalletTransactionSourceType = "issuing-authorization"
	WalletTransactionSourceTypeSweep                  WalletTransactionSourceType = "sweep"
)

type WalletTransactionStatus added in v0.2.0

type WalletTransactionStatus string
const (
	WalletTransactionStatus_Pending   WalletTransactionStatus = "pending"
	WalletTransactionStatus_Completed WalletTransactionStatus = "completed"
	WalletTransactionStatus_Canceled  WalletTransactionStatus = "canceled"
	WalletTransactionStatus_Failed    WalletTransactionStatus = "failed"
)

type WalletTransactionType added in v0.8.0

type WalletTransactionType string
const (
	WalletTransactionTypeAccountFunding               WalletTransactionType = "account-funding"
	WalletTransactionTypeAchReversal                  WalletTransactionType = "ach-reversal"
	WalletTransactionTypeAutoSweep                    WalletTransactionType = "auto-sweep"
	WalletTransactionTypeCardPayment                  WalletTransactionType = "card-payment"
	WalletTransactionTypeCardDecline                  WalletTransactionType = "card-decline"
	WalletTransactionTypeCardReversal                 WalletTransactionType = "card-reversal"
	WalletTransactionTypeCashOut                      WalletTransactionType = "cash-out"
	WalletTransactionTypeDispute                      WalletTransactionType = "dispute"
	WalletTransactionTypeDisputeReversal              WalletTransactionType = "dispute-reversal"
	WalletTransactionTypeFacilitatorFee               WalletTransactionType = "facilitator-fee"
	WalletTransactionTypeIssuingRefund                WalletTransactionType = "issuing-refund"
	WalletTransactionTypeIssuingTransaction           WalletTransactionType = "issuing-transaction"
	WalletTransactionTypeIssuingTransactionAdjustment WalletTransactionType = "issuing-transaction-adjustment"
	WalletTransactionTypeIssuingAuthHold              WalletTransactionType = "issuing-auth-hold"
	WalletTransactionTypeIssuingAuthRelease           WalletTransactionType = "issuing-auth-release"
	WalletTransactionTypeIssuingDecline               WalletTransactionType = "issuing-decline"
	WalletTransactionTypeMoovFee                      WalletTransactionType = "moov-fee"
	WalletTransactionTypePayment                      WalletTransactionType = "payment"
	WalletTransactionTypePayout                       WalletTransactionType = "payout"
	WalletTransactionTypeRefund                       WalletTransactionType = "refund"
	WalletTransactionTypeRefundFailure                WalletTransactionType = "refund-failure"
	WalletTransactionTypeRtpFailure                   WalletTransactionType = "rtp-failure"
	WalletTransactionTypeTopUp                        WalletTransactionType = "top-up"
	WalletTransactionTypeWalletTransfer               WalletTransactionType = "wallet-transfer"
)

type WireLocation

type WireLocation struct {
	City  string `json:"city,omitempty"`
	State string `json:"state,omitempty"`
}

type WireParticipant

type WireParticipant struct {
	RoutingNumber                     string       `json:"routingNumber,omitempty"`
	TelegraphicName                   string       `json:"telegraphicName,omitempty"`
	CustomerName                      string       `json:"customerName,omitempty"`
	Location                          WireLocation `json:"location,omitempty"`
	FundsTransferStatus               string       `json:"fundsTransferStatus,omitempty"`
	FundsSettlementOnlyStatus         string       `json:"fundsSettlementOnlyStatus,omitempty"`
	BookEntrySecuritiesTransferStatus string       `json:"bookEntrySecuritiesTransferStatus,omitempty"`
	Date                              string       `json:"date,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL