receipts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetReceiptParams

type GetReceiptParams struct {
	// Merchant code.
	Mid string
	// The ID of the transaction event (refund).
	TxEventId *int
}

GetReceiptParams: query parameters for GetReceipt

func (*GetReceiptParams) QueryValues

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

QueryValues converts GetReceiptParams into url.Values.

type Receipt

type Receipt struct {
	AcquirerData *ReceiptAcquirerData `json:"acquirer_data,omitempty"`
	EmvData      *ReceiptEmvData      `json:"emv_data,omitempty"`
	// Receipt merchant data
	MerchantData *ReceiptMerchantData `json:"merchant_data,omitempty"`
	// Transaction information.
	TransactionData *ReceiptTransaction `json:"transaction_data,omitempty"`
}

Receipt is a schema definition.

type ReceiptAcquirerData

type ReceiptAcquirerData struct {
	AuthorizationCode *string `json:"authorization_code,omitempty"`
	LocalTime         *string `json:"local_time,omitempty"`
	ReturnCode        *string `json:"return_code,omitempty"`
	Tid               *string `json:"tid,omitempty"`
}

ReceiptAcquirerData is a schema definition.

type ReceiptCard

type ReceiptCard struct {
	// Card last 4 digits.
	Last4Digits *string `json:"last_4_digits,omitempty"`
	// Card Scheme.
	Type *string `json:"type,omitempty"`
}

ReceiptCard is a schema definition.

type ReceiptEmvData

type ReceiptEmvData struct {
}

ReceiptEmvData is a schema definition.

type ReceiptEvent

type ReceiptEvent struct {
	// Amount of the event.
	Amount *shared.AmountEvent `json:"amount,omitempty"`
	// Unique ID of the transaction event.
	// Format: int64
	Id        *shared.EventId `json:"id,omitempty"`
	ReceiptNo *string         `json:"receipt_no,omitempty"`
	// Status of the transaction event.
	Status *shared.EventStatus `json:"status,omitempty"`
	// Date and time of the transaction event.
	Timestamp *shared.TimestampEvent `json:"timestamp,omitempty"`
	// Unique ID of the transaction.
	TransactionId *shared.TransactionId `json:"transaction_id,omitempty"`
	// Type of the transaction event.
	Type *shared.EventType `json:"type,omitempty"`
}

ReceiptEvent is a schema definition.

type ReceiptMerchantData

type ReceiptMerchantData struct {
	Locale          *string                             `json:"locale,omitempty"`
	MerchantProfile *ReceiptMerchantDataMerchantProfile `json:"merchant_profile,omitempty"`
}

ReceiptMerchantData: Receipt merchant data

type ReceiptMerchantDataMerchantProfile

type ReceiptMerchantDataMerchantProfile struct {
	Address      *ReceiptMerchantDataMerchantProfileAddress `json:"address,omitempty"`
	BusinessName *string                                    `json:"business_name,omitempty"`
	Email        *string                                    `json:"email,omitempty"`
	MerchantCode *string                                    `json:"merchant_code,omitempty"`
}

ReceiptMerchantDataMerchantProfile is a schema definition.

type ReceiptMerchantDataMerchantProfileAddress

type ReceiptMerchantDataMerchantProfileAddress struct {
	AddressLine1      *string `json:"address_line_1,omitempty"`
	City              *string `json:"city,omitempty"`
	Country           *string `json:"country,omitempty"`
	CountryEnName     *string `json:"country_en_name,omitempty"`
	CountryNativeName *string `json:"country_native_name,omitempty"`
	Landline          *string `json:"landline,omitempty"`
	PostCode          *string `json:"post_code,omitempty"`
}

ReceiptMerchantDataMerchantProfileAddress is a schema definition.

type ReceiptTransaction

type ReceiptTransaction struct {
	// Transaction amount.
	Amount *string      `json:"amount,omitempty"`
	Card   *ReceiptCard `json:"card,omitempty"`
	// Transaction currency.
	Currency *string `json:"currency,omitempty"`
	// Transaction entry mode.
	EntryMode *string `json:"entry_mode,omitempty"`
	// Events
	Events *[]ReceiptEvent `json:"events,omitempty"`
	// Number of installments.
	InstallmentsCount *int `json:"installments_count,omitempty"`
	// Transaction type.
	PaymentType *string `json:"payment_type,omitempty"`
	// Products
	Products *[]ReceiptTransactionProduct `json:"products,omitempty"`
	// Receipt number
	ReceiptNo *string `json:"receipt_no,omitempty"`
	// Transaction processing status.
	Status *string `json:"status,omitempty"`
	// Time created at.
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// Tip amount (included in transaction amount).
	TipAmount *string `json:"tip_amount,omitempty"`
	// Transaction code.
	TransactionCode *string `json:"transaction_code,omitempty"`
	// Transaction VAT amount.
	VatAmount *string `json:"vat_amount,omitempty"`
	// Vat rates.
	VatRates *[]ReceiptTransactionVatRate `json:"vat_rates,omitempty"`
	// Cardholder verification method.
	VerificationMethod *string `json:"verification_method,omitempty"`
}

ReceiptTransaction: Transaction information.

type ReceiptTransactionProduct

type ReceiptTransactionProduct struct {
	// Product description.
	Description *string `json:"description,omitempty"`
	// Product name.
	Name *string `json:"name,omitempty"`
	// Product price.
	Price *float64 `json:"price,omitempty"`
	// Product quantity.
	Quantity *int `json:"quantity,omitempty"`
	// Quantity x product price.
	TotalPrice *float64 `json:"total_price,omitempty"`
}

ReceiptTransactionProduct is a schema definition.

type ReceiptTransactionVatRate

type ReceiptTransactionVatRate struct {
	// Gross
	Gross *float64 `json:"gross,omitempty"`
	// Net
	Net *float64 `json:"net,omitempty"`
	// Rate
	Rate *float64 `json:"rate,omitempty"`
	// Vat
	Vat *float64 `json:"vat,omitempty"`
}

ReceiptTransactionVatRate is a schema definition.

type ReceiptsService

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

func NewReceiptsService

func NewReceiptsService(c *client.Client) *ReceiptsService

func (*ReceiptsService) Get

func (s *ReceiptsService) Get(ctx context.Context, id string, params GetReceiptParams) (*Receipt, error)

Get: Retrieve receipt details Retrieves receipt specific data for a transaction.

Jump to

Keyboard shortcuts

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