merchant

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountLegacy added in v0.3.0

type AccountLegacy struct {
	// The role of the user.
	Type *AccountLegacyType `json:"type,omitempty"`
	// Username of the user profile.
	Username *string `json:"username,omitempty"`
}

AccountLegacy: Profile information.

type AccountLegacyType added in v0.3.0

type AccountLegacyType string

AccountLegacyType: The role of the user.

const (
	AccountLegacyTypeNormal   AccountLegacyType = "normal"
	AccountLegacyTypeOperator AccountLegacyType = "operator"
)

type AddressWithDetails

type AddressWithDetails struct {
	// Address line 1
	AddressLine1 *string `json:"address_line_1,omitempty"`
	// Address line 2
	AddressLine2 *string `json:"address_line_2,omitempty"`
	// City
	City *string `json:"city,omitempty"`
	// undefined
	Company *string `json:"company,omitempty"`
	// Country ISO 3166-1 code
	Country *string `json:"country,omitempty"`
	// Country Details
	CountryDetails *CountryDetails `json:"country_details,omitempty"`
	// undefined
	FirstName *string `json:"first_name,omitempty"`
	// Landline number
	Landline *string `json:"landline,omitempty"`
	// undefined
	LastName *string `json:"last_name,omitempty"`
	// Postal code
	PostCode *string `json:"post_code,omitempty"`
	// Region code
	RegionCode *string `json:"region_code,omitempty"`
	// Country region id
	RegionID *float64 `json:"region_id,omitempty"`
	// Region name
	RegionName *string `json:"region_name,omitempty"`
	// undefined
	StateID *string `json:"state_id,omitempty"`
	// TimeOffset Details
	TimeoffsetDetails *TimeoffsetDetails `json:"timeoffset_details,omitempty"`
}

AddressWithDetails: Details of the registered address.

type AppSettings

type AppSettings struct {
	// Advanced mode.
	AdvancedMode *string `json:"advanced_mode,omitempty"`
	// Barcode scanner.
	BarcodeScanner *string `json:"barcode_scanner,omitempty"`
	// Cash payment.
	CashPayment *string `json:"cash_payment,omitempty"`
	// Checkout preference
	CheckoutPreference *string `json:"checkout_preference,omitempty"`
	// Expected max transaction amount.
	ExpectedMaxTransactionAmount *float64 `json:"expected_max_transaction_amount,omitempty"`
	// Include vat.
	IncludeVAT *bool `json:"include_vat,omitempty"`
	// Manual entry.
	ManualEntry *string `json:"manual_entry,omitempty"`
	// Manual entry tutorial.
	ManualEntryTutorial *bool `json:"manual_entry_tutorial,omitempty"`
	// Mobile payment.
	MobilePayment *string `json:"mobile_payment,omitempty"`
	// Mobile payment tutorial.
	MobilePaymentTutorial *bool `json:"mobile_payment_tutorial,omitempty"`
	// Reader payment.
	ReaderPayment *string `json:"reader_payment,omitempty"`
	// Referral.
	Referral *string `json:"referral,omitempty"`
	// Tax enabled.
	TaxEnabled *bool `json:"tax_enabled,omitempty"`
	// Terminal mode tutorial.
	TerminalModeTutorial *bool `json:"terminal_mode_tutorial,omitempty"`
	// Tip rates.
	TipRates []float32 `json:"tip_rates,omitempty"`
	// Tipping.
	Tipping *string `json:"tipping,omitempty"`
}

AppSettings: Mobile app settings

type BankAccount

type BankAccount struct {
	// Account category - business or personal
	AccountCategory   *string `json:"account_category,omitempty"`
	AccountHolderName *string `json:"account_holder_name,omitempty"`
	// Account number
	AccountNumber *string `json:"account_number,omitempty"`
	// Type of the account
	AccountType *string `json:"account_type,omitempty"`
	// Bank code
	BankCode *string `json:"bank_code,omitempty"`
	// Bank name
	BankName *string `json:"bank_name,omitempty"`
	// Branch code
	BranchCode *string `json:"branch_code,omitempty"`
	// Creation date of the bank account
	CreatedAt *string `json:"created_at,omitempty"`
	// IBAN
	IBAN *string `json:"iban,omitempty"`
	// The primary bank account is the one used for payouts
	Primary *bool `json:"primary,omitempty"`
	// Status in the verification process
	Status *string `json:"status,omitempty"`
	// SWIFT code
	Swift *string `json:"swift,omitempty"`
}

