Documentation ¶
Overview ¶
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Package yoopayment describes all the necessary entities for working with YooMoney Payments.
Index ¶
- type Alfabank
- type ApplePay
- type AuthorizationDetails
- type B2BSberbank
- type BankCard
- type Card
- type Cash
- type ConfirmationType
- type Confirmer
- type Deal
- type Embedded
- type External
- type GooglePay
- type Installments
- type MobileApplication
- type MobileBalance
- type PayerBankDetails
- type Payment
- type PaymentList
- type PaymentListFilter
- type PaymentMethodType
- type PaymentMethoder
- type QR
- type Qiwi
- type Recipient
- type Redirect
- type SBP
- type Sberbank
- type Status
- type TinkoffBank
- type Transfer
- type WeChat
- type WebMoney
- type YooMoney
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alfabank ¶
type Alfabank struct { // User's login in Alfa-Click (linked phone number or the additional login). Login string `login:"login,omitempty"` // contains filtered or unexported fields }
type AuthorizationDetails ¶
type AuthorizationDetails struct { // Retrieval Reference Number is a unique identifier of a transaction // in the issuer's system. Used for payments via bank card. RRN string `json:"rrn,omitempty"` // Bank card's authorization code. // Provided by the issuer to confirm authorization. AuthCode string `json:"auth_code,omitempty"` // Information about user’s 3‑D Secure authentication for confirming the payment. ThreeDSecure struct { // Information on whether the 3-D Secure authentication form // is displayed to the user for confirming the payment or not Applied bool `json:"applied,omitempty"` } `json:"three_d_secure,omitempty"` }
Payment authorization details.
type B2BSberbank ¶
type B2BSberbank struct { // Banking details of the payer (legal entity or sole proprietor). PayerBankDetails PayerBankDetails `json:"payer_bank_details,omitempty"` // Purpose of payment (no more than 210 characters). PaymentPurpose string `json:"payment_purpose,omitempty" binding:"max=210"` // Information about the value-added tax (VAT). // A payment might or might not be subject to VAT. // Products may be taxed at the same VAT rate, or at different rates. VATData string `json:"vat_data,omitempty"` // contains filtered or unexported fields }
type BankCard ¶
type BankCard struct { // Bank card details. Card Card `json:"card,omitempty"` // contains filtered or unexported fields }
type Card ¶
type Card struct { // First 6 digits of the card’s number (BIN). // For payments with bank cards saved in YooMoney and other services, // the specified BIN might not correspond with the last4, expiry_year, expiry_month values. First6 string `json:"first6,omitempty"` // Last 4 digits of the card's number. Last4 string `json:"last4,omitempty"` // Expiration date, year, YYYY. ExpiryYear string `json:"expiry_year,omitempty"` // Expiration date, month, MM. ExpiryMonth string `json:"expiry_month,omitempty"` // Type of bank card. Possible values: MasterCard (for Mastercard and Maestro cards), // Visa (for Visa and Visa Electron cards), Mir, UnionPay, JCB, AmericanExpress, // DinersClub, DiscoverCard, InstaPayment, InstaPaymentTM, Laser, Dankort, // Solo, Switch, and Unknown. CardType string `json:"card_type,omitempty"` // Code of the country where the bank card was issued according to ISO-3166 alpha-2. // Example: RU. IssuerCountry string `json:"issuer_country,omitempty"` // Name of the issuing bank. IssuerName string `json:"issuer_name,omitempty"` // Source of bank card details. Possible values: mir_pay, apple_pay, google_pay. // For payments where the user selects a card saved in Mir Pay, Apple Pay or Google Pay. Source string `json:"source,omitempty"` }
Card details.
type ConfirmationType ¶
type ConfirmationType string
const ( TypeEmbedded ConfirmationType = "embedded" TypeExternal ConfirmationType = "external" TypeMobileApplication ConfirmationType = "mobile_application" TypeQR ConfirmationType = "qr" TypeRedirect ConfirmationType = "redirect" )
type Deal ¶
type Deal struct { // Deal ID. ID string `json:"id,omitempty" binding:"min=36,max=50"` // Information about money distribution. Settlements []yoocommon.Settlement `json:"settlements,omitempty"` }
The Deal within which the payment is being carried out.
type Embedded ¶
type Embedded struct { // Confirmation scenario code. Type ConfirmationType `json:"type,omitempty"` // Token for the YooMoney Checkout Widget initialization. ConfirmationToken string `json:"confirmation_token,omitempty"` }
type External ¶
type External struct { // Confirmation scenario code. Type ConfirmationType `json:"type,omitempty"` }
type Installments ¶
type Installments struct {
// contains filtered or unexported fields
}
type MobileApplication ¶
type MobileApplication struct { // Confirmation scenario code. Type ConfirmationType `json:"type,omitempty"` // Deep link to the mobile app where the user confirms the payment. ConfirmationURL string `json:"confirmation_url,omitempty"` }
type MobileBalance ¶
type MobileBalance struct {
// contains filtered or unexported fields
}
type PayerBankDetails ¶
type PayerBankDetails struct { // Full name of the organization. FullName string `json:"full_name,omitempty" binding:"max=800"` // Abbreviated name of the organization. ShortName string `json:"short_name,omitempty" binding:"max=160"` // Address of the organization. Address string `json:"address,omitempty" binding:"max=500"` // Taxpayer Identification Number (INN) of the organization. INN string `json:"inn,omitempty"` // Name of the organization's bank. BankName string `json:"bank_name,omitempty" binding:"min=1,max=350"` // Branch of the organization's bank. BankBranch string `json:"bank_branch,omitempty" binding:"min=1,max=140"` // Bank Identification Code (BIC) of the organization's bank. BankBIK string `json:"bank_bik,omitempty"` // Account number of the organization. Account string `json:"account,omitempty"` // Tax Registration Reason Code (KPP) of the organization. KPP string `json:"kpp,omitempty"` }
Banking details of the payer (legal entity or sole proprietor).
type Payment ¶
type Payment struct { // Payment ID in YooMoney. ID string `json:"id,omitempty"` // Payment Status. Possible values: pending, waiting_for_capture, succeeded, and canceled. Status Status `json:"status,omitempty"` // Payment Amount. Sometimes YooMoney's partners charge additional // commission from the users that is not included in this amount. Amount *yoocommon.Amount `json:"amount,omitempty"` // Amount of payment to be received by the store: the amount value minus the YooMoney commission. IncomeAmount *yoocommon.Amount `json:"income_amount,omitempty"` // Capture defines automatic acceptance of payment Capture bool `json:"capture,omitempty"` // Description of the transaction (maximum 128 characters) displayed in your YooMoney // Merchant Profile, and shown to the user during checkout. For example, // "Payment for order No. 72 for user@yoomoney.ru". Description string `json:"description,omitempty" binding:"max=128"` // Payment Recipient. Recipient *Recipient `json:"recipient,omitempty"` // Payment method used for this payment. PaymentMethod PaymentMethoder `json:"payment_method,omitempty"` // Time of order creation, based on UTC and specified in the ISO 8601 format. // Example: 2017-11-03T11:52:31.827Z CapturedAt *time.Time `json:"captured_at,omitempty"` // Time of order creation, based on UTC and specified in the ISO 8601 format. // Example: 2017-11-03T11:52:31.827Z CreatedAt *time.Time `json:"created_at,omitempty"` // The period during which you can cancel or capture a payment for free. // The payment with the waiting_for_capture status will be automatically // canceled at the specified time. Based on UTC and specified in the ISO 8601 format. // Example: 2017-11-03T11:52:31.827Z ExpiresAt *time.Time `json:"expires_at,omitempty"` // Selected payment confirmation scenario. // For payments requiring confirmation from the user. Confirmation Confirmer `json:"confirmation,omitempty"` // The attribute of a test transaction. Test bool `json:"test,omitempty"` // The amount refunded to the user. Specified if the payment has successful refunds. RefundedAmount *yoocommon.Amount `json:"refunded_amount,omitempty"` // The attribute of a paid order. Paid bool `json:"paid,omitempty"` // Availability of the option to make a refund via API. Refundable bool `json:"refundable,omitempty"` // Status of receipt delivery. ReceiptRegistration Status `json:"receipt_registration,omitempty"` // Any additional data you might require for processing payments // (for example, your internal order ID), specified as a “key-value” pair and // returned in response from YooMoney. Limitations: no more than 16 keys, // no more than 32 characters in the key’s title, no more than 512 characters // in the key’s value, data type is a string in the UTF-8 format. Metadata interface{} `json:"metadata,omitempty"` // Commentary to the canceled status: who and why canceled the payment. CancellationDetails *yoocommon.CancellationDetails `json:"cancellation_details,omitempty"` // Payment authorization details. AuthorizationDetails *AuthorizationDetails `json:"authorization_details,omitempty"` // Information about money distribution: the amounts of transfers and // the stores to be transferred to. Transfers []Transfer `json:"transfers,omitempty"` // The deal within which the payment is being carried out. Deal *Deal `json:"deal,omitempty"` // The identifier of the customer in your system, such as email address or phone number. // No more than 200 characters. MerchantCustomerID string `json:"merchant_customer_id,omitempty" binding:"max=200"` }
The Payment object contains all currently relevant information about the payment. The object is generated during creation of a payment, and sent in response to any payment-related requests.
type PaymentList ¶
type PaymentList struct { // Format of request results output. Possible value: list. Type string `json:"type"` // Array of objects matching the request parameters. Items []Payment `json:"items"` // Cursor to the next fragment of the list. // Example: cursor=37a5c87d-3984-51e8-a7f3-8de646d39ec15 NextCursor string `json:"next_cursor"` }
PaymentList contains list of payments. Data can be filtered.
type PaymentListFilter ¶
type PaymentListFilter struct { // Filter by creation date: time must be greater than the specified // value or equal ("from a certain moment inclusive"). // Specified in the ISO 8601 format. CreatedAtGTE *time.Time `json:"created_at.gte,omitempty"` // Filter by creation date: time must be greater than the specified // value ("from a certain moment exclusive"). // Specified in the ISO 8601 format. CreatedAtGT *time.Time `json:"created_at.gt,omitempty"` // Filter by creation date: time must be less than the specified // value or equal ("until a certain moment inclusive"). // Specified in the ISO 8601 format CreatedAtLTE *time.Time `json:"created_at.lte,omitempty"` // Filter by creation date: time must be less than the specified // value ("until a certain moment exclusive"). // Specified in the ISO 8601 format. CreatedAtLT *time.Time `json:"created_at.lt,omitempty"` // Filter by time of payment capture: time must be greater than the specified // value or equal ("from a certain moment inclusive"). // Specified in the ISO 8601 format. CapturedAtGTE *time.Time `json:"captured_at.gte,omitempty"` // Filter by time of payment capture: time must be greater than the specified // value ("from a certain moment exclusive"). // Specified in the ISO 8601 format. CapturedAtGT *time.Time `json:"captured_at.gt,omitempty"` // Filter by time of payment capture: time must be less than the specified // value or equal ("until a certain moment inclusive"). // Specified in the ISO 8601 format. CapturedAtLTE *time.Time `json:"captured_at.lte,omitempty"` // Filter by time of payment capture: time must be less than the specified // value ("until a certain moment exclusive"). // Specified in the ISO 8601 format. CapturedAtLT *time.Time `json:"captured_at.lt,omitempty"` // Filter by payment method code. Example: bank_card PaymentMethod string `json:"payment_method,omitempty"` // Filter by payment status. Example: succeeded Status Status `json:"status,omitempty"` // Size of the output of request results: number of objects sent in response. // Possible values: 1 to 100. // Default value: 10 Limit int `json:"limit,omitempty"` // Cursor to the next fragment in the list. Example: cursor=37a5c87d-3984-51e8-a7f3-8de646d39ec15 // Use the value of the next_cursor parameter received in response to the previous request as the cursor. // Used if the size of the list is greater than the output size (limit) and the output end hasn't been reached. Cursor string `json:"cursor,omitempty"` }
The request allows you to receive the list of payments filtered by specified criteria.
type PaymentMethodType ¶
type PaymentMethodType string
const ( PaymentTypeAlfabank PaymentMethodType = "alfabank" PaymentTypeApplePay PaymentMethodType = "apple_pay" PaymentTypeB2BSberbank PaymentMethodType = "b2b_sberbank" PaymentTypeBankCard PaymentMethodType = "bank_card" PaymentTypeCash PaymentMethodType = "cash" PaymentTypeGooglePay PaymentMethodType = "google_pay" PaymentTypeInstallments PaymentMethodType = "installments" PaymentTypeMobileBalance PaymentMethodType = "mobile_balance" PaymentTypeQiwi PaymentMethodType = "qiwi" PaymentTypeSberbank PaymentMethodType = "sberbank" PaymentTypeSBP PaymentMethodType = "sbp" PaymentTypeTinkoffBank PaymentMethodType = "tinkoff_bank" PaymentTypeWebmoney PaymentMethodType = "webmoney" PaymentTypeWeChat PaymentMethodType = "wechat" PaymentTypeYooMoney PaymentMethodType = "yoo_money" )
type PaymentMethoder ¶
type PaymentMethoder interface { }
type QR ¶
type QR struct { // Confirmation scenario code. Type ConfirmationType `json:"type,omitempty"` // Data for generating the QR code. ConfirmationData string `json:"confirmation_data,omitempty"` }
type Redirect ¶
type Redirect struct { // Confirmation scenario code. Type ConfirmationType `json:"type,omitempty"` // The URL that the user will be redirected to for payment confirmation. ConfirmationURL string `json:"confirmation_url,omitempty"` // A request for making a payment with authentication by 3-D Secure. // It works if you accept bank card payments without user confirmation by default. // In other cases, the 3-D Secure authentication will be handled by YooMoney. // If you would like to accept payments without additional confirmation by the user, // contact your YooMoney manager. Enforce bool `json:"enforce,omitempty"` // The URL that the user will return to after confirming or // canceling the payment on the webpage. ReturnURL string `json:"return_url,omitempty" binding:"max=2048"` }
type Sberbank ¶
type Sberbank struct { // Bank card details. Card Card `json:"card,omitempty"` // The phone number specified during the registration process // of the SberPay account, specified in the ITU-T E.164 format, // for example, 79000000000. Phone string `json:"phone,omitempty"` // contains filtered or unexported fields }
type Status ¶
type Status string
const ( // Pending - data is being processed. Pending Status = "pending" // Waiting for capture. WaitingForCapture Status = "waiting_for_capture" // Succeeded — receipt successfully registered. Succeeded Status = "succeeded" // Canceled — receipt was not registered, you need to create it independently. Canceled Status = "canceled" )
type TinkoffBank ¶
type TinkoffBank struct {
// contains filtered or unexported fields
}
type Transfer ¶
type Transfer struct { // ID of the store in favor of which you're accepting the receipt. // Provided by YooMoney, displayed in the Sellers section of your Merchant Profile (shopId column). AccountID string `json:"account_id,omitempty"` // Amount to be transferred to the store. Amount yoocommon.Amount `json:"amount,omitempty"` // Status of the money distribution between stores. Status Status `json:"status,omitempty"` // Commission for sold products or services charged in your favor. PlatformFeeAmount yoocommon.Amount `json:"platform_fee_amount,omitempty"` // Transaction description, which the seller will see in the YooMoney Merchant Profile. // Example: "Marketplace order No. 72". Description string `json:"description,omitempty" binding:"max=128"` // Any additional data you might require for processing payments // (for example, your internal order ID), specified as a “key-value” pair and returned in response from YooMoney. // Limitations: no more than 16 keys, no more than 32 characters in the key’s title, // no more than 512 characters in the key’s value, data type is a string in the UTF-8 format. Metadata interface{} `json:"metadata,omitempty"` }
Information about money distribution: the amounts of transfers and the stores to be transferred to.