binlookup

package
v5.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 4 Imported by: 0

README

Go API client for binlookup

The BIN Lookup API provides endpoints for retrieving information, such as cost estimates, and 3D Secure supported version based on a given BIN.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 50
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen For more information, please visit https://support.adyen.com/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount struct {
	// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
	Currency string `json:"currency"`
	// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
	Value int64 `json:"value"`
}

Amount struct for Amount

type BinDetail

type BinDetail struct {
	// The country where the card was issued.
	IssuerCountry string `json:"issuerCountry,omitempty"`
}

BinDetail struct for BinDetail

type BinLookup

type BinLookup common.Service

BinLookup BinLookup service

func (BinLookup) Get3dsAvailability

Get3dsAvailability Checks 3D Secure availability. Verifies whether 3D Secure is available for the specified BIN or card brand. For 3D Secure 2, this endpoint also returns device fingerprinting keys. For more information, refer to [3D Secure 2](https://docs.adyen.com/checkout/3d-secure/native-3ds2).

  • @param request ThreeDSAvailabilityRequest - reference of ThreeDSAvailabilityRequest).
  • @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return ThreeDSAvailabilityResponse

func (BinLookup) GetCostEstimate

GetCostEstimate Gets a cost estimate. Use the Adyen Cost Estimation API to pre-calculate interchange and scheme fee costs. Knowing these costs prior actual payment authorisation gives you an opportunity to charge those costs to the cardholder, if necessary. To retrieve this information, make the call to the `/getCostEstimate` endpoint. The response to this call contains the amount of the interchange and scheme fees charged by the network for this transaction, and also which surcharging policy is possible (based on current regulations). > Since not all information is known in advance (for example, if the cardholder will successfully authenticate via 3D Secure or if you also plan to provide additional Level 2/3 data), the returned amounts are based on a set of assumption criteria you define in the `assumptions` parameter.

  • @param request CostEstimateRequest - reference of CostEstimateRequest).
  • @param ctxs ..._context.Context - optional, for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return CostEstimateResponse

type CardBin

type CardBin struct {
	// The first 6 digit of the card number. Enable this field via merchant account settings.
	Bin string `json:"bin,omitempty"`
	// If true, it indicates a commercial card. Enable this field via merchant account settings.
	Commercial bool `json:"commercial,omitempty"`
	// The card funding source. Valid values are: * CHARGE * CREDIT * DEBIT * DEFERRED_DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE > Enable this field via merchant account settings.
	FundingSource string `json:"fundingSource,omitempty"`
	// Indicates availability of funds.  Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise)  Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\".
	FundsAvailability string `json:"fundsAvailability,omitempty"`
	// The issuing bank of the card.
	IssuingBank string `json:"issuingBank,omitempty"`
	// The country where the card was issued from.
	IssuingCountry string `json:"issuingCountry,omitempty"`
	// The currency of the card.
	IssuingCurrency string `json:"issuingCurrency,omitempty"`
	// The payment method associated with the card (e.g. visa, mc, or amex).
	PaymentMethod string `json:"paymentMethod,omitempty"`
	// Indicates whether a payout is eligible or not for this card.  Visa: * \"Y\" * \"N\"  Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\".
	PayoutEligible string `json:"payoutEligible,omitempty"`
	// The last four digits of the card number.
	Summary string `json:"summary,omitempty"`
}

CardBin struct for CardBin

type CostEstimateAssumptions

type CostEstimateAssumptions struct {
	// If true, the cardholder is expected to successfully authorise via 3D Secure.
	Assume3DSecureAuthenticated bool `json:"assume3DSecureAuthenticated,omitempty"`
	// If true, the transaction is expected to have valid Level 3 data.
	AssumeLevel3Data bool `json:"assumeLevel3Data,omitempty"`
	// If not zero, the number of installments.
	Installments int32 `json:"installments,omitempty"`
}

CostEstimateAssumptions struct for CostEstimateAssumptions

type CostEstimateRequest

type CostEstimateRequest struct {
	Amount      Amount                   `json:"amount"`
	Assumptions *CostEstimateAssumptions `json:"assumptions,omitempty"`
	// The card number (4-19 characters) for PCI compliant use cases. Do not use any separators.  > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request.
	CardNumber string `json:"cardNumber,omitempty"`
	// Encrypted data that stores card information for non PCI-compliant use cases. The encrypted data must be created with the Checkout Card Component or Secured Fields Component, and must contain the `encryptedCardNumber` field.  > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request.
	EncryptedCardNumber string `json:"encryptedCardNumber,omitempty"`
	// The merchant account identifier you want to process the (transaction) request with.
	MerchantAccount string           `json:"merchantAccount"`
	MerchantDetails *MerchantDetails `json:"merchantDetails,omitempty"`
	Recurring       *Recurring       `json:"recurring,omitempty"`
	// The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail.
	SelectedRecurringDetailReference string `json:"selectedRecurringDetailReference,omitempty"`
	// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default.  This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.
	ShopperInteraction string `json:"shopperInteraction,omitempty"`
	// Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. > This field is required for recurring payments.
	ShopperReference string `json:"shopperReference,omitempty"`
}