BankAccount is a schema definition.

type BusinessOwner

type BusinessOwner struct {
	// Date of birth
	DateOfBirth *string `json:"date_of_birth,omitempty"`
	// BO's first name
	FirstName *string `json:"first_name,omitempty"`
	// BO's Landline
	Landline *string `json:"landline,omitempty"`
	// BO's last name of the user
	LastName *string `json:"last_name,omitempty"`
	// Mobile phone number
	MobilePhone *string `json:"mobile_phone,omitempty"`
	// Ownership percentage
	Ownership *float64 `json:"ownership,omitempty"`
}

BusinessOwner is a schema definition.

type BusinessOwners

type BusinessOwners []BusinessOwner

BusinessOwners: Business owners information.

type CountryDetails

type CountryDetails struct {
	// Currency ISO 4217 code
	Currency *string `json:"currency,omitempty"`
	// Country EN name
	EnName *string `json:"en_name,omitempty"`
	// Country ISO code
	IsoCode *string `json:"iso_code,omitempty"`
	// Country native name
	NativeName *string `json:"native_name,omitempty"`
}

CountryDetails: Country Details

type DoingBusinessAsLegacy added in v0.3.0

type DoingBusinessAsLegacy struct {
	Address *DoingBusinessAsLegacyAddress `json:"address,omitempty"`
	// Doing business as name
	BusinessName *string `json:"business_name,omitempty"`
	// Doing business as company registration number
	CompanyRegistrationNumber *string `json:"company_registration_number,omitempty"`
	// Doing business as email
	Email *string `json:"email,omitempty"`
	// Doing business as VAT ID
	VATID *string `json:"vat_id,omitempty"`
	// Doing business as website
	Website *string `json:"website,omitempty"`
}

DoingBusinessAsLegacy: Doing Business As information

type DoingBusinessAsLegacyAddress added in v0.3.0

type DoingBusinessAsLegacyAddress struct {
	// Address line 1
	AddressLine1 *string `json:"address_line_1,omitempty"`
	// Address line 2
	AddressLine2 *string `json:"address_line_2,omitempty"`
	// City
	City *string `json:"city,omitempty"`
	// Country ISO 3166-1 code
	Country *string `json:"country,omitempty"`
	// Postal code
	PostCode *string `json:"post_code,omitempty"`
	// Country region ID
	RegionID *float64 `json:"region_id,omitempty"`
	// Country region name
	RegionName *string `json:"region_name,omitempty"`
}

DoingBusinessAsLegacyAddress is a schema definition.

type GetAccountParams

type GetAccountParams struct {
	// A list of additional information you want to receive for the user. By default only personal and merchant profile
	// information will be returned.
	Include []string
}

GetAccountParams: query parameters for GetAccount

func (*GetAccountParams) QueryValues

func (p *GetAccountParams) QueryValues() url.Values

QueryValues converts GetAccountParams into url.Values.

type LegalTypeLegacy added in v0.3.0

type LegalTypeLegacy struct {
	// Legal type short description
	Description *string `json:"description,omitempty"`
	// Legal type description
	FullDescription *string `json:"full_description,omitempty"`
	// Unique id
	ID *float64 `json:"id,omitempty"`
	// Sole trader legal type if true
	SoleTrader *bool `json:"sole_trader,omitempty"`
}

LegalTypeLegacy: Id of the legal type of the merchant profile

type MerchantAccount

type MerchantAccount struct {
	// Profile information.
	Account *AccountLegacy `json:"account,omitempty"`
	// Mobile app settings
	AppSettings *AppSettings `json:"app_settings,omitempty"`
	// Account's merchant profile
	MerchantProfile *MerchantProfileLegacy `json:"merchant_profile,omitempty"`
	// User permissions
	Permissions *PermissionsLegacy `json:"permissions,omitempty"`
	// Account's personal profile.
	PersonalProfile *PersonalProfileLegacy `json:"personal_profile,omitempty"`
}

