Documentation
¶
Index ¶
- type AddressLegacy
- type AmountEvent
- type Attributes
- type CardType
- type Currency
- type EntryMode
- type Error
- type ErrorForbidden
- type EventID
- type EventStatus
- type EventType
- type Invite
- type MandateResponse
- type MembershipStatus
- type Metadata
- type PaymentType
- type PersonalDetails
- type Problem
- type TimestampEvent
- type TransactionBase
- type TransactionBaseStatus
- type TransactionCheckoutInfo
- type TransactionID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressLegacy ¶ added in v0.3.0
type AddressLegacy struct {
// City name from the address.
City *string `json:"city,omitempty"`
// Two letter country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
Country *string `json:"country,omitempty"`
// First line of the address with details of the street name and number.
Line1 *string `json:"line_1,omitempty"`
// Second line of the address with details of the building, unit, apartment, and floor numbers.
Line2 *string `json:"line_2,omitempty"`
// Postal code from the address.
PostalCode *string `json:"postal_code,omitempty"`
// State name or abbreviation from the address.
State *string `json:"state,omitempty"`
}
Profile's personal address information.
type Attributes ¶
Object attributes that are modifiable only by SumUp applications.
type CardType ¶ added in v0.10.0
type CardType string
Issuing card network of the payment card used for the transaction.
const ( CardTypeAlelo CardType = "ALELO" CardTypeAmex CardType = "AMEX" CardTypeConecs CardType = "CONECS" CardTypeCup CardType = "CUP" CardTypeDiners CardType = "DINERS" CardTypeDiscover CardType = "DISCOVER" CardTypeEftpos CardType = "EFTPOS" CardTypeElo CardType = "ELO" CardTypeElv CardType = "ELV" CardTypeGirocard CardType = "GIROCARD" CardTypeHipercard CardType = "HIPERCARD" CardTypeInterac CardType = "INTERAC" CardTypeJcb CardType = "JCB" CardTypeMaestro CardType = "MAESTRO" CardTypeMastercard CardType = "MASTERCARD" CardTypePluxee CardType = "PLUXEE" CardTypeSwile CardType = "SWILE" CardTypeTicket CardType = "TICKET" CardTypeUnknown CardType = "UNKNOWN" CardTypeVisa CardType = "VISA" CardTypeVisaElectron CardType = "VISA_ELECTRON" CardTypeVisaVpay CardType = "VISA_VPAY" CardTypeVpay CardType = "VPAY" CardTypeVr CardType = "VR" )
type Currency ¶
type Currency string
Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.
const ( CurrencyBGN Currency = "BGN" CurrencyBRL Currency = "BRL" CurrencyCHF Currency = "CHF" CurrencyCLP Currency = "CLP" CurrencyCZK Currency = "CZK" CurrencyDKK Currency = "DKK" CurrencyEUR Currency = "EUR" CurrencyGBP Currency = "GBP" CurrencyHRK Currency = "HRK" CurrencyHUF Currency = "HUF" CurrencyNOK Currency = "NOK" CurrencyPLN Currency = "PLN" CurrencyRON Currency = "RON" CurrencySEK Currency = "SEK" CurrencyUSD Currency = "USD" )
type EntryMode ¶ added in v0.10.0
type EntryMode string
Entry mode of the payment details.
const ( EntryModeApplePay EntryMode = "apple pay" EntryModeBancontact EntryMode = "bancontact" EntryModeBlik EntryMode = "blik" EntryModeBoleto EntryMode = "boleto" EntryModeChip EntryMode = "chip" EntryModeContactless EntryMode = "contactless" EntryModeContactlessMagstripe EntryMode = "contactless magstripe" EntryModeCustomerEntry EntryMode = "customer entry" EntryModeDirectDebit EntryMode = "direct debit" EntryModeEps EntryMode = "eps" EntryModeGiropay EntryMode = "giropay" EntryModeGooglePay EntryMode = "google pay" EntryModeIdeal EntryMode = "ideal" EntryModeMagstripe EntryMode = "magstripe" EntryModeMagstripeFallback EntryMode = "magstripe fallback" EntryModeManualEntry EntryMode = "manual entry" EntryModeMoto EntryMode = "moto" EntryModeMybank EntryMode = "mybank" EntryModeNa EntryMode = "na" EntryModeNone EntryMode = "none" EntryModeP24 EntryMode = "p24" EntryModePaypal EntryMode = "paypal" EntryModePix EntryMode = "pix" EntryModeQrCodePix EntryMode = "qr code pix" EntryModeSatispay EntryMode = "satispay" EntryModeSofort EntryMode = "sofort" )
type Error ¶
type Error struct {
// Platform code for the error.
ErrorCode *string `json:"error_code,omitempty"`
// Short description of the error.
Message *string `json:"message,omitempty"`
}
Error message structure.
type ErrorForbidden ¶
type ErrorForbidden struct {
// Platform code for the error.
ErrorCode *string `json:"error_code,omitempty"`
// Short description of the error.
ErrorMessage *string `json:"error_message,omitempty"`
// HTTP status code for the error.
StatusCode *string `json:"status_code,omitempty"`
}
Error message for forbidden requests.
func (*ErrorForbidden) Error ¶
func (e *ErrorForbidden) Error() string
type EventID ¶ added in v0.11.0
type EventID int64
Unique ID of the transaction event. Format: int64
type EventStatus ¶
type EventStatus string
Status of the transaction event.
const ( EventStatusFailed EventStatus = "FAILED" EventStatusPaidOut EventStatus = "PAID_OUT" EventStatusPending EventStatus = "PENDING" EventStatusRefunded EventStatus = "REFUNDED" EventStatusScheduled EventStatus = "SCHEDULED" EventStatusSuccessful EventStatus = "SUCCESSFUL" )
type Invite ¶
type Invite struct {
// Email address of the invited user.
// Format: email
Email string `json:"email"`
ExpiresAt time.Time `json:"expires_at"`
}
Pending invitation for membership.
type MandateResponse ¶
type MandateResponse struct {
// Merchant code which has the mandate
MerchantCode *string `json:"merchant_code,omitempty"`
// Mandate status
Status *string `json:"status,omitempty"`
// Indicates the mandate type
Type *string `json:"type,omitempty"`
}
Created mandate
type MembershipStatus ¶
type MembershipStatus string
The status of the membership.
const ( MembershipStatusAccepted MembershipStatus = "accepted" MembershipStatusDisabled MembershipStatus = "disabled" MembershipStatusExpired MembershipStatus = "expired" MembershipStatusPending MembershipStatus = "pending" MembershipStatusUnknown MembershipStatus = "unknown" )
type Metadata ¶
Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object. Max properties: 64
type PaymentType ¶ added in v0.10.0
type PaymentType string
Payment type used for the transaction.
const ( PaymentTypeApm PaymentType = "APM" PaymentTypeBalance PaymentType = "BALANCE" PaymentTypeBitcoin PaymentType = "BITCOIN" PaymentTypeBoleto PaymentType = "BOLETO" PaymentTypeCash PaymentType = "CASH" PaymentTypeDirectDebit PaymentType = "DIRECT_DEBIT" PaymentTypeEcom PaymentType = "ECOM" PaymentTypeMoto PaymentType = "MOTO" PaymentTypePOS PaymentType = "POS" PaymentTypeRecurring PaymentType = "RECURRING" PaymentTypeUnknown PaymentType = "UNKNOWN" )
type PersonalDetails ¶
type PersonalDetails struct {
// Profile's personal address information.
Address *AddressLegacy `json:"address,omitempty"`
// Date of birth of the customer.
// Format: date
BirthDate *datetime.Date `json:"birth_date,omitempty"`
// Email address of the customer.
Email *string `json:"email,omitempty"`
// First name of the customer.
FirstName *string `json:"first_name,omitempty"`
// Last name of the customer.
LastName *string `json:"last_name,omitempty"`
// Phone number of the customer.
Phone *string `json:"phone,omitempty"`
// An identification number user for tax purposes (e.g. CPF)
// Max length: 255
TaxID *string `json:"tax_id,omitempty"`
}
Personal details for the customer.
type Problem ¶ added in v0.7.0
type Problem struct {
// A human-readable explanation specific to this occurrence of the problem.
Detail *string `json:"detail,omitempty"`
// A URI reference that identifies the specific occurrence of the problem.
// Format: uri
Instance *string `json:"instance,omitempty"`
// The HTTP status code generated by the origin server for this occurrence of the problem.
// Min: 400
// Max: 600
Status *int `json:"status,omitempty"`
// A short, human-readable summary of the problem type.
Title *string `json:"title,omitempty"`
// A URI reference that identifies the problem type.
// Format: uri
Type string `json:"type"`
}
A RFC 9457 problem details object.
Additional properties specific to the problem type may be present.
type TransactionBase ¶ added in v0.7.0
type TransactionBase struct {
// Total amount of the transaction.
Amount *float32 `json:"amount,omitempty"`
// Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported
// currency values are enumerated above.
Currency *Currency `json:"currency,omitempty"`
// Unique ID of the transaction.
ID *string `json:"id,omitempty"`
// Current number of the installment for deferred payments.
// Min: 1
InstallmentsCount *int `json:"installments_count,omitempty"`
// Payment type used for the transaction.
PaymentType *PaymentType `json:"payment_type,omitempty"`
// Current status of the transaction.
Status *TransactionBaseStatus `json:"status,omitempty"`
// Date and time of the creation of the transaction. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.
Timestamp *time.Time `json:"timestamp,omitempty"`
// Transaction code returned by the acquirer/processing entity after processing the transaction.
TransactionCode *string `json:"transaction_code,omitempty"`
}
Details of the transaction.
type TransactionBaseStatus ¶ added in v0.7.0
type TransactionBaseStatus string
Current status of the transaction.
const ( TransactionBaseStatusCancelled TransactionBaseStatus = "CANCELLED" TransactionBaseStatusFailed TransactionBaseStatus = "FAILED" TransactionBaseStatusPending TransactionBaseStatus = "PENDING" TransactionBaseStatusSuccessful TransactionBaseStatus = "SUCCESSFUL" )
type TransactionCheckoutInfo ¶ added in v0.7.0
type TransactionCheckoutInfo struct {
// Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.
AuthCode *string `json:"auth_code,omitempty"`
// Entry mode of the payment details.
EntryMode *EntryMode `json:"entry_mode,omitempty"`
// Internal unique ID of the transaction on the SumUp platform.
// Format: int64
InternalID *int64 `json:"internal_id,omitempty"`
// Unique code of the registered merchant to whom the payment is made.
MerchantCode *string `json:"merchant_code,omitempty"`
// Amount of the tip (out of the total transaction amount).
TipAmount *float32 `json:"tip_amount,omitempty"`
// Amount of the applicable VAT (out of the total transaction amount).
VATAmount *float32 `json:"vat_amount,omitempty"`
}
TransactionCheckoutInfo is a schema definition.