receipts

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 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 AmountEvent added in v0.13.0

type AmountEvent = shared.AmountEvent

Amount of the event.

type Client added in v0.13.0

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

func NewClient added in v0.13.0

func NewClient(c *client.Client) *Client

func (*Client) Get added in v0.13.0

func (c *Client) Get(ctx context.Context, id string, params GetParams) (*Receipt, error)

Retrieves receipt specific data for a transaction.

type EventID added in v0.13.0

type EventID = shared.EventID

Unique ID of the transaction event. Format: int64

type EventStatus added in v0.13.0

type EventStatus = shared.EventStatus

Status of the transaction event.

type EventType added in v0.13.0

type EventType = shared.EventType

Type of the transaction event.

type GetParams added in v0.12.0

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

GetParams are query parameters for GetReceipt.

func (*GetParams) QueryValues added in v0.12.0

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

QueryValues converts GetParams 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"`
}

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

Transaction information.

type ReceiptTransactionProduct

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

ReceiptTransactionProduct is a schema definition.

type ReceiptTransactionVATRate added in v0.11.0

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

ReceiptTransactionVATRate is a schema definition.

type TimestampEvent added in v0.13.0

type TimestampEvent = shared.TimestampEvent

Date and time of the transaction event.

type TransactionID added in v0.13.0

type TransactionID = shared.TransactionID

Unique ID of the transaction.

Jump to

Keyboard shortcuts

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