MerchantAccount: Details of the merchant account.

type MerchantProfileLegacy added in v0.3.0

type MerchantProfileLegacy struct {
	// Details of the registered address.
	Address      *AddressWithDetails `json:"address,omitempty"`
	BankAccounts []BankAccount       `json:"bank_accounts,omitempty"`
	// Business owners information.
	BusinessOwners BusinessOwners `json:"business_owners,omitempty"`
	// Company name
	CompanyName *string `json:"company_name,omitempty"`
	// Company registration number
	CompanyRegistrationNumber *string `json:"company_registration_number,omitempty"`
	// Merchant country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) (for
	// internal usage only)
	Country *string `json:"country,omitempty"`
	// Doing Business As information
	DoingBusinessAs *DoingBusinessAsLegacy `json:"doing_business_as,omitempty"`
	// True if the merchant is extdev
	Extdev *bool `json:"extdev,omitempty"`
	// Id of the legal type of the merchant profile
	LegalType *LegalTypeLegacy `json:"legal_type,omitempty"`
	// Merchant locale (for internal usage only)
	Locale *string `json:"locale,omitempty"`
	// Merchant category code
	MerchantCategoryCode *string `json:"merchant_category_code,omitempty"`
	// Unique identifying code of the merchant profile
	MerchantCode *string `json:"merchant_code,omitempty"`
	// Mobile phone number
	MobilePhone *string `json:"mobile_phone,omitempty"`
	// Nature and purpose of the business
	NatureAndPurpose *string `json:"nature_and_purpose,omitempty"`
	// True if the payout zone of this merchant is migrated
	PayoutZoneMigrated *bool `json:"payout_zone_migrated,omitempty"`
	// Permanent certificate access code (Portugal)
	PermanentCertificateAccessCode *string `json:"permanent_certificate_access_code,omitempty"`
	// Merchant settings (like \"payout_type\", \"payout_period\")
	Settings *MerchantSettings `json:"settings,omitempty"`
	// Vat ID
	VATID *string `json:"vat_id,omitempty"`
	// Merchant VAT rates
	VATRates *VATRates `json:"vat_rates,omitempty"`
	// Website
	Website *string `json:"website,omitempty"`
}

MerchantProfileLegacy: Account's merchant profile

type MerchantService

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

func NewMerchantService

func NewMerchantService(c *client.Client) *MerchantService

func (*MerchantService) Get