CostEstimateRequest struct for CostEstimateRequest

type CostEstimateResponse

type CostEstimateResponse struct {
	CardBin            *CardBin `json:"cardBin,omitempty"`
	CostEstimateAmount *Amount  `json:"costEstimateAmount,omitempty"`
	// The result of the cost estimation.
	ResultCode string `json:"resultCode,omitempty"`
	// Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on
	SurchargeType string `json:"surchargeType,omitempty"`
}

CostEstimateResponse struct for CostEstimateResponse

type DSPublicKeyDetail

type DSPublicKeyDetail struct {
	// Card brand.
	Brand string `json:"brand,omitempty"`
	// Directory Server (DS) identifier.
	DirectoryServerId string `json:"directoryServerId,omitempty"`
	// Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key.
	PublicKey string `json:"publicKey,omitempty"`
}

DSPublicKeyDetail struct for DSPublicKeyDetail

type MerchantDetails

type MerchantDetails struct {
	// 2-letter ISO 3166 country code of the card acceptor location. > This parameter is required for the merchants who don't use Adyen as the payment authorisation gateway.
	CountryCode string `json:"countryCode,omitempty"`
	// If true, indicates that the merchant is enrolled in 3D Secure for the card network.
	EnrolledIn3DSecure bool `json:"enrolledIn3DSecure,omitempty"`
	// The merchant category code (MCC) is a four-digit number which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.  The list of MCCs can be found [here](https://en.wikipedia.org/wiki/Merchant_category_code).
	Mcc string `json:"mcc,omitempty"`
}

MerchantDetails struct for MerchantDetails

type Recurring

type Recurring 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"`
}

Recurring struct for Recurring

type ThreeDS2CardRangeDetail

type ThreeDS2CardRangeDetail struct {
	// Card brand.
	BrandCode string `json:"brandCode,omitempty"`
	// BIN end range.
	EndRange string `json:"endRange,omitempty"`
	// BIN start range.
	StartRange string `json:"startRange,omitempty"`
	// 3D Secure protocol version.
	ThreeDS2Version string `json:"threeDS2Version,omitempty"`
	// In a 3D Secure 2 browser-based flow, this is the URL where you should send the device fingerprint to.
	ThreeDSMethodURL string `json:"threeDSMethodURL,omitempty"`
}

ThreeDS2CardRangeDetail struct for ThreeDS2CardRangeDetail

type ThreeDSAvailabilityRequest

type ThreeDSAvailabilityRequest struct {
	// This field contains additional data, which may be required for a particular request.  The `additionalData` object consists of entries, each of which includes the key and value.
	AdditionalData *map[string]interface{} `json:"additionalData,omitempty"`
	// List of brands.
	Brands []string `json:"brands,omitempty"`
	// Card number or BIN.
	CardNumber string `json:"cardNumber,omitempty"`
	// The merchant account identifier.
	MerchantAccount string `json:"merchantAccount"`
	// A recurring detail reference corresponding to a card.
	RecurringDetailReference string `json:"recurringDetailReference,omitempty"`
	// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).
	ShopperReference string `json:"shopperReference,omitempty"`
}

ThreeDSAvailabilityRequest struct for ThreeDSAvailabilityRequest

type ThreeDSAvailabilityResponse

type ThreeDSAvailabilityResponse struct {
	BinDetails *BinDetail `json:"binDetails,omitempty"`
	// List of Directory Server (DS) public keys.
	DsPublicKeys *[]DSPublicKeyDetail `json:"dsPublicKeys,omitempty"`
	// Indicator if 3D Secure 1 is supported.
	ThreeDS1Supported bool `json:"threeDS1Supported,omitempty"`
	// List of brand and card range pairs.
	ThreeDS2CardRangeDetails *[]ThreeDS2CardRangeDetail `json:"threeDS2CardRangeDetails,omitempty"`
	// Indicator if 3D Secure 2 is supported.
	ThreeDS2supported bool `json:"threeDS2supported,omitempty"`
}

ThreeDSAvailabilityResponse struct for ThreeDSAvailabilityResponse

Jump to

Keyboard shortcuts

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