Documentation
¶
Index ¶
- type Address
- type BankAccount
- type Card
- type DisableRequest
- type DisableResult
- type Name
- type Recurring
- func (a Recurring) Disable(req *DisableRequest, ctxs ..._context.Context) (DisableResult, *_nethttp.Response, error)
- func (a Recurring) ListRecurringDetails(req *RecurringDetailsRequest, ctxs ..._context.Context) (RecurringDetailsResult, *_nethttp.Response, error)
- func (a Recurring) ScheduleAccountUpdater(req *ScheduleAccountUpdaterRequest, ctxs ..._context.Context) (ScheduleAccountUpdaterResult, *_nethttp.Response, error)
- type RecurringDetail
- type RecurringDetailsRequest
- type RecurringDetailsResult
- type RecurringType
- type ScheduleAccountUpdaterRequest
- type ScheduleAccountUpdaterResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
// The name of the city.
City string `json:"city"`
// The two-character country code as defined in ISO-3166-1 alpha-2. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
Country string `json:"country"`
// The number or name of the house.
HouseNumberOrName string `json:"houseNumberOrName"`
// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
PostalCode string `json:"postalCode"`
// State or province codes as defined in ISO 3166-2. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
StateOrProvince string `json:"stateOrProvince,omitempty"`
// The name of the street. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
Street string `json:"street"`
}
Address struct for Address
type BankAccount ¶
type BankAccount struct {
// The bank account number (without separators).
BankAccountNumber string `json:"bankAccountNumber,omitempty"`
// The bank city.
BankCity string `json:"bankCity,omitempty"`
// The location id of the bank. The field value is `nil` in most cases.
BankLocationId string `json:"bankLocationId,omitempty"`
// The name of the bank.
BankName string `json:"bankName,omitempty"`
// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
Bic string `json:"bic,omitempty"`
// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
CountryCode string `json:"countryCode,omitempty"`
// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
Iban string `json:"iban,omitempty"`
// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
OwnerName string `json:"ownerName,omitempty"`
// The bank account holder's tax ID.
TaxId string `json:"taxId,omitempty"`
}
BankAccount struct for BankAccount
type Card ¶
type Card struct {
// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.
Cvc string `json:"cvc,omitempty"`
// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November
ExpiryMonth string `json:"expiryMonth"`
// The card expiry year. Format: 4 digits. For example: 2020
ExpiryYear string `json:"expiryYear"`
// The name of the cardholder, as printed on the card.
HolderName string `json:"holderName"`
// The issue number of the card (for some UK debit cards only).
IssueNumber string `json:"issueNumber,omitempty"`
// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.
Number string `json:"number"`
// The month component of the start date (for some UK debit cards only).
StartMonth string `json:"startMonth,omitempty"`
// The year component of the start date (for some UK debit cards only).
StartYear string `json:"startYear,omitempty"`
}
Card struct for Card
type DisableRequest ¶
type DisableRequest struct {
// Specify the contract if you only want to disable a specific use. This field can be set to one of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING * PAYOUT
Contract string `json:"contract,omitempty"`
// The merchant account identifier with which you want to process the transaction.
MerchantAccount string `json:"merchantAccount"`
// The ID that uniquely identifies the recurring detail reference. If it is not provided, the whole recurring contract of the `shopperReference` will be disabled, which includes all recurring details.
RecurringDetailReference string `json:"recurringDetailReference,omitempty"`
// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment.
ShopperReference string `json:"shopperReference"`
}
DisableRequest struct for DisableRequest
type DisableResult ¶
type DisableResult struct {
// Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled].
Response string `json:"response,omitempty"`
}
DisableResult struct for DisableResult
type Name ¶
type Name struct {
// The first name.
FirstName string `json:"firstName"`
// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.
Gender string `json:"gender"`
// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed.
Infix string `json:"infix,omitempty"`
// The last name.
LastName string `json:"lastName"`
}
Name struct for Name
type Recurring ¶
Recurring Recurring service
func (Recurring) Disable ¶
func (a Recurring) Disable(req *DisableRequest, ctxs ..._context.Context) (DisableResult, *_nethttp.Response, error)
Disable Disables stored payment details. Disables stored payment details to stop charging a shopper with this particular recurring detail ID. For more information, refer to [Disable stored details](https://docs.adyen.com/classic-integration/recurring-payments/disable-stored-details/).
- @param request DisableRequest - reference of DisableRequest).
- @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return DisableResult
func (Recurring) ListRecurringDetails ¶
func (a Recurring) ListRecurringDetails(req *RecurringDetailsRequest, ctxs ..._context.Context) (RecurringDetailsResult, *_nethttp.Response, error)
ListRecurringDetails Retrieves stored payment details for a shopper. Lists the stored payment details for a shopper, if there are any available. The recurring detail ID can be used with a regular authorisation request to charge the shopper. A summary of the payment detail is returned for presentation to the shopper. For more information, refer to [Retrieve stored details](https://docs.adyen.com/classic-integration/recurring-payments/retrieve-stored-details/).
- @param request RecurringDetailsRequest - reference of RecurringDetailsRequest).
- @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return RecurringDetailsResult
func (Recurring) ScheduleAccountUpdater ¶
func (a Recurring) ScheduleAccountUpdater(req *ScheduleAccountUpdaterRequest, ctxs ..._context.Context) (ScheduleAccountUpdaterResult, *_nethttp.Response, error)
ScheduleAccountUpdater Schedules running of the Account Updater. When making the API call, you can submit either the credit card information, or the recurring detail reference and the shopper reference: * If the card information is provided, all the sub-fields for `card` are mandatory. * If the recurring detail reference is provided, the fields for `shopperReference` and `selectedRecurringDetailReference` are mandatory.
- @param request ScheduleAccountUpdaterRequest - reference of ScheduleAccountUpdaterRequest).
- @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ScheduleAccountUpdaterResult
type RecurringDetail ¶
type RecurringDetail struct {
// This field contains additional data, which may be returned in a particular response. The additionalData object consists of entries, each of which includes the key and value.
AdditionalData *map[string]interface{} `json:"additionalData,omitempty"`
// The alias of the credit card number. Applies only to recurring contracts storing credit card details
Alias string `json:"alias,omitempty"`
// The alias type of the credit card number. Applies only to recurring contracts storing credit card details.
AliasType string `json:"aliasType,omitempty"`
Bank *BankAccount `json:"bank,omitempty"`
BillingAddress *Address `json:"billingAddress,omitempty"`
Card *Card `json:"card,omitempty"`
// Types of recurring contracts.
ContractTypes []string `json:"contractTypes,omitempty"`
// The date when the recurring details were created.
CreationDate *time.Time `json:"creationDate,omitempty"`
// The `pspReference` of the first recurring payment that created the recurring detail.
FirstPspReference string `json:"firstPspReference,omitempty"`
// An optional descriptive name for this recurring detail.
Name string `json:"name,omitempty"`
// The type or sub-brand of a payment method used, e.g. Visa Debit, Visa Corporate, etc. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant).
PaymentMethodVariant string `json:"paymentMethodVariant,omitempty"`
// The reference that uniquely identifies the recurring detail.
RecurringDetailReference string `json:"recurringDetailReference"`
ShopperName *Name `json:"shopperName,omitempty"`
// A shopper's social security number (only in countries where it is legal to collect).
SocialSecurityNumber string `json:"socialSecurityNumber,omitempty"`
// The payment method, such as “mc\", \"visa\", \"ideal\", \"paypal\".
Variant string `json:"variant"`
}
RecurringDetail struct for RecurringDetail
type RecurringDetailsRequest ¶
type RecurringDetailsRequest struct {
// The merchant account identifier you want to process the (transaction) request with.
MerchantAccount string `json:"merchantAccount"`
Recurring *RecurringType `json:"recurring,omitempty"`
// The reference you use to uniquely identify the shopper (e.g. user ID or account ID).
ShopperReference string `json:"shopperReference"`
}
RecurringDetailsRequest struct for RecurringDetailsRequest
type RecurringDetailsResult ¶
type RecurringDetailsResult struct {
// The date when the recurring details were created.
CreationDate *time.Time `json:"creationDate,omitempty"`
// Payment details stored for recurring payments.
Details *[]RecurringDetail `json:"details,omitempty"`
// The most recent email for this shopper (if available).
LastKnownShopperEmail string `json:"lastKnownShopperEmail,omitempty"`
// The reference you use to uniquely identify the shopper (e.g. user ID or account ID).
ShopperReference string `json:"shopperReference,omitempty"`
}
RecurringDetailsResult struct for RecurringDetailsResult
type RecurringType ¶
type RecurringType struct {
// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/checkout/online-payouts).
Contract string `json:"contract,omitempty"`
// A descriptive name for this detail.
RecurringDetailName string `json:"recurringDetailName,omitempty"`
// Date after which no further authorisations shall be performed. Only for 3D Secure 2.
RecurringExpiry *time.Time `json:"recurringExpiry,omitempty"`
// Minimum number of days between authorisations. Only for 3D Secure 2.
RecurringFrequency string `json:"recurringFrequency,omitempty"`
// The name of the token service.
TokenService string `json:"tokenService,omitempty"`
}
RecurringType struct for Recurring
type ScheduleAccountUpdaterRequest ¶
type ScheduleAccountUpdaterRequest struct {
// This field contains additional data, which may be required for a particular request.
AdditionalData *map[string]interface{} `json:"additionalData,omitempty"`
Card *Card `json:"card,omitempty"`
// Account of the merchant.
MerchantAccount string `json:"merchantAccount"`
// A reference that merchants can apply for the call.
Reference string `json:"reference"`
// The selected detail recurring reference. Optional if `card` is provided.
SelectedRecurringDetailReference string `json:"selectedRecurringDetailReference,omitempty"`
// The reference of the shopper that owns the recurring contract. Optional if `card` is provided.
ShopperReference string `json:"shopperReference,omitempty"`
}
ScheduleAccountUpdaterRequest struct for ScheduleAccountUpdaterRequest
type ScheduleAccountUpdaterResult ¶
type ScheduleAccountUpdaterResult struct {
// Adyen's 16-character unique reference associated with the transaction. This value is globally unique; quote it when communicating with us about this request.
PspReference string `json:"pspReference"`
// The result of scheduling an Account Updater. If scheduling was successful, this field returns **Success**; otherwise it contains the error message.
Result string `json:"result"`
}
ScheduleAccountUpdaterResult struct for ScheduleAccountUpdaterResult
Source Files
¶
- api_default.go
- model_address.go
- model_bank_account.go
- model_card.go
- model_disable_request.go
- model_disable_result.go
- model_name.go
- model_recurring.go
- model_recurring_detail.go
- model_recurring_details_request.go
- model_recurring_details_result.go
- model_schedule_account_updater_request.go
- model_schedule_account_updater_result.go