Documentation ¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AccountConfiguration
- type AccountConfigurationAccountHolder
- type AccountConfigurationSpendLimit
- type AccountConfigurationState
- type AccountConfigurationVerificationAddress
- type AccountCreditConfigurationService
- type AccountCreditConfigurationUpdateParams
- type AccountService
- type AccountUpdateParams
- type AccountUpdateParamsState
- type AccountUpdateParamsVerificationAddress
- type BusinessAccount
- type BusinessAccountCollectionsConfiguration
- type Card
- type CardFinancialTransactionService
- type CardFunding
- type CardFundingState
- type CardFundingType
- type CardNewParams
- type CardNewParamsCarrier
- type CardNewParamsShippingAddress
- type CardNewParamsShippingMethod
- type CardNewParamsSpendLimitDuration
- type CardNewParamsState
- type CardNewParamsType
- type CardProvisionParams
- type CardProvisionParamsDigitalWallet
- type CardProvisionResponse
- type CardService
- func (r *CardService) Get(ctx context.Context, cardToken string, opts ...option.RequestOption) (res *Card, err error)
- func (r *CardService) New(ctx context.Context, params CardNewParams, opts ...option.RequestOption) (res *Card, err error)
- func (r *CardService) Provision(ctx context.Context, cardToken string, params CardProvisionParams, ...) (res *CardProvisionResponse, err error)
- func (r *CardService) Update(ctx context.Context, cardToken string, body CardUpdateParams, ...) (res *Card, err error)
- type CardSpendLimitDuration
- type CardState
- type CardType
- type CardUpdateParams
- type CardUpdateParamsSpendLimitDuration
- type CardUpdateParamsState
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Error
- type FinancialTransaction
- type FinancialTransactionCategory
- type FinancialTransactionEvent
- type FinancialTransactionEventsResult
- type FinancialTransactionEventsType
- type FinancialTransactionResult
- type FinancialTransactionStatus
- type StatusListResponse
- type StatusService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AccountConfiguration ¶
type AccountConfiguration struct { // Globally unique identifier for the account. This is the same as the // account_token returned by the enroll endpoint. If using this parameter, do not // include pagination. Token string `json:"token,required" format:"uuid"` // Spend limit information for the user containing the daily, monthly, and lifetime // spend limit of the account. Any charges to a card owned by this account will be // declined once their transaction volume has surpassed the value in the applicable // time limit (rolling). A lifetime limit of 0 indicates that the lifetime limit // feature is disabled. SpendLimit AccountConfigurationSpendLimit `json:"spend_limit,required"` // Account state: // // - `ACTIVE` - Account is able to transact and create new cards. // - `PAUSED` - Account will not be able to transact or create new cards. It can be // set back to `ACTIVE`. // - `CLOSED` - Account will permanently not be able to transact or create new // cards. State AccountConfigurationState `json:"state,required"` AccountHolder AccountConfigurationAccountHolder `json:"account_holder"` // List of identifiers for the Auth Rule(s) that are applied on the account. AuthRuleTokens []string `json:"auth_rule_tokens"` VerificationAddress AccountConfigurationVerificationAddress `json:"verification_address"` JSON accountConfigurationJSON `json:"-"` }
func (*AccountConfiguration) UnmarshalJSON ¶
func (r *AccountConfiguration) UnmarshalJSON(data []byte) (err error)
type AccountConfigurationAccountHolder ¶
type AccountConfigurationAccountHolder struct { // Globally unique identifier for the account holder. Token string `json:"token,required"` // Only applicable for customers using the KYC-Exempt workflow to enroll authorized // users of businesses. Account_token of the enrolled business associated with an // enrolled AUTHORIZED_USER individual. BusinessAccountToken string `json:"business_account_token,required"` // Email address. Email string `json:"email,required"` // Phone number of the individual. PhoneNumber string `json:"phone_number,required"` JSON accountConfigurationAccountHolderJSON `json:"-"` }
func (*AccountConfigurationAccountHolder) UnmarshalJSON ¶
func (r *AccountConfigurationAccountHolder) UnmarshalJSON(data []byte) (err error)
type AccountConfigurationSpendLimit ¶
type AccountConfigurationSpendLimit struct { // Daily spend limit (in cents). Daily int64 `json:"daily,required"` // Total spend limit over account lifetime (in cents). Lifetime int64 `json:"lifetime,required"` // Monthly spend limit (in cents). Monthly int64 `json:"monthly,required"` JSON accountConfigurationSpendLimitJSON `json:"-"` }
Spend limit information for the user containing the daily, monthly, and lifetime spend limit of the account. Any charges to a card owned by this account will be declined once their transaction volume has surpassed the value in the applicable time limit (rolling). A lifetime limit of 0 indicates that the lifetime limit feature is disabled.
func (*AccountConfigurationSpendLimit) UnmarshalJSON ¶
func (r *AccountConfigurationSpendLimit) UnmarshalJSON(data []byte) (err error)
type AccountConfigurationState ¶
type AccountConfigurationState string
Account state:
- `ACTIVE` - Account is able to transact and create new cards.
- `PAUSED` - Account will not be able to transact or create new cards. It can be set back to `ACTIVE`.
- `CLOSED` - Account will permanently not be able to transact or create new cards.
const ( AccountConfigurationStateActive AccountConfigurationState = "ACTIVE" AccountConfigurationStatePaused AccountConfigurationState = "PAUSED" AccountConfigurationStateClosed AccountConfigurationState = "CLOSED" )
func (AccountConfigurationState) IsKnown ¶
func (r AccountConfigurationState) IsKnown() bool
type AccountConfigurationVerificationAddress ¶
type AccountConfigurationVerificationAddress struct { // Valid deliverable address (no PO boxes). Address1 string `json:"address1,required"` // City name. City string `json:"city,required"` // Country name. Only USA is currently supported. Country string `json:"country,required"` // Valid postal code. Only USA ZIP codes are currently supported, entered as a // five-digit ZIP or nine-digit ZIP+4. PostalCode string `json:"postal_code,required"` // Valid state code. Only USA state codes are currently supported, entered in // uppercase ISO 3166-2 two-character format. State string `json:"state,required"` // Unit or apartment number (if applicable). Address2 string `json:"address2"` JSON accountConfigurationVerificationAddressJSON `json:"-"` }
func (*AccountConfigurationVerificationAddress) UnmarshalJSON ¶
func (r *AccountConfigurationVerificationAddress) UnmarshalJSON(data []byte) (err error)
type AccountCreditConfigurationService ¶
type AccountCreditConfigurationService struct {
Options []option.RequestOption
}
AccountCreditConfigurationService contains methods and other services that help with interacting with the meorphis-test-46 API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountCreditConfigurationService method instead.
func NewAccountCreditConfigurationService ¶
func NewAccountCreditConfigurationService(opts ...option.RequestOption) (r *AccountCreditConfigurationService)
NewAccountCreditConfigurationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountCreditConfigurationService) Get ¶
func (r *AccountCreditConfigurationService) Get(ctx context.Context, accountToken string, opts ...option.RequestOption) (res *BusinessAccount, err error)
Get an Account's credit configuration
func (*AccountCreditConfigurationService) Update ¶
func (r *AccountCreditConfigurationService) Update(ctx context.Context, accountToken string, body AccountCreditConfigurationUpdateParams, opts ...option.RequestOption) (res *BusinessAccount, err error)
Update a Business Accounts credit configuration
type AccountCreditConfigurationUpdateParams ¶
type AccountCreditConfigurationUpdateParams struct { // Number of days within the billing period BillingPeriod param.Field[int64] `json:"billing_period"` // Credit limit extended to the Business Account CreditLimit param.Field[int64] `json:"credit_limit"` // The external bank account token to use for auto-collections ExternalBankAccountToken param.Field[string] `json:"external_bank_account_token" format:"uuid"` // Number of days after the billing period ends that a payment is required PaymentPeriod param.Field[int64] `json:"payment_period"` }
func (AccountCreditConfigurationUpdateParams) MarshalJSON ¶
func (r AccountCreditConfigurationUpdateParams) MarshalJSON() (data []byte, err error)
type AccountService ¶
type AccountService struct { Options []option.RequestOption CreditConfiguration *AccountCreditConfigurationService }
AccountService contains methods and other services that help with interacting with the meorphis-test-46 API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r *AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, accountToken string, opts ...option.RequestOption) (res *AccountConfiguration, err error)
Get account configuration such as spend limits.
func (*AccountService) Update ¶
func (r *AccountService) Update(ctx context.Context, accountToken string, body AccountUpdateParams, opts ...option.RequestOption) (res *AccountConfiguration, err error)
Update account configuration such as spend limits and verification address. Can only be run on accounts that are part of the program managed by this API key.
Accounts that are in the `PAUSED` state will not be able to transact or create new cards.
type AccountUpdateParams ¶
type AccountUpdateParams struct { // Amount (in cents) for the account's daily spend limit. By default the daily // spend limit is set to $1,250. DailySpendLimit param.Field[int64] `json:"daily_spend_limit"` // Amount (in cents) for the account's lifetime spend limit. Once this limit is // reached, no transactions will be accepted on any card created for this account // until the limit is updated. Note that a spend limit of 0 is effectively no // limit, and should only be used to reset or remove a prior limit. Only a limit of // 1 or above will result in declined transactions due to checks against the // account limit. This behavior differs from the daily spend limit and the monthly // spend limit. LifetimeSpendLimit param.Field[int64] `json:"lifetime_spend_limit"` // Amount (in cents) for the account's monthly spend limit. By default the monthly // spend limit is set to $5,000. MonthlySpendLimit param.Field[int64] `json:"monthly_spend_limit"` // Account states. State param.Field[AccountUpdateParamsState] `json:"state"` // Address used during Address Verification Service (AVS) checks during // transactions if enabled via Auth Rules. VerificationAddress param.Field[AccountUpdateParamsVerificationAddress] `json:"verification_address"` }
func (AccountUpdateParams) MarshalJSON ¶
func (r AccountUpdateParams) MarshalJSON() (data []byte, err error)
type AccountUpdateParamsState ¶
type AccountUpdateParamsState string
Account states.
const ( AccountUpdateParamsStateActive AccountUpdateParamsState = "ACTIVE" AccountUpdateParamsStatePaused AccountUpdateParamsState = "PAUSED" )
func (AccountUpdateParamsState) IsKnown ¶
func (r AccountUpdateParamsState) IsKnown() bool
type AccountUpdateParamsVerificationAddress ¶
type AccountUpdateParamsVerificationAddress struct { Address1 param.Field[string] `json:"address1"` Address2 param.Field[string] `json:"address2"` City param.Field[string] `json:"city"` Country param.Field[string] `json:"country"` PostalCode param.Field[string] `json:"postal_code"` State param.Field[string] `json:"state"` }
Address used during Address Verification Service (AVS) checks during transactions if enabled via Auth Rules.
func (AccountUpdateParamsVerificationAddress) MarshalJSON ¶
func (r AccountUpdateParamsVerificationAddress) MarshalJSON() (data []byte, err error)
type BusinessAccount ¶
type BusinessAccount struct { // Account token Token string `json:"token,required" format:"uuid"` CollectionsConfiguration BusinessAccountCollectionsConfiguration `json:"collections_configuration"` // Credit limit extended to the Account CreditLimit int64 `json:"credit_limit"` JSON businessAccountJSON `json:"-"` }
func (*BusinessAccount) UnmarshalJSON ¶
func (r *BusinessAccount) UnmarshalJSON(data []byte) (err error)
type BusinessAccountCollectionsConfiguration ¶
type BusinessAccountCollectionsConfiguration struct { // Number of days within the billing period BillingPeriod int64 `json:"billing_period,required"` // Number of days after the billing period ends that a payment is required PaymentPeriod int64 `json:"payment_period,required"` // The external bank account token to use for auto-collections ExternalBankAccountToken string `json:"external_bank_account_token" format:"uuid"` JSON businessAccountCollectionsConfigurationJSON `json:"-"` }
func (*BusinessAccountCollectionsConfiguration) UnmarshalJSON ¶
func (r *BusinessAccountCollectionsConfiguration) UnmarshalJSON(data []byte) (err error)
type Card ¶
type Card struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // An RFC 3339 timestamp for when the card was created. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` Funding CardFunding `json:"funding,required"` // Last four digits of the card number. LastFour string `json:"last_four,required"` // Amount (in cents) to limit approved authorizations. Transaction requests above // the spend limit will be declined. SpendLimit int64 `json:"spend_limit,required"` // Spend limit duration values: // // - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar // year. // - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime // of the card. // - `MONTHLY` - Card will authorize transactions up to spend limit for the // trailing month. Month is calculated as this calendar date one month prior. // - `TRANSACTION` - Card will authorize multiple transactions if each individual // transaction is under the spend limit. SpendLimitDuration CardSpendLimitDuration `json:"spend_limit_duration,required"` // Card state values: // // - `CLOSED` - Card will no longer approve authorizations. Closing a card cannot // be undone. // - `OPEN` - Card will approve authorizations (if they match card and account // parameters). // - `PAUSED` - Card will decline authorizations, but can be resumed at a later // time. // - `PENDING_FULFILLMENT` - The initial state for cards of type `PHYSICAL`. The // card is provisioned pending manufacturing and fulfillment. Cards in this state // can accept authorizations for e-commerce purchases, but not for "Card Present" // purchases where the physical card itself is present. // - `PENDING_ACTIVATION` - Each business day at 2pm Eastern Time Zone (ET), cards // of type `PHYSICAL` in state `PENDING_FULFILLMENT` are sent to the card // production warehouse and updated to state `PENDING_ACTIVATION` . Similar to // `PENDING_FULFILLMENT`, cards in this state can be used for e-commerce // transactions. API clients should update the card's state to `OPEN` only after // the cardholder confirms receipt of the card. // // In sandbox, the same daily batch fulfillment occurs, but no cards are actually // manufactured. State CardState `json:"state,required"` // Card types: // // - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital // wallet like Apple Pay or Google Pay (if the card program is digital // wallet-enabled). // - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label // branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. // Reach out at [acme.com/contact](https://acme.com/contact) for more // information. // - `SINGLE_USE` - Card is closed upon first successful authorization. // - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that // successfully authorizes the card. Type CardType `json:"type,required"` // List of identifiers for the Auth Rule(s) that are applied on the card. AuthRuleTokens []string `json:"auth_rule_tokens"` // Three digit cvv printed on the back of the card. Cvv string `json:"cvv"` // Specifies the digital card art to be displayed in the user’s digital wallet // after tokenization. This artwork must be approved by Mastercard and configured // by Acme to use. See // [Flexible Card Art Guide](https://docs.acme.com/docs/about-digital-wallets#flexible-card-art). DigitalCardArtToken string `json:"digital_card_art_token" format:"uuid"` // Two digit (MM) expiry month. ExpMonth string `json:"exp_month"` // Four digit (yyyy) expiry year. ExpYear string `json:"exp_year"` // Hostname of card’s locked merchant (will be empty if not applicable). Hostname string `json:"hostname"` // Friendly name to identify the card. We recommend against using this field to // store JSON data as it can cause unexpected behavior. Memo string `json:"memo"` // Primary Account Number (PAN) (i.e. the card number). Customers must be PCI // compliant to have PAN returned as a field in production. Please contact // [support@acme.com](mailto:support@acme.com) for questions. Pan string `json:"pan"` JSON cardJSON `json:"-"` }
func (*Card) UnmarshalJSON ¶
type CardFinancialTransactionService ¶
type CardFinancialTransactionService struct {
Options []option.RequestOption
}
CardFinancialTransactionService contains methods and other services that help with interacting with the meorphis-test-46 API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCardFinancialTransactionService method instead.
func NewCardFinancialTransactionService ¶
func NewCardFinancialTransactionService(opts ...option.RequestOption) (r *CardFinancialTransactionService)
NewCardFinancialTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CardFinancialTransactionService) Get ¶
func (r *CardFinancialTransactionService) Get(ctx context.Context, cardToken string, financialTransactionToken string, opts ...option.RequestOption) (res *FinancialTransaction, err error)
Get the card financial transaction for the provided token.
type CardFunding ¶
type CardFunding struct { // A globally unique identifier for this FundingAccount. Token string `json:"token,required" format:"uuid"` // An RFC 3339 string representing when this funding source was added to the Acme // account. This may be `null`. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` // The last 4 digits of the account (e.g. bank account, debit card) associated with // this FundingAccount. This may be null. LastFour string `json:"last_four,required"` // State of funding source. // // Funding source states: // // - `ENABLED` - The funding account is available to use for card creation and // transactions. // - `PENDING` - The funding account is still being verified e.g. bank // micro-deposits verification. // - `DELETED` - The founding account has been deleted. State CardFundingState `json:"state,required"` // Types of funding source: // // - `DEPOSITORY_CHECKING` - Bank checking account. // - `DEPOSITORY_SAVINGS` - Bank savings account. Type CardFundingType `json:"type,required"` // Account name identifying the funding source. This may be `null`. AccountName string `json:"account_name"` // The nickname given to the `FundingAccount` or `null` if it has no nickname. Nickname string `json:"nickname"` JSON cardFundingJSON `json:"-"` }
func (*CardFunding) UnmarshalJSON ¶
func (r *CardFunding) UnmarshalJSON(data []byte) (err error)
type CardFundingState ¶
type CardFundingState string
State of funding source.
Funding source states:
- `ENABLED` - The funding account is available to use for card creation and transactions.
- `PENDING` - The funding account is still being verified e.g. bank micro-deposits verification.
- `DELETED` - The founding account has been deleted.
const ( CardFundingStateEnabled CardFundingState = "ENABLED" CardFundingStatePending CardFundingState = "PENDING" CardFundingStateDeleted CardFundingState = "DELETED" )
func (CardFundingState) IsKnown ¶
func (r CardFundingState) IsKnown() bool
type CardFundingType ¶
type CardFundingType string
Types of funding source:
- `DEPOSITORY_CHECKING` - Bank checking account. - `DEPOSITORY_SAVINGS` - Bank savings account.
const ( CardFundingTypeDepositoryChecking CardFundingType = "DEPOSITORY_CHECKING" CardFundingTypeDepositorySavings CardFundingType = "DEPOSITORY_SAVINGS" )
func (CardFundingType) IsKnown ¶
func (r CardFundingType) IsKnown() bool
type CardNewParams ¶
type CardNewParams struct { // Card types: // // - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital // wallet like Apple Pay or Google Pay (if the card program is digital // wallet-enabled). // - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label // branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. // Reach out at [acme.com/contact](https://acme.com/contact) for more // information. // - `SINGLE_USE` - Card is closed upon first successful authorization. // - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that // successfully authorizes the card. Type param.Field[CardNewParamsType] `json:"type,required"` // Globally unique identifier for the account that the card will be associated // with. Required for programs enrolling users using the // [/account_holders endpoint](https://docs.acme.com/docs/account-holders-kyc). See // [Managing Your Program](doc:managing-your-program) for more information. AccountToken param.Field[string] `json:"account_token" format:"uuid"` // For card programs with more than one BIN range. This must be configured with // Acme before use. Identifies the card program/BIN range under which to create the // card. If omitted, will utilize the program's default `card_program_token`. In // Sandbox, use 00000000-0000-0000-1000-000000000000 and // 00000000-0000-0000-2000-000000000000 to test creating cards on specific card // programs. CardProgramToken param.Field[string] `json:"card_program_token" format:"uuid"` Carrier param.Field[CardNewParamsCarrier] `json:"carrier"` // Specifies the digital card art to be displayed in the user’s digital wallet // after tokenization. This artwork must be approved by Mastercard and configured // by Acme to use. See // [Flexible Card Art Guide](https://docs.acme.com/docs/about-digital-wallets#flexible-card-art). DigitalCardArtToken param.Field[string] `json:"digital_card_art_token" format:"uuid"` // Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, // an expiration date will be generated. ExpMonth param.Field[string] `json:"exp_month"` // Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is // provided, an expiration date will be generated. ExpYear param.Field[string] `json:"exp_year"` // Friendly name to identify the card. We recommend against using this field to // store JSON data as it can cause unexpected behavior. Memo param.Field[string] `json:"memo"` // Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and // `VIRTUAL`. See // [Encrypted PIN Block](https://docs.acme.com/docs/cards#encrypted-pin-block-enterprise). Pin param.Field[string] `json:"pin"` // Only applicable to cards of type `PHYSICAL`. This must be configured with Acme // before use. Specifies the configuration (i.e., physical card art) that the card // should be manufactured with. ProductID param.Field[string] `json:"product_id"` ShippingAddress param.Field[CardNewParamsShippingAddress] `json:"shipping_address"` // Shipping method for the card. Only applies to cards of type PHYSICAL. Use of // options besides `STANDARD` require additional permissions. // // - `STANDARD` - USPS regular mail or similar international option, with no // tracking // - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, // with tracking // - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking // - `EXPRESS` - FedEx Express, 3-day shipping, with tracking // - `2_DAY` - FedEx 2-day shipping, with tracking // - `EXPEDITED` - FedEx Standard Overnight or similar international option, with // tracking ShippingMethod param.Field[CardNewParamsShippingMethod] `json:"shipping_method"` // Amount (in cents) to limit approved authorizations. Transaction requests above // the spend limit will be declined. Note that a spend limit of 0 is effectively no // limit, and should only be used to reset or remove a prior limit. Only a limit of // 1 or above will result in declined transactions due to checks against the card // limit. SpendLimit param.Field[int64] `json:"spend_limit"` // Spend limit duration values: // // - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar // year. // - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime // of the card. // - `MONTHLY` - Card will authorize transactions up to spend limit for the // trailing month. Month is calculated as this calendar date one month prior. // - `TRANSACTION` - Card will authorize multiple transactions if each individual // transaction is under the spend limit. SpendLimitDuration param.Field[CardNewParamsSpendLimitDuration] `json:"spend_limit_duration"` // Card state values: // // - `OPEN` - Card will approve authorizations (if they match card and account // parameters). // - `PAUSED` - Card will decline authorizations, but can be resumed at a later // time. State param.Field[CardNewParamsState] `json:"state"` IdempotencyKey param.Field[string] `header:"Idempotency-Key"` }
func (CardNewParams) MarshalJSON ¶
func (r CardNewParams) MarshalJSON() (data []byte, err error)
type CardNewParamsCarrier ¶
type CardNewParamsCarrier struct { // QR code url to display on the card carrier QrCodeURL param.Field[string] `json:"qr_code_url"` }
func (CardNewParamsCarrier) MarshalJSON ¶
func (r CardNewParamsCarrier) MarshalJSON() (data []byte, err error)
type CardNewParamsShippingAddress ¶
type CardNewParamsShippingAddress struct { // Valid USPS routable address. Address1 param.Field[string] `json:"address1,required"` // City City param.Field[string] `json:"city,required"` // Uppercase ISO 3166-1 alpha-3 three character abbreviation. Country param.Field[string] `json:"country,required"` // Customer's first name. This will be the first name printed on the physical card. FirstName param.Field[string] `json:"first_name,required"` // Customer's surname (family name). This will be the last name printed on the // physical card. LastName param.Field[string] `json:"last_name,required"` // Postal code (formerly zipcode). For US addresses, either five-digit zipcode or // nine-digit "ZIP+4". PostalCode param.Field[string] `json:"postal_code,required"` // Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a // limit of 24 characters for other countries. State param.Field[string] `json:"state,required"` // Unit number (if applicable). Address2 param.Field[string] `json:"address2"` // Email address to be contacted for expedited shipping process purposes. Required // if `shipping_method` is `EXPEDITED`. Email param.Field[string] `json:"email"` // Text to be printed on line two of the physical card. Use of this field requires // additional permissions. Line2Text param.Field[string] `json:"line2_text"` // Cardholder's phone number in E.164 format to be contacted for expedited shipping // process purposes. Required if `shipping_method` is `EXPEDITED`. PhoneNumber param.Field[string] `json:"phone_number"` }
func (CardNewParamsShippingAddress) MarshalJSON ¶
func (r CardNewParamsShippingAddress) MarshalJSON() (data []byte, err error)
type CardNewParamsShippingMethod ¶
type CardNewParamsShippingMethod string
Shipping method for the card. Only applies to cards of type PHYSICAL. Use of options besides `STANDARD` require additional permissions.
- `STANDARD` - USPS regular mail or similar international option, with no tracking
- `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option, with tracking
- `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
- `EXPRESS` - FedEx Express, 3-day shipping, with tracking
- `2_DAY` - FedEx 2-day shipping, with tracking
- `EXPEDITED` - FedEx Standard Overnight or similar international option, with tracking
const ( CardNewParamsShippingMethodStandard CardNewParamsShippingMethod = "STANDARD" CardNewParamsShippingMethodStandardWithTracking CardNewParamsShippingMethod = "STANDARD_WITH_TRACKING" CardNewParamsShippingMethodPriority CardNewParamsShippingMethod = "PRIORITY" CardNewParamsShippingMethodExpress CardNewParamsShippingMethod = "EXPRESS" CardNewParamsShippingMethod2Day CardNewParamsShippingMethod = "2_DAY" CardNewParamsShippingMethodExpedited CardNewParamsShippingMethod = "EXPEDITED" )
func (CardNewParamsShippingMethod) IsKnown ¶
func (r CardNewParamsShippingMethod) IsKnown() bool
type CardNewParamsSpendLimitDuration ¶
type CardNewParamsSpendLimitDuration string
Spend limit duration values:
- `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
- `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
- `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. Month is calculated as this calendar date one month prior.
- `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.
const ( CardNewParamsSpendLimitDurationAnnually CardNewParamsSpendLimitDuration = "ANNUALLY" CardNewParamsSpendLimitDurationForever CardNewParamsSpendLimitDuration = "FOREVER" CardNewParamsSpendLimitDurationMonthly CardNewParamsSpendLimitDuration = "MONTHLY" CardNewParamsSpendLimitDurationTransaction CardNewParamsSpendLimitDuration = "TRANSACTION" )
func (CardNewParamsSpendLimitDuration) IsKnown ¶
func (r CardNewParamsSpendLimitDuration) IsKnown() bool
type CardNewParamsState ¶
type CardNewParamsState string
Card state values:
- `OPEN` - Card will approve authorizations (if they match card and account parameters).
- `PAUSED` - Card will decline authorizations, but can be resumed at a later time.
const ( CardNewParamsStateOpen CardNewParamsState = "OPEN" CardNewParamsStatePaused CardNewParamsState = "PAUSED" )
func (CardNewParamsState) IsKnown ¶
func (r CardNewParamsState) IsKnown() bool
type CardNewParamsType ¶
type CardNewParamsType string
Card types:
- `VIRTUAL` - Card will authorize at any merchant and can be added to a digital wallet like Apple Pay or Google Pay (if the card program is digital wallet-enabled).
- `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. Reach out at acme.com/contact(https://acme.com/contact) for more information.
- `SINGLE_USE` - Card is closed upon first successful authorization.
- `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that successfully authorizes the card.
const ( CardNewParamsTypeVirtual CardNewParamsType = "VIRTUAL" CardNewParamsTypePhysical CardNewParamsType = "PHYSICAL" CardNewParamsTypeMerchantLocked CardNewParamsType = "MERCHANT_LOCKED" CardNewParamsTypeSingleUse CardNewParamsType = "SINGLE_USE" )
func (CardNewParamsType) IsKnown ¶
func (r CardNewParamsType) IsKnown() bool
type CardProvisionParams ¶
type CardProvisionParams struct { // Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only // `activationData` in the response. Apple's public leaf certificate. Base64 // encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers // omitted. Provided by the device's wallet. Certificate param.Field[string] `json:"certificate" format:"byte"` // Name of digital wallet provider. DigitalWallet param.Field[CardProvisionParamsDigitalWallet] `json:"digital_wallet"` // Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only // `activationData` in the response. Base64 cryptographic nonce provided by the // device's wallet. Nonce param.Field[string] `json:"nonce" format:"byte"` // Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only // `activationData` in the response. Base64 cryptographic nonce provided by the // device's wallet. NonceSignature param.Field[string] `json:"nonce_signature" format:"byte"` IdempotencyKey param.Field[string] `header:"Idempotency-Key"` }
func (CardProvisionParams) MarshalJSON ¶
func (r CardProvisionParams) MarshalJSON() (data []byte, err error)
type CardProvisionParamsDigitalWallet ¶
type CardProvisionParamsDigitalWallet string
Name of digital wallet provider.
const ( CardProvisionParamsDigitalWalletApplePay CardProvisionParamsDigitalWallet = "APPLE_PAY" CardProvisionParamsDigitalWalletGooglePay CardProvisionParamsDigitalWallet = "GOOGLE_PAY" CardProvisionParamsDigitalWalletSamsungPay CardProvisionParamsDigitalWallet = "SAMSUNG_PAY" )
func (CardProvisionParamsDigitalWallet) IsKnown ¶
func (r CardProvisionParamsDigitalWallet) IsKnown() bool
type CardProvisionResponse ¶
type CardProvisionResponse struct { ProvisioningPayload string `json:"provisioning_payload"` JSON cardProvisionResponseJSON `json:"-"` }
func (*CardProvisionResponse) UnmarshalJSON ¶
func (r *CardProvisionResponse) UnmarshalJSON(data []byte) (err error)
type CardService ¶
type CardService struct { Options []option.RequestOption FinancialTransactions *CardFinancialTransactionService }
CardService contains methods and other services that help with interacting with the meorphis-test-46 API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCardService method instead.
func NewCardService ¶
func NewCardService(opts ...option.RequestOption) (r *CardService)
NewCardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CardService) Get ¶
func (r *CardService) Get(ctx context.Context, cardToken string, opts ...option.RequestOption) (res *Card, err error)
Get card configuration such as spend limit and state.
func (*CardService) New ¶
func (r *CardService) New(ctx context.Context, params CardNewParams, opts ...option.RequestOption) (res *Card, err error)
Create a new virtual or physical card. Parameters `pin`, `shipping_address`, and `product_id` only apply to physical cards.
func (*CardService) Provision ¶
func (r *CardService) Provision(ctx context.Context, cardToken string, params CardProvisionParams, opts ...option.RequestOption) (res *CardProvisionResponse, err error)
Allow your cardholders to directly add payment cards to the device's digital wallet (e.g. Apple Pay) with one touch from your app.
This requires some additional setup and configuration. Please [Contact Us](https://acme.com/contact) or your Customer Success representative for more information.
func (*CardService) Update ¶
func (r *CardService) Update(ctx context.Context, cardToken string, body CardUpdateParams, opts ...option.RequestOption) (res *Card, err error)
Update the specified properties of the card. Unsupplied properties will remain unchanged. `pin` parameter only applies to physical cards.
_Note: setting a card to a `CLOSED` state is a final action that cannot be undone._
type CardSpendLimitDuration ¶
type CardSpendLimitDuration string
Spend limit duration values:
- `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
- `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
- `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. Month is calculated as this calendar date one month prior.
- `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.
const ( CardSpendLimitDurationAnnually CardSpendLimitDuration = "ANNUALLY" CardSpendLimitDurationForever CardSpendLimitDuration = "FOREVER" CardSpendLimitDurationMonthly CardSpendLimitDuration = "MONTHLY" CardSpendLimitDurationTransaction CardSpendLimitDuration = "TRANSACTION" )
func (CardSpendLimitDuration) IsKnown ¶
func (r CardSpendLimitDuration) IsKnown() bool
type CardState ¶
type CardState string
Card state values:
- `CLOSED` - Card will no longer approve authorizations. Closing a card cannot be undone.
- `OPEN` - Card will approve authorizations (if they match card and account parameters).
- `PAUSED` - Card will decline authorizations, but can be resumed at a later time.
- `PENDING_FULFILLMENT` - The initial state for cards of type `PHYSICAL`. The card is provisioned pending manufacturing and fulfillment. Cards in this state can accept authorizations for e-commerce purchases, but not for "Card Present" purchases where the physical card itself is present.
- `PENDING_ACTIVATION` - Each business day at 2pm Eastern Time Zone (ET), cards of type `PHYSICAL` in state `PENDING_FULFILLMENT` are sent to the card production warehouse and updated to state `PENDING_ACTIVATION` . Similar to `PENDING_FULFILLMENT`, cards in this state can be used for e-commerce transactions. API clients should update the card's state to `OPEN` only after the cardholder confirms receipt of the card.
In sandbox, the same daily batch fulfillment occurs, but no cards are actually manufactured.
type CardType ¶
type CardType string
Card types:
- `VIRTUAL` - Card will authorize at any merchant and can be added to a digital wallet like Apple Pay or Google Pay (if the card program is digital wallet-enabled).
- `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality. Reach out at acme.com/contact(https://acme.com/contact) for more information.
- `SINGLE_USE` - Card is closed upon first successful authorization.
- `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that successfully authorizes the card.
type CardUpdateParams ¶
type CardUpdateParams struct { // Identifier for any Auth Rules that will be applied to transactions taking place // with the card. AuthRuleToken param.Field[string] `json:"auth_rule_token"` // Specifies the digital card art to be displayed in the user’s digital wallet // after tokenization. This artwork must be approved by Mastercard and configured // by Acme to use. See // [Flexible Card Art Guide](https://docs.acme.com/docs/about-digital-wallets#flexible-card-art). DigitalCardArtToken param.Field[string] `json:"digital_card_art_token" format:"uuid"` // Friendly name to identify the card. We recommend against using this field to // store JSON data as it can cause unexpected behavior. Memo param.Field[string] `json:"memo"` // Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and // `VIRTUAL`. See // [Encrypted PIN Block](https://docs.acme.com/docs/cards#encrypted-pin-block-enterprise). Pin param.Field[string] `json:"pin"` // Amount (in cents) to limit approved authorizations. Transaction requests above // the spend limit will be declined. Note that a spend limit of 0 is effectively no // limit, and should only be used to reset or remove a prior limit. Only a limit of // 1 or above will result in declined transactions due to checks against the card // limit. SpendLimit param.Field[int64] `json:"spend_limit"` // Spend limit duration values: // // - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar // year. // - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime // of the card. // - `MONTHLY` - Card will authorize transactions up to spend limit for the // trailing month. Month is calculated as this calendar date one month prior. // - `TRANSACTION` - Card will authorize multiple transactions if each individual // transaction is under the spend limit. SpendLimitDuration param.Field[CardUpdateParamsSpendLimitDuration] `json:"spend_limit_duration"` // Card state values: // // - `CLOSED` - Card will no longer approve authorizations. Closing a card cannot // be undone. // - `OPEN` - Card will approve authorizations (if they match card and account // parameters). // - `PAUSED` - Card will decline authorizations, but can be resumed at a later // time. State param.Field[CardUpdateParamsState] `json:"state"` }
func (CardUpdateParams) MarshalJSON ¶
func (r CardUpdateParams) MarshalJSON() (data []byte, err error)
type CardUpdateParamsSpendLimitDuration ¶
type CardUpdateParamsSpendLimitDuration string
Spend limit duration values:
- `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
- `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
- `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. Month is calculated as this calendar date one month prior.
- `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit.
const ( CardUpdateParamsSpendLimitDurationAnnually CardUpdateParamsSpendLimitDuration = "ANNUALLY" CardUpdateParamsSpendLimitDurationForever CardUpdateParamsSpendLimitDuration = "FOREVER" CardUpdateParamsSpendLimitDurationMonthly CardUpdateParamsSpendLimitDuration = "MONTHLY" CardUpdateParamsSpendLimitDurationTransaction CardUpdateParamsSpendLimitDuration = "TRANSACTION" )
func (CardUpdateParamsSpendLimitDuration) IsKnown ¶
func (r CardUpdateParamsSpendLimitDuration) IsKnown() bool
type CardUpdateParamsState ¶
type CardUpdateParamsState string
Card state values:
- `CLOSED` - Card will no longer approve authorizations. Closing a card cannot be undone.
- `OPEN` - Card will approve authorizations (if they match card and account parameters).
- `PAUSED` - Card will decline authorizations, but can be resumed at a later time.
const ( CardUpdateParamsStateClosed CardUpdateParamsState = "CLOSED" CardUpdateParamsStateOpen CardUpdateParamsState = "OPEN" CardUpdateParamsStatePaused CardUpdateParamsState = "PAUSED" )
func (CardUpdateParamsState) IsKnown ¶
func (r CardUpdateParamsState) IsKnown() bool
type Client ¶
type Client struct { Options []option.RequestOption Accounts *AccountService Cards *CardService Status *StatusService }
Client creates a struct with services and top level methods that help with interacting with the meorphis-test-46 API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned [url.Values] will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type FinancialTransaction ¶
type FinancialTransaction struct { // Globally unique identifier. Token string `json:"token,required" format:"uuid"` // Status types: // // - `CARD` - Issuing card transaction. // - `ACH` - Transaction over ACH. // - `TRANSFER` - Internal transfer of funds between financial accounts in your // program. Category FinancialTransactionCategory `json:"category,required"` // Date and time when the financial transaction first occurred. UTC time zone. Created time.Time `json:"created,required" format:"date-time"` // 3-digit alphabetic ISO 4217 code for the settling currency of the transaction. Currency string `json:"currency,required"` // A string that provides a description of the financial transaction; may be useful // to display to users. Descriptor string `json:"descriptor,required"` // A list of all financial events that have modified this financial transaction. Events []FinancialTransactionEvent `json:"events,required"` // Pending amount of the transaction in the currency's smallest unit (e.g., cents), // including any acquirer fees. The value of this field will go to zero over time // once the financial transaction is settled. PendingAmount int64 `json:"pending_amount,required"` // APPROVED transactions were successful while DECLINED transactions were declined // by user, Acme, or the network. Result FinancialTransactionResult `json:"result,required"` // Amount of the transaction that has been settled in the currency's smallest unit // (e.g., cents), including any acquirer fees. This may change over time. SettledAmount int64 `json:"settled_amount,required"` // Status types: // // - `DECLINED` - The card transaction was declined. // - `EXPIRED` - Acme reversed the card authorization as it has passed its // expiration time. // - `PENDING` - Authorization is pending completion from the merchant or pending // release from ACH hold period // - `SETTLED` - The financial transaction is completed. // - `VOIDED` - The merchant has voided the previously pending card authorization. Status FinancialTransactionStatus `json:"status,required"` // Date and time when the financial transaction was last updated. UTC time zone. Updated time.Time `json:"updated,required" format:"date-time"` JSON financialTransactionJSON `json:"-"` }
func (*FinancialTransaction) UnmarshalJSON ¶
func (r *FinancialTransaction) UnmarshalJSON(data []byte) (err error)
type FinancialTransactionCategory ¶
type FinancialTransactionCategory string
Status types:
- `CARD` - Issuing card transaction.
- `ACH` - Transaction over ACH.
- `TRANSFER` - Internal transfer of funds between financial accounts in your program.
const ( FinancialTransactionCategoryCard FinancialTransactionCategory = "CARD" FinancialTransactionCategoryACH FinancialTransactionCategory = "ACH" FinancialTransactionCategoryTransfer FinancialTransactionCategory = "TRANSFER" )
func (FinancialTransactionCategory) IsKnown ¶
func (r FinancialTransactionCategory) IsKnown() bool
type FinancialTransactionEvent ¶
type FinancialTransactionEvent struct { // Globally unique identifier. Token string `json:"token" format:"uuid"` // Amount of the financial event that has been settled in the currency's smallest // unit (e.g., cents). Amount int64 `json:"amount"` // Date and time when the financial event occurred. UTC time zone. Created time.Time `json:"created" format:"date-time"` // APPROVED financial events were successful while DECLINED financial events were // declined by user, Acme, or the network. Result FinancialTransactionEventsResult `json:"result"` // Event types: // // - `ACH_INSUFFICIENT_FUNDS` - Attempted ACH origination declined due to // insufficient balance. // - `ACH_ORIGINATION_PENDING` - ACH origination pending release from an ACH hold. // - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to // available balance. // - `ACH_RECEIPT_PENDING` - ACH receipt pending release from an ACH holder. // - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available // balance. // - `ACH_RETURN` - ACH origination returned by the Receiving Depository Financial // Institution. // - `AUTHORIZATION` - Authorize a card transaction. // - `AUTHORIZATION_ADVICE` - Advice on a card transaction. // - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Acme. // - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. // - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has // occurred on a card. // - `CLEARING` - Card Transaction is settled. // - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). // - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). // - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a // merchant. // - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on // your behalf by the network. // - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds // without additional clearing. // - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or // credit card funds without additional clearing. // - `RETURN` - A card refund has been processed on the transaction. // - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant // reverses an incorrect refund). // - `TRANSFER` - Successful internal transfer of funds between financial accounts. // - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to // insufficient balance of the sender. Type FinancialTransactionEventsType `json:"type"` JSON financialTransactionEventJSON `json:"-"` }
func (*FinancialTransactionEvent) UnmarshalJSON ¶
func (r *FinancialTransactionEvent) UnmarshalJSON(data []byte) (err error)
type FinancialTransactionEventsResult ¶
type FinancialTransactionEventsResult string
APPROVED financial events were successful while DECLINED financial events were declined by user, Acme, or the network.
const ( FinancialTransactionEventsResultApproved FinancialTransactionEventsResult = "APPROVED" FinancialTransactionEventsResultDeclined FinancialTransactionEventsResult = "DECLINED" )
func (FinancialTransactionEventsResult) IsKnown ¶
func (r FinancialTransactionEventsResult) IsKnown() bool
type FinancialTransactionEventsType ¶
type FinancialTransactionEventsType string
Event types:
- `ACH_INSUFFICIENT_FUNDS` - Attempted ACH origination declined due to insufficient balance.
- `ACH_ORIGINATION_PENDING` - ACH origination pending release from an ACH hold.
- `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance.
- `ACH_RECEIPT_PENDING` - ACH receipt pending release from an ACH holder.
- `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance.
- `ACH_RETURN` - ACH origination returned by the Receiving Depository Financial Institution.
- `AUTHORIZATION` - Authorize a card transaction.
- `AUTHORIZATION_ADVICE` - Advice on a card transaction.
- `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Acme.
- `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant.
- `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on a card.
- `CLEARING` - Card Transaction is settled.
- `CORRECTION_DEBIT` - Manual card transaction correction (Debit).
- `CORRECTION_CREDIT` - Manual card transaction correction (Credit).
- `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant.
- `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf by the network.
- `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without additional clearing.
- `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card funds without additional clearing.
- `RETURN` - A card refund has been processed on the transaction.
- `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an incorrect refund).
- `TRANSFER` - Successful internal transfer of funds between financial accounts.
- `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient balance of the sender.
const ( FinancialTransactionEventsTypeACHInsufficientFunds FinancialTransactionEventsType = "ACH_INSUFFICIENT_FUNDS" FinancialTransactionEventsTypeACHOriginationPending FinancialTransactionEventsType = "ACH_ORIGINATION_PENDING" FinancialTransactionEventsTypeACHOriginationReleased FinancialTransactionEventsType = "ACH_ORIGINATION_RELEASED" FinancialTransactionEventsTypeACHReceiptPending FinancialTransactionEventsType = "ACH_RECEIPT_PENDING" FinancialTransactionEventsTypeACHReceiptReleased FinancialTransactionEventsType = "ACH_RECEIPT_RELEASED" FinancialTransactionEventsTypeACHReturn FinancialTransactionEventsType = "ACH_RETURN" FinancialTransactionEventsTypeAuthorization FinancialTransactionEventsType = "AUTHORIZATION" FinancialTransactionEventsTypeAuthorizationAdvice FinancialTransactionEventsType = "AUTHORIZATION_ADVICE" FinancialTransactionEventsTypeAuthorizationExpiry FinancialTransactionEventsType = "AUTHORIZATION_EXPIRY" FinancialTransactionEventsTypeAuthorizationReversal FinancialTransactionEventsType = "AUTHORIZATION_REVERSAL" FinancialTransactionEventsTypeBalanceInquiry FinancialTransactionEventsType = "BALANCE_INQUIRY" FinancialTransactionEventsTypeClearing FinancialTransactionEventsType = "CLEARING" FinancialTransactionEventsTypeCorrectionDebit FinancialTransactionEventsType = "CORRECTION_DEBIT" FinancialTransactionEventsTypeCorrectionCredit FinancialTransactionEventsType = "CORRECTION_CREDIT" FinancialTransactionEventsTypeCreditAuthorization FinancialTransactionEventsType = "CREDIT_AUTHORIZATION" FinancialTransactionEventsTypeCreditAuthorizationAdvice FinancialTransactionEventsType = "CREDIT_AUTHORIZATION_ADVICE" FinancialTransactionEventsTypeFinancialAuthorization FinancialTransactionEventsType = "FINANCIAL_AUTHORIZATION" FinancialTransactionEventsTypeFinancialCreditAuthorization FinancialTransactionEventsType = "FINANCIAL_CREDIT_AUTHORIZATION" FinancialTransactionEventsTypeReturn FinancialTransactionEventsType = "RETURN" FinancialTransactionEventsTypeReturnReversal FinancialTransactionEventsType = "RETURN_REVERSAL" FinancialTransactionEventsTypeTransfer FinancialTransactionEventsType = "TRANSFER" FinancialTransactionEventsTypeTransferInsufficientFunds FinancialTransactionEventsType = "TRANSFER_INSUFFICIENT_FUNDS" )
func (FinancialTransactionEventsType) IsKnown ¶
func (r FinancialTransactionEventsType) IsKnown() bool
type FinancialTransactionResult ¶
type FinancialTransactionResult string
APPROVED transactions were successful while DECLINED transactions were declined by user, Acme, or the network.
const ( FinancialTransactionResultApproved FinancialTransactionResult = "APPROVED" FinancialTransactionResultDeclined FinancialTransactionResult = "DECLINED" )
func (FinancialTransactionResult) IsKnown ¶
func (r FinancialTransactionResult) IsKnown() bool
type FinancialTransactionStatus ¶
type FinancialTransactionStatus string
Status types:
- `DECLINED` - The card transaction was declined.
- `EXPIRED` - Acme reversed the card authorization as it has passed its expiration time.
- `PENDING` - Authorization is pending completion from the merchant or pending release from ACH hold period
- `SETTLED` - The financial transaction is completed.
- `VOIDED` - The merchant has voided the previously pending card authorization.
const ( FinancialTransactionStatusDeclined FinancialTransactionStatus = "DECLINED" FinancialTransactionStatusExpired FinancialTransactionStatus = "EXPIRED" FinancialTransactionStatusPending FinancialTransactionStatus = "PENDING" FinancialTransactionStatusSettled FinancialTransactionStatus = "SETTLED" FinancialTransactionStatusVoided FinancialTransactionStatus = "VOIDED" )
func (FinancialTransactionStatus) IsKnown ¶
func (r FinancialTransactionStatus) IsKnown() bool
type StatusListResponse ¶
type StatusListResponse struct { Message string `json:"message"` JSON statusListResponseJSON `json:"-"` }
func (*StatusListResponse) UnmarshalJSON ¶
func (r *StatusListResponse) UnmarshalJSON(data []byte) (err error)
type StatusService ¶
type StatusService struct {
Options []option.RequestOption
}
StatusService contains methods and other services that help with interacting with the meorphis-test-46 API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStatusService method instead.
func NewStatusService ¶
func NewStatusService(opts ...option.RequestOption) (r *StatusService)
NewStatusService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StatusService) List ¶
func (r *StatusService) List(ctx context.Context, opts ...option.RequestOption) (res *StatusListResponse, err error)
API status check