Get: Retrieve a profile Returns user profile information. Deprecated: The _Retrieve a profile_ endpoint is deprecated, please use the `Merchant` object instead (see [Merchants](https://developer.sumup.com/api/merchants)).

func (*MerchantService) GetDoingBusinessAs

func (s *MerchantService) GetDoingBusinessAs(ctx context.Context) (*DoingBusinessAsLegacy, error)

GetDoingBusinessAs: Retrieve DBA Retrieves Doing Business As profile. Deprecated: The _Retrieve DBA_ endpoint is deprecated, please use the `business_profile` field of the `Merchant` object instead (see [Merchants](https://developer.sumup.com/api/merchants)).

func (*MerchantService) GetMerchantProfile

func (s *MerchantService) GetMerchantProfile(ctx context.Context) (*MerchantProfileLegacy, error)

GetMerchantProfile: Retrieve a merchant profile Retrieves merchant profile data. Deprecated: The _Retrieve a merchant profile_ endpoint is deprecated, please use the `Merchant` object instead (see [Merchants](https://developer.sumup.com/api/merchants)).

func (*MerchantService) GetPersonalProfile

func (s *MerchantService) GetPersonalProfile(ctx context.Context) (*PersonalProfileLegacy, error)

GetPersonalProfile: Retrieve a personal profile Retrieves personal profile data. Deprecated: The _Retrieve a personal profile_ endpoint is deprecated, please use the `persons` field of the `Merchant` object instead. (see [Merchants](https://developer.sumup.com/api/merchants)).

type MerchantSettings

type MerchantSettings struct {
	// Whether merchant will receive daily payout emails
	DailyPayoutEmail *bool `json:"daily_payout_email,omitempty"`
	// Whether merchant has gross settlement enabled
	GrossSettlement *bool `json:"gross_settlement,omitempty"`
	// Whether merchant will receive monthly payout emails
	MonthlyPayoutEmail *bool `json:"monthly_payout_email,omitempty"`
	// Whether merchant can make MOTO payments
	MotoPayment *MerchantSettingsMotoPayment `json:"moto_payment,omitempty"`
	// Payout Instrument
	PayoutInstrument *string `json:"payout_instrument,omitempty"`
	// Whether merchant will receive payouts on demand
	PayoutOnDemand *bool `json:"payout_on_demand,omitempty"`
	// Whether merchant can edit payouts on demand
	PayoutOnDemandAvailable *bool `json:"payout_on_demand_available,omitempty"`
	// Payout frequency
	PayoutPeriod *string `json:"payout_period,omitempty"`
	// Payout type
	PayoutType *string `json:"payout_type,omitempty"`
	// Whether to show printers in mobile app
	PrintersEnabled *bool `json:"printers_enabled,omitempty"`
	// Stone merchant code
	StoneMerchantCode *string `json:"stone_merchant_code,omitempty"`
	// Whether to show tax in receipts (saved per transaction)
	TaxEnabled *bool `json:"tax_enabled,omitempty"`
}

MerchantSettings: Merchant settings (like \"payout_type\", \"payout_period\")

type MerchantSettingsMotoPayment

type MerchantSettingsMotoPayment string

MerchantSettingsMotoPayment: Whether merchant can make MOTO payments

const (
	MerchantSettingsMotoPaymentEnforced    MerchantSettingsMotoPayment = "ENFORCED"
	MerchantSettingsMotoPaymentOff         MerchantSettingsMotoPayment = "OFF"
	MerchantSettingsMotoPaymentOn          MerchantSettingsMotoPayment = "ON"
	MerchantSettingsMotoPaymentUnavailable MerchantSettingsMotoPayment = "UNAVAILABLE"
)

type PermissionsLegacy added in v0.3.0

type PermissionsLegacy struct {
	// Create MOTO payments
	CreateMotoPayments *bool `json:"create_moto_payments,omitempty"`
	// Create referral
	CreateReferral *bool `json:"create_referral,omitempty"`
	// Can view full merchant transaction history
	FullTransactionHistoryView *bool `json:"full_transaction_history_view,omitempty"`
	// Refund transactions
	RefundTransactions *bool `json:"refund_transactions,omitempty"`
}

PermissionsLegacy: User permissions

type PersonalProfileLegacy added in v0.3.0

type PersonalProfileLegacy struct {
	// Details of the registered address.
	Address  *AddressWithDetails `json:"address,omitempty"`
	Complete *bool               `json:"complete,omitempty"`
	// Date of birth
	DateOfBirth *string `json:"date_of_birth,omitempty"`
	// First name of the user
	FirstName *string `json:"first_name,omitempty"`
	// Last name of the user
	LastName *string `json:"last_name,omitempty"`
	// Mobile phone number
	MobilePhone *string `json:"mobile_phone,omitempty"`
}

PersonalProfileLegacy: Account's personal profile.

type TimeoffsetDetails

type TimeoffsetDetails struct {
	// Daylight Saving Time
	Dst *bool `json:"dst,omitempty"`
	// UTC offset
	Offset *float64 `json:"offset,omitempty"`
	// Postal code
	PostCode *string `json:"post_code,omitempty"`
}

TimeoffsetDetails: TimeOffset Details

type VATRates added in v0.11.0

type VATRates struct {
	// Country ISO code
	Country *string `json:"country,omitempty"`
	// Description
	Description *string `json:"description,omitempty"`
	// Internal ID
	ID *float64 `json:"id,omitempty"`
	// Ordering
	Ordering *float64 `json:"ordering,omitempty"`
	// Rate
	Rate *float64 `json:"rate,omitempty"`
}

VATRates: Merchant VAT rates

Jump to

Keyboard shortcuts

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