43 lines
1.6 KiB
Go
43 lines
1.6 KiB
Go
package yandex
|
|
|
|
// CreatePaymentRequest description https://yookassa.ru/developers/api#create_payment
|
|
type CreatePaymentRequest[T any] struct {
|
|
Amount Amount `json:"amount"`
|
|
Description string `json:"description,omitempty"`
|
|
PaymentMethodData *T `json:"payment_method_data,omitempty"`
|
|
Confirmation *CreateConfirmationRedirect `json:"confirmation,omitempty"`
|
|
Capture bool `json:"capture,omitempty"`
|
|
ClientIP string `json:"client_ip,omitempty"`
|
|
Deal any `json:"deal,omitempty"`
|
|
MerchantCustomerID any `json:"merchant_customer_id,omitempty"`
|
|
Receipt Receipt `json:"receipt,omitempty"`
|
|
}
|
|
|
|
type Receipt struct {
|
|
Customer Customer `json:"customer,omitempty"`
|
|
Items []Item `json:"items,omitempty"`
|
|
TaxSystemCode int `json:"tax_system_code,omitempty"`
|
|
}
|
|
|
|
type Item struct {
|
|
Description string `json:"description,omitempty"`
|
|
Amount ReceiptAmount `json:"amount,omitempty"`
|
|
VatCode int `json:"vat_code,omitempty"`
|
|
Quantity string `json:"quantity,omitempty"`
|
|
Measure string `json:"measure,omitempty"`
|
|
PaymentSubject string `json:"payment_subject,omitempty"`
|
|
PaymentMode string `json:"payment_mode,omitempty"`
|
|
}
|
|
|
|
type ReceiptAmount struct {
|
|
Value string `json:"value,omitempty"`
|
|
Currency string `json:"currency,omitempty"`
|
|
}
|
|
|
|
type Customer struct {
|
|
FullName string `json:"full_name,omitempty"`
|
|
INN string `json:"inn,omitempty"`
|
|
Email string `json:"email,omitempty"`
|
|
Phone string `jsoon:"phone,omitempty"`
|
|
}
|