Documentation
¶
Index ¶
- Constants
- func ErrorRefersToAPI(err error) bool
- type APIError
- type Action
- type AntiFraudError
- type Callback
- type CancelInvoiceRequest
- type CancelInvoiceResponse
- type CancelInvoiceResult
- type CheckoutRequest
- type Client
- type Config
- type Currency
- type EditSubscriptionRequest
- type FinancialError
- type InvoiceItem
- type InvoiceRequest
- type InvoiceResponse
- type Item
- type Language
- type NonFinancialError
- type PayType
- type RROInfo
- type RefundRequest
- type RefundResponse
- type Status
- type StatusRequest
- type StatusResponse
- type SubscribePeriod
- type SubscriptionRequest
- type SubscriptionResponse
- type UnsubscribeRequest
Constants ¶
View Source
const ( ServerServerURL = "https://www.liqpay.ua/api/request" ClientServerURL = "https://www.liqpay.ua/api/3/checkout" CurrentAPIVersion = "3" )
View Source
const ( CancelInvoiceResultOK = "ok" CancelInvoiceResultError = "error" )
Variables ¶
This section is empty.
Functions ¶
func ErrorRefersToAPI ¶
ErrorRefersToAPI checks if the error refers to an APIError.
Types ¶
type APIError ¶
type APIError struct { Status string `json:"status"` Code string `json:"err_code"` Desc string `json:"err_description"` }
APIError represents an error returned by the LiqPay API.
func ConvertToAPIError ¶
ConvertToAPIError converts an error to *APIError type if possible.
type Action ¶
type Action string
const ( ActionPay Action = "pay" // Default payment ActionHold Action = "hold" // Amount of hold on sender's account ActionSubscribe Action = "subscribe" // Create subscription ActionSubscribeUpdate Action = "subscribe_update" // Update subscription ActionUnsubscribe Action = "unsubscribe" // Unsubscribe ActionStatus Action = "status" // Payment status ActionPayDonate Action = "paydonate" // Donation ActionPaySplit Action = "paysplit" // Splitting payments ActionAuth Action = "auth" // Card preauth ActionRegular Action = "regular" // Regular payment ActionRefund Action = "refund" // Refund payment ActionInvoiceSend Action = "invoice_send" // Send invoice ActionInvoiceCancel Action = "invoice_cancel" // Cancel invoice )
type AntiFraudError ¶
type AntiFraudError string
const ( AntiFraudLimitExceeded AntiFraudError = "limit" // Exceeded limit on amount or number of client payments AntiFraudFraudDetected AntiFraudError = "frod" // Transaction identified as atypical/risky according to Bank's Anti-Fraud rules AntiFraudDeclinedTransaction AntiFraudError = "decline" // Transaction identified as atypical/risky according to Bank's Anti-Fraud system )
type Callback ¶
type Callback struct { AcqID int `json:"acq_id"` // ID of the acquirer Action Action `json:"action"` // Type of operation: pay, hold, paysplit, subscribe, auth, regular AgentCommission float64 `json:"agent_commission"` // Agent commission in payment currency Amount float64 `json:"amount"` // Payment amount AmountBonus float64 `json:"amount_bonus"` // Sender's bonus in payment currency (debit) AmountCredit float64 `json:"amount_credit"` // Amount of credit transaction in currency_credit AmountDebit float64 `json:"amount_debit"` // Amount of debit transaction in currency_debit AuthcodeCredit string `json:"authcode_credit"` // Authorization code for credit transaction AuthcodeDebit string `json:"authcode_debit"` // Authorization code for debit transaction CardToken string `json:"card_token"` // Sender's card token CommissionCredit float64 `json:"commission_credit"` // Receiver's commission in currency_credit CommissionDebit float64 `json:"commission_debit"` // Sender's commission in currency_debit CompletionDate string `json:"completion_date"` // Date of funds debit CreateDate string `json:"create_date"` // Payment creation date Currency string `json:"currency"` // Payment currency CurrencyCredit string `json:"currency_credit"` // Currency of credit transaction CurrencyDebit string `json:"currency_debit"` // Currency of debit transaction Customer string `json:"customer"` // Unique identifier of the customer on merchant's site Description string `json:"description"` // Payment comment EndDate string `json:"end_date"` // End/change date of payment ErrCode string `json:"err_code"` // Error code ErrDescription string `json:"err_description"` // Error description Info string `json:"info"` // Additional information about the payment IP string `json:"ip"` // Sender's IP address Is3DS bool `json:"is_3ds"` // Indicates if the transaction passed 3DS verification LiqpayOrderID string `json:"liqpay_order_id"` // Payment order_id in LiqPay system MpiEci int `json:"mpi_eci"` // MPI ECI value OrderID string `json:"order_id"` // Payment order_id PaymentID int `json:"payment_id"` // Payment ID in LiqPay system Paytype string `json:"paytype"` // Payment method: card, privat24, masterpass, moment_part, cash, invoice, qr PublicKey string `json:"public_key"` // Merchant's public key ReceiverCommission float64 `json:"receiver_commission"` // Receiver's commission in payment currency RedirectTo string `json:"redirect_to"` // Link to redirect the client for 3DS verification RefundDateLast string `json:"refund_date_last"` // Last refund date for the payment RRNCredit string `json:"rrn_credit"` // Unique transaction number in issuer and acquiring bank's system (credit) RRNDebit string `json:"rrn_debit"` // Unique transaction number in issuer and acquiring bank's system (debit) SenderBonus float64 `json:"sender_bonus"` // Sender's bonus in payment currency SenderCardBank string `json:"sender_card_bank"` // Sender's card bank SenderCardCountry string `json:"sender_card_country"` // Sender's card country ISO 3166-1 code SenderCardMask2 string `json:"sender_card_mask2"` // Sender's card mask SenderCardType string `json:"sender_card_type"` // Sender's card type (MC/Visa) SenderCommission float64 `json:"sender_commission"` // Sender's commission in payment currency SenderFirstName string `json:"sender_first_name"` // Sender's first name SenderLastName string `json:"sender_last_name"` // Sender's last name SenderPhone string `json:"sender_phone"` // Sender's phone number Status string `json:"status"` // Payment status WaitReserveStatus string `json:"wait_reserve_status"` // Additional payment status indicating that the current payment is reserved for refund Token string `json:"token"` // Payment token Type string `json:"type"` // Payment type Version int `json:"version"` // API version ErrErc string `json:"err_erc"` // Error code ProductCategory string `json:"product_category"` // Product category ProductDescription string `json:"product_description"` // Product description ProductName string `json:"product_name"` // Product name ProductURL string `json:"product_url"` // Product page URL RefundAmount float64 `json:"refund_amount"` // Refund amount Verifycode string `json:"verifycode"` // Verification code }
type CancelInvoiceRequest ¶
type CancelInvoiceResponse ¶
type CancelInvoiceResponse struct { InvoiceID int64 `json:"invoice_id"` // Unique identifier of the invoice Result CancelInvoiceResult `json:"order_id"` // The result of a request ok or error }
type CancelInvoiceResult ¶
type CancelInvoiceResult string
type CheckoutRequest ¶
type CheckoutRequest struct { Action Action `json:"action"` // Transaction type Amount float64 `json:"amount"` // Payment amount Currency Currency `json:"currency"` // Payment currency Description string `json:"description"` // Payment description OrderID string `json:"order_id"` // Unique purchase ID in your shop. Maximum length is 255 symbols RROInfo RROInfo `json:"rro_info,omitempty"` // Data for fiscalization ExpiredDate string `json:"expired_date,omitempty"` // Date and time until which customer is able to pay invoice by UTC. Should be sent in the following format 2016-04-24 00:00:00 Language Language `json:"language,omitempty"` // Customer's language PayTypes []PayType `json:"pay_types,omitempty"` // Parameter that gets the methods of payments that displayed on checkout. If the parameter is not passed, shop settings will be applied, Checkout tab ResultURL string `json:"result_url,omitempty"` // URL of your shop where the buyer would be redirected after completion of the purchase. Maximum length 510 symbols ServerURL string `json:"server_url,omitempty"` // URL API in your store for notifications of payment status change (server -> server). Maximum length is 510 symbols VerifyCode string `json:"verifycode,omitempty"` // Possible value Y. Dynamic verification code is generated and going back to Callback. Also generated code will be transferred to verification transactions for displaying in statement by client's card. Works for action = auth }
type Client ¶
type Client interface { CreateCheckout(req *CheckoutRequest) (string, error) CreateSubscription(req *SubscriptionRequest) (string, error) UpdateSubscription(req *EditSubscriptionRequest) (*SubscriptionResponse, error) RemoveSubscription(orderID string) (*SubscriptionResponse, error) CreateInvoice(req *InvoiceRequest) (*InvoiceResponse, error) CancelInvoice(orderID string) (*CancelInvoiceResponse, error) Status(orderID string) (*StatusResponse, error) Refund(orderID string, amount string) (*RefundResponse, error) ValidateCallback(data string, signature string) error }
type Config ¶
type Config struct { PrivateKey string // PrivateKey is the private key used for API authentication. PublicKey string // PublicKey is the public key used for API authentication. Debug bool // Debug specifies whether debug mode is enabled. }
Config represents the configuration parameters required for interacting with the LiqPay API.
type EditSubscriptionRequest ¶
type EditSubscriptionRequest struct { Action Action `json:"action"` // Action to be performed, in this case, 'subscribe_update' Amount float64 `json:"amount"` // Payment amount. For example: 5, 7.34 Currency string `json:"currency"` // Payment currency. Possible values: USD, EUR, UAH Description string `json:"description"` // Payment description OrderID string `json:"order_id"` // Unique purchase ID in your system }
type FinancialError ¶
type FinancialError int
const ( FinancialGeneralError FinancialError = 90 // General error during processing FinancialInvalidTokenMerchant FinancialError = 101 // Token created not by this merchant FinancialInactiveToken FinancialError = 102 // Sent token is not active FinancialMaxPurchaseAmountExceeded FinancialError = 103 // Maximum purchase amount reached for the token FinancialTransactionLimitExceeded FinancialError = 104 // Transaction limit for the token exceeded FinancialUnsupportedCard FinancialError = 105 // Card is not supported FinancialAcquirerDoesNotSupport3DS FinancialError = 107 // Such token does not exist FinancialTokenNotFound FinancialError = 108 // Such token does not exist FinancialTokenDoesNotExist FinancialError = 109 // IP attempt limit exceeded FinancialIPAttemptsLimitExceeded FinancialError = 110 // Session expired FinancialSessionExpired FinancialError = 111 // Card branch blocked FinancialCardBranchBlocked FinancialError = 112 // Daily card branch limit reached FinancialDailyCardBranchLimitExceeded FinancialError = 113 // Temporary restriction on P2P payments from PB cards to cards of foreign banks FinancialP2PBlocked FinancialError = 113 // Daily limit for using the card reached FinancialDailyTransactionLimitExceeded FinancialError = 2903 // Such order_id already exists FinancialDuplicateOrderID FinancialError = 2915 // Payments to this country are forbidden FinancialPaymentCountryForbidden FinancialError = 3914 // Card expiration date expired FinancialCardExpirationExpired FinancialError = 9851 // Incorrect card number FinancialInvalidCardNumber FinancialError = 9852 // Payment declined. Try again later FinancialPaymentDeclined FinancialError = 9854 // Card does not support this type of transaction FinancialUnsupportedTransactionType FinancialError = 9855 // Card does not support this type of transaction )
type InvoiceItem ¶
type InvoiceRequest ¶
type InvoiceRequest struct { Action Action `json:"action"` // Action type, e.g., "invoice_send" Amount float64 `json:"amount"` // Payment amount. For example: 5, 7.34 Currency Currency `json:"currency"` // Payment currency. Possible values: USD, EUR, UAH Description string `json:"description"` // Payment description Email string `json:"email"` // Customer's e-mail to send invoice (phone or email required parameters for transmission) OrderID string `json:"order_id"` // Unique purchase ID in your shop. Maximum length is 255 symbols Phone string `json:"phone"` // The phone number to which the invoice will be sent as a push notification to the Privat24 mobile application (phone or email required parameters for transmission) ActionPayment string `json:"action_payment,omitempty"` // Transaction type. Possible values: pay, hold, subscribe, paydonate ExpiredDate string `json:"expired_date,omitempty"` // Date and time until which customer is able to pay invoice by UTC. Should be sent in the following format 2016-04-24 00:00:00 Goods []InvoiceItem `json:"goods,omitempty"` // Optional list of goods Language Language `json:"language,omitempty"` // Customer's language uk, en ResultURL string `json:"result_url,omitempty"` // URL of your shop where the buyer would be redirected after completion of the purchase. Maximum length 510 symbols ServerURL string `json:"server_url,omitempty"` // URL API in your store for notifications of payment status change (server -> server). Maximum length is 510 symbols }
type InvoiceResponse ¶
type InvoiceResponse struct { Action Action `json:"action"` // Transaction type. Possible values: pay, hold, paysplit, subscribe, paydonate, auth, regular Amount float64 `json:"amount"` // Payment amount Currency Currency `json:"currency"` // Payment currency Description string `json:"description"` // Payment description Href string `json:"href"` // Link to invoice ID int `json:"id"` // Payment id in LiqPay system OrderID string `json:"order_id"` // Order_id payment ReceiverType string `json:"receiver_type"` // Receive channel type ReceiverValue string `json:"receiver_value"` // The value obtained in the parameter receiver_type Status string `json:"status"` // Payment status. Possible values: error, failure, success, invoice_wait, token Token string `json:"token,omitempty"` // Payment token }
type Item ¶
type Item struct { Amount float64 `json:"amount"` // Quantity/volume Cost string `json:"cost"` // The cost of all units of the specified product in the receipt (number of units * unit cost) ID string `json:"id"` // Item ID. You can get it in the Liqpay account - SCR - Kasa - Goods Price string `json:"price"` // Unit cost of goods }
type NonFinancialError ¶
type NonFinancialError string
const ( NonFinancialAuthorizationRequired NonFinancialError = "err_auth" // Authorization required NonFinancialCacheTimeElapsed NonFinancialError = "err_cache" // Data storage time elapsed for this operation NonFinancialUserNotFound NonFinancialError = "user_not_found" // User not found NonFinancialSMSSendFailed NonFinancialError = "err_sms_send" // Failed to send SMS NonFinancialSMSOTPIncorrect NonFinancialError = "err_sms_otp" // SMS password entered incorrectly NonFinancialShopBlocked NonFinancialError = "shop_blocked" // Shop is blocked NonFinancialShopNotActive NonFinancialError = "shop_not_active" // Shop is not active NonFinancialInvalidSignature NonFinancialError = "invalid_signature" // Invalid request signature NonFinancialOrderIDEmpty NonFinancialError = "order_id_empty" // Empty order_id passed NonFinancialShopNotAgent NonFinancialError = "err_shop_not_agent" // You are not an agent for the specified shop NonFinancialCardNotFound NonFinancialError = "err_card_def_notfound" // Card for receiving payments not found in wallet NonFinancialNoCardToken NonFinancialError = "err_no_card_token" // User has no card with such card_token NonFinancialCardLiqpayDefault NonFinancialError = "err_card_liqpay_def" // Specify another card NonFinancialInvalidCardType NonFinancialError = "err_card_type" // Invalid card type NonFinancialInvalidCardCountry NonFinancialError = "err_card_country" // Specify another card NonFinancialAmountBelowLimit NonFinancialError = "err_limit_amount" // Transfer amount less than or greater than specified limit NonFinancialPaymentAmountLimit NonFinancialError = "err_payment_amount_limit" // Transfer amount less than or greater than specified limit NonFinancialAmountLimitExceeded NonFinancialError = "amount_limit" // Exceeded amount limit NonFinancialPaymentSenderCard NonFinancialError = "payment_err_sender_card" // Specify another sender card NonFinancialPaymentProcessing NonFinancialError = "payment_processing" // Payment is being processed NonFinancialPaymentDiscountNotFound NonFinancialError = "err_payment_discount" // Discount for this payment not found NonFinancialWalletLoadFailed NonFinancialError = "err_wallet" // Failed to load wallet NonFinancialVerifyCodeRequired NonFinancialError = "err_get_verify_code" // Card verification required NonFinancialIncorrectVerifyCode NonFinancialError = "err_verify_code" // Incorrect verification code NonFinancialAdditionalInfoRequired NonFinancialError = "wait_info" // Additional information is expected, try again later NonFinancialInvalidRequestPath NonFinancialError = "err_path" // Invalid request address NonFinancialCashPaymentAcquirerNotAllowed NonFinancialError = "err_payment_cash_acq" // Payment cannot be made in this shop NonFinancialSplitAmountMismatch NonFinancialError = "err_split_amount" // Split payment amounts do not match payment amount NonFinancialReceiverCardNotSet NonFinancialError = "err_card_receiver_def" // Recipient has not set up card to receive payments NonFinancialPaymentStatusError NonFinancialError = "payment_err_status" // Incorrect payment status NonFinancialPublicKeyNotFound NonFinancialError = "public_key_not_found" // Public key not found NonFinancialPaymentNotFound NonFinancialError = "payment_not_found" // Payment not found NonFinancialPaymentNotSubscribed NonFinancialError = "payment_not_subscribed" // Payment is not regular NonFinancialWrongAmountCurrency NonFinancialError = "wrong_amount_currency" // Payment currency does not match debit currency NonFinancialAmountHoldError NonFinancialError = "err_amount_hold" // Amount cannot exceed payment amount NonFinancialAccessError NonFinancialError = "err_access" // Access error NonFinancialDuplicateOrderID NonFinancialError = "order_id_duplicate" // Such order_id already exists NonFinancialAccountBlocked NonFinancialError = "err_blocked" // Account access closed NonFinancialParameterEmpty NonFinancialError = "err_empty" // Parameter not filled NonFinancialPhoneParameterEmpty NonFinancialError = "err_empty_phone" // Phone parameter not filled NonFinancialParameterMissing NonFinancialError = "err_missing" // Parameter not passed NonFinancialParameterIncorrect NonFinancialError = "err_wrong" // Parameter specified incorrectly NonFinancialIncorrectCurrency NonFinancialError = "err_wrong_currency" // Incorrect currency specified. Use: USD, UAH, EUR NonFinancialInvalidPhoneNumber NonFinancialError = "err_phone" // Incorrect phone number entered NonFinancialInvalidCardNumber NonFinancialError = "err_card" // Incorrect card number specified NonFinancialCardBINNotFound NonFinancialError = "err_card_bin" // Card BIN not found NonFinancialTerminalNotFound NonFinancialError = "err_terminal_notfound" // Terminal not found NonFinancialCommissionNotFound NonFinancialError = "err_commission_notfound" // Commission not found NonFinancialPaymentCreationFailed NonFinancialError = "err_payment_create" // Failed to create payment NonFinancialMPIVerificationFailed NonFinancialError = "err_mpi" // Failed to verify card NonFinancialCurrencyNotAllowed NonFinancialError = "err_currency_is_not_allowed" // Currency not allowed NonFinancialOperationIncomplete NonFinancialError = "err_look" // Operation incomplete NonFinancialModsEmpty NonFinancialError = "err_mods_empty" // Operation incomplete NonFinancialPaymentTypeError NonFinancialError = "payment_err_type" // Incorrect payment type NonFinancialPaymentCurrencyError NonFinancialError = "err_payment_currency" // Card or transfer currency not allowed NonFinancialExchangeRateNotFound NonFinancialError = "err_payment_exchangerates" // Failed to find corresponding exchange rate NonFinancialInvalidRequestSignature NonFinancialError = "err_signature" // Invalid request signature NonFinancialAPIActionParameterMissing NonFinancialError = "err_api_action" // Action parameter not passed NonFinancialAPICallbackParameterMissing NonFinancialError = "err_api_callback" // Callback parameter not passed NonFinancialAPIIPForbidden NonFinancialError = "err_api_ip" // API call from this IP address is forbidden in this merchant NonFinancialPhoneConfirmationExpired NonFinancialError = "expired_phone" // Payment confirmation deadline by entering phone number expired NonFinancialThreeDSecureExpired NonFinancialError = "expired_3ds" // 3DS client verification deadline expired NonFinancialOTPConfirmationExpired NonFinancialError = "expired_otp" // Payment confirmation deadline by OTP password expired NonFinancialCVVConfirmationExpired NonFinancialError = "expired_cvv" // Payment confirmation deadline by entering CVV code expired NonFinancialPrivat24Expired NonFinancialError = "expired_p24" // Privat24 card selection deadline expired NonFinancialSenderDataExpired NonFinancialError = "expired_sender" // Sender data collection deadline expired NonFinancialPINConfirmationExpired NonFinancialError = "expired_pin" // Payment confirmation deadline by card PIN expired NonFinancialIVRConfirmationExpired NonFinancialError = "expired_ivr" // Payment confirmation deadline by IVR call expired NonFinancialCaptchaConfirmationExpired NonFinancialError = "expired_captcha" // Payment confirmation deadline by captcha expired NonFinancialPasswordConfirmationExpired NonFinancialError = "expired_password" // Payment confirmation deadline by Privat24 password expired NonFinancialSenderAppConfirmationExpired NonFinancialError = "expired_senderapp" // Payment confirmation deadline by Privat24 form expired NonFinancialPreparedTransactionExpired NonFinancialError = "expired_prepared" // Deadline for completing created payment expired NonFinancialMasterPassExpired NonFinancialError = "expired_mp" // Deadline for completing payment in MasterPass wallet expired NonFinancialQRCodeExpired NonFinancialError = "expired_qr" // Deadline for confirming payment by scanning QR code expired NonFinancialCardNot3DSupported NonFinancialError = "5" // Card does not support 3DSecure )
type PayType ¶
type PayType string
const ( PayTypeApplePay PayType = "apay" // Pay with Apple Pay PayTypeGooglePay PayType = "gpay" // Pay with Google Pay PayTypeCard PayType = "card" // Pay with card PayTypePrivat24 PayType = "privat24" // Pay with a Privat24 account PayTypeMomentPart PayType = "moment_part" // Pay with installments PayTypePayPart PayType = "paypart" // Payment by parts PayTypeCash PayType = "cash" // Pay with cash PayTypeInvoice PayType = "invoice" // Pay with an invoice PayTypeQRCodeScanning PayType = "qr" // Pay through QR code scanning )
type RefundRequest ¶
type RefundResponse ¶
type StatusRequest ¶
type StatusResponse ¶
type StatusResponse struct { AcqID int `json:"acq_id"` // Acquirer ID Action Action `json:"action"` // Transaction type: pay, hold, paysplit, subscribe, paydonate, auth, regular AgentCommission float64 `json:"agent_commission"` // Agent commission in payment currency Amount float64 `json:"amount"` // Payment amount AmountBonus float64 `json:"amount_bonus"` // Payer bonus amount in payment currency debit AmountCredit float64 `json:"amount_credit"` // Payment amount for credit in currency of currency_credit AmountDebit float64 `json:"amount_debit"` // Payment amount for debit in currency of currency_debit AuthCodeCredit string `json:"authcode_credit"` // Authorization code for transaction of credit AuthCodeDebit string `json:"authcode_debit"` // Authorization code for transaction of debit BonusProcent float64 `json:"bonus_procent"` // Discount rate in percent BonusType string `json:"bonus_type"` // Bonus type: bonusplus, discount_club, personal, promo CardToken string `json:"card_token"` // Sender's card token CommissionCredit float64 `json:"commission_credit"` // Commission from the receiver in currency_credit CommissionDebit float64 `json:"commission_debit"` // Commission from the sender in currency_debit CreateDate int64 `json:"create_date"` // Date of payment creation Currency Currency `json:"currency"` // Payment currency CurrencyCredit string `json:"currency_credit"` // Transaction currency of credit CurrencyDebit string `json:"currency_debit"` // Transaction currency of debit Description string `json:"description"` // Payment description EndDate int64 `json:"end_date"` // Date of payment edition/end Info string `json:"info"` // Additional payment information IP string `json:"ip"` // Sender's IP address Is3DS bool `json:"is_3ds"` // True if transaction passed with 3DS, false otherwise LiqpayOrderID string `json:"liqpay_order_id"` // Payment order_id in LiqPay system MomentPart string `json:"moment_part"` // Payment indication in parts MPIECI string `json:"mpi_eci"` // MPI ECI: 5 - transaction passed with 3DS, 6 - issuer of payer card doesn't support 3d Secure, 7 - operation passed without 3d Secure OrderID string `json:"order_id"` // Order_id payment PaymentID int `json:"payment_id"` // Payment id in LiqPay system Paytype string `json:"paytype"` // Method of payment: card, privat24, moment_part, cash, invoice, qr PublicKey string `json:"public_key"` // Shop public key ReceiverCommission float64 `json:"receiver_commission"` // Receiver commission in payment currency RRNCredit string `json:"rrn_credit"` // Unique transaction ID in authorization and settlement system of issuer bank for credit RRNDebit string `json:"rrn_debit"` // Unique transaction ID in authorization and settlement system of issuer bank for debit SenderBonus float64 `json:"sender_bonus"` // Sender's bonus in the payment currency SenderCardBank string `json:"sender_card_bank"` // Sender's card bank SenderCardCountry int `json:"sender_card_country"` // Sender's card country (digital ISO 3166-1 code) SenderCardMask2 string `json:"sender_card_mask2"` // Sender's card mask2 SenderCardType string `json:"sender_card_type"` // Sender's card type (MC/Visa) SenderCommission float64 `json:"sender_commission"` // Commission from the sender in the payment currency SenderPhone string `json:"sender_phone"` // Sender's phone number Status Status `json:"status"` // Payment status }
type SubscribePeriod ¶
type SubscribePeriod string
const ( SubscribePeriodDaily SubscribePeriod = "day" // Daily SubscribePeriodWeekly SubscribePeriod = "week" // Weekly SubscribePeriodMonthly SubscribePeriod = "month" // Monthly SubscribePeriodYearly SubscribePeriod = "year" // Yearly )
type SubscriptionRequest ¶
type SubscriptionRequest struct { Action Action `json:"action"` // Action to perform, e.g., "subscribe" Amount float64 `json:"amount"` // Payment amount. For example: 5, 7.34 Card string `json:"card"` // Card number of the payer CardCVV string `json:"card_cvv"` // CVV/CVV2 CardExpMonth string `json:"card_exp_month"` // Expiry month of the payer's card. For example: 08 CardExpYear string `json:"card_exp_year"` // Expiry year of the payer's card. For example: 19 Currency Currency `json:"currency"` // Payment currency. Possible values: USD, EUR, UAH Description string `json:"description"` // Payment description IP string `json:"ip"` // Client IP OrderID string `json:"order_id"` // Unique purchase ID in your shop. Maximum length is 255 symbols Phone string `json:"phone"` // Payer's mobile phone. Language string `json:"language,omitempty"` // Customer's language uk, en Prepare string `json:"prepare,omitempty"` // Preliminary preparation of the payment RecurringByToken string `json:"recurringbytoken,omitempty"` // Generate payer card_token Recurring bool `json:"recurring,omitempty"` // Token recurring payment flag ServerURL string `json:"server_url,omitempty"` // URL API in your store for notifications of payment status change Subscribe string `json:"subscribe,omitempty"` // Regular payment SubscribeDateStart string `json:"subscribe_date_start,omitempty"` // Date of the first payment SubscribePeriod SubscribePeriod `json:"subscribe_periodicity,omitempty"` // Period of payments SenderAddress string `json:"sender_address,omitempty"` // Sender's address SenderCity string `json:"sender_city,omitempty"` // Sender's city SenderCountryCode string `json:"sender_country_code,omitempty"` // Country code of the sender SenderFirstName string `json:"sender_first_name,omitempty"` // Sender's first name SenderLastName string `json:"sender_last_name,omitempty"` // Sender's last name SenderPostalCode string `json:"sender_postal_code,omitempty"` // Sender's zip code Customer string `json:"customer,omitempty"` // Unique customer ID in your shop DAE string `json:"dae,omitempty"` // Detail Addenda Info string `json:"info,omitempty"` // Information to add details to payment ProductCategory string `json:"product_category,omitempty"` // Product category in your shop ProductDescription string `json:"product_description,omitempty"` // Product description in your shop ProductName string `json:"product_name,omitempty"` // Product name in your shop ProductURL string `json:"product_url,omitempty"` // Product page address }
type SubscriptionResponse ¶
type SubscriptionResponse struct { AcqID int64 `json:"acq_id"` // Acquirer ID Action Action `json:"action"` // Transaction type AgentCommission float64 `json:"agent_commission"` // Agent commission in payment currency Amount float64 `json:"amount"` // Payment amount AmountBonus float64 `json:"amount_bonus"` // Payer bonus amount in payment currency debit AmountCredit float64 `json:"amount_credit"` // Payment amount for credit in currency of currency_credit AmountDebit float64 `json:"amount_debit"` // Payment amount for debit in currency of currency_debit CardToken string `json:"card_token"` // Sender's card token CommissionCredit float64 `json:"commission_credit"` // Commission from the receiver in currency_credit CommissionDebit float64 `json:"commission_debit"` // Commission from the sender in currency_debit CreateDate time.Time `json:"create_date"` // Date of payment creation Currency Currency `json:"currency"` // Payment currency CurrencyCredit string `json:"currency_credit"` // Transaction currency of credit CurrencyDebit string `json:"currency_debit"` // Transaction currency of debit Description string `json:"description"` // Payment description EndDate string `json:"end_date"` // Date of payment edition/end Is3DS bool `json:"is_3ds"` // Whether the transaction passed with 3DS LiqpayOrderID string `json:"liqpay_order_id"` // Payment order_id in LiqPay system MPIECI int64 `json:"mpi_eci"` // MPI ECI value OrderID string `json:"order_id"` // Order_id payment PaymentID int64 `json:"payment_id"` // Payment id in LiqPay system PayType string `json:"paytype"` // Methods of payment PublicKey string `json:"public_key"` // Shop public key ReceiverCommission float64 `json:"receiver_commission"` // Receiver commission in payment currency SenderBonus float64 `json:"sender_bonus"` // Sender's bonus in the payment currency SenderCardBank string `json:"sender_card_bank"` // Sender's card bank SenderCardCountry string `json:"sender_card_country"` // Sender's card country SenderCardMask2 string `json:"sender_card_mask2"` // Sender's card SenderCardType string `json:"sender_card_type"` // Sender's card type MC/Visa SenderCommission float64 `json:"sender_commission"` // Commission from the sender in the payment currency SenderPhone string `json:"sender_phone"` // Sender's phone number Status Status `json:"status"` // Payment status TransactionID int64 `json:"transaction_id"` // Id transactions in the LiqPay system Version int `json:"version"` // Version API }
type UnsubscribeRequest ¶
Click to show internal directories.
Click to hide internal directories.