Documentation
¶
Index ¶
- func Time(t time.Time) int64
- type AVSResult
- type Address
- type BankAccount
- type BankAccountCA
- type BankAccountCACreate
- type BankAccountDebited
- type BankAccountGB
- type BankAccountGBCreate
- type BankAccountIBAN
- type BankAccountIBANCreate
- type BankAccountOther
- type BankAccountOtherCreate
- type BankAccountType
- type BankAccountUSCreate
- type BankAccountV2
- type BankingAlias
- type BankingAliasCountry
- type BankingAliasCreate
- type BankingAliasType
- type BankingAliasing
- type BankwireCreate
- type BankwireDirect
- type BankwireDirectCreate
- type BankwireExternalInstruction
- type BankwireToClientCreditWalletCreate
- type Billing
- type Birthplace
- type Business
- type Card
- type CardDeactivate
- type CardDirect
- type CardDirectCreate
- type CardPreAuthorized
- type CardPreAuthorizedCreate
- type CardRegistration
- type CardRegistrationCreate
- type CardRegistrationUpdate
- type CardStatus
- type CardType
- type CardValidity
- type CardWeb
- type CardWebCreate
- type Client
- type ClientLogo
- type ClientUpdate
- type ClientWallet
- type ClientWalletAlias
- type CultureCode
- type DepositAccount
- type DirectDebit
- type DirectDebitDirect
- type DirectDebitDirectCreate
- type DirectDebitWeb
- type Dispute
- type DisputeDocRefusedReasonType
- type DisputeDocument
- type DisputeDocumentCreate
- type DisputeDocumentType
- type DisputeReason
- type DisputeReasonType
- type DisputeStatus
- type DisputeType
- type DocumentStatus
- type DocumentType
- type DownloadFormat
- type Error
- type ErrorType
- type Event
- type EventType
- type Execution
- type Funds
- type GroupType
- type Hook
- type HookCreate
- type HookStatus
- type HookValidity
- type IempotencyResponse
- type InvitationStatus
- type KYCDocument
- type KYCDocumentCreate
- type KYCLevel
- type KYCPage
- type LegalPerson
- type LegalUser
- type LegalUserCreate
- type LegalUserUpdate
- type Mandate
- type MandateCreate
- type MandateCultureCode
- type MandateExecutionType
- type MandateScheme
- type MandateStatus
- type MandateType
- type Money
- type NaturalUser
- type NaturalUserCreate
- type NaturalUserUpdate
- type PayOut
- type PayOutCreate
- type PayOutPayment
- type Payin
- type Payment
- type PaymentStatus
- type PermissionGroup
- type PermissionGroupCreate
- type PermissionGroupUpdate
- type Permissions
- type Person
- type PlatformCategorization
- type PreAuthorization
- type PreAuthorizationExecutionType
- type PreAuthorizationStatus
- type Query
- type Rate
- type RateLimit
- type Refund
- type RefundCreate
- type RefundReason
- type RefundReasonType
- type RefusedReason
- type Report
- type ReportFilter
- type ReportTransactionCreate
- type ReportType
- type ReportWalletCreate
- type Repudiation
- type SSO
- type SSOCreate
- type SSOUpdate
- type Scopes
- type Sector
- type SecureMode
- type SecurityInfo
- type SettlementTransfer
- type SettlementTransferCreate
- type TansfertCreate
- type TemplateURLOptions
- type Transaction
- type TransactionNature
- type TransactionStatus
- type TransactionType
- type Transfert
- type UBO
- type UBOCreate
- type UBODeclarationStatus
- type UBOReason
- type UBOUpdate
- type User
- type UserEmoney
- type UserEmoneyParam
- type Wallet
- type WalletCreate
- type WalletUpdate
- type WebExtended
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Address struct { // Line1 is the first line of the address. Line1 string `json:"AddressLine1"` // Line2 is the second line of the address. Line2 string `json:"AddressLine2,omitempty"` // City is the city of the address. City string `json:"City"` // Region is the region of the address - this is optional except if the Country is US, CA or MX. Region string `json:"Region"` // PostalCode is the postal code of the address - can be alphanumeric, dashes or spaces. PostalCode string `json:"PostalCode"` // Country is the Country of the Address. Country string `json:"Countrys"` }
Address represent an address.
type BankAccount ¶
type BankAccount struct { ID string `json:"Id"` // The object owner's UserId UserID string `json:"UserId"` // The name of the owner of the bank account OwnerName string `json:"OwnerName"` // The address of the owner of the bank account OwnerAddress Address `json:"OwnerAddress"` // The type of bank account Type BankAccountType `json:"Type"` // Whether the bank account is active or not Active bool `json:"Active"` }
BankAccount is the old version of BankAccountV2 ?? can we name it BankAccountAccess ??
type BankAccountCA ¶
type BankAccountCA struct { ID string `json:"Id"` // The type of bank account Type BankAccountType `json:"Type"` // The address of the owner of the bank account OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account OwnerName string `json:"OwnerName"` // The object owner's UserId UserID string `json:"UserId"` // Whether the bank account is active or not Active bool `json:"Active"` // The institution number of the bank account. // Must be numbers only, and 3 or 4 digits long InstitutionNumber string `json:"InstitutionNumber"` // The account number of the bank account. // Must be numbers only. Canadian account numbers must be a maximum of 20 digits. AccountNumber string `json:"AccountNumber"` // The branch code of the bank where the bank account. // Must be numbers only, and 5 digits long BranchCode string `json:"BranchCode"` // The name of the bank where the account is held. // Must be letters or numbers only and maximum 50 characters long. BankName string `json:"BankName"` }
BankAccountCA represents the bank account informations for Canada.
type BankAccountCACreate ¶
type BankAccountCACreate struct { // The address of the owner of the bank account REQUIRED. OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account REQUIRED. OwnerName string `json:"OwnerName"` // The branch code of the bank where the bank account REQUIRED. // Must be numbers only, and 5 digits long. BranchCode string `json:"BranchCode"` // The institution number of the bank account REQUIRED. // Must be numbers only, and 3 or 4 digits long. InstitutionNumber string `json:"InstitutionNumber"` // The account number of the bank account REQUIRED. // Must be numbers only. Canadian account numbers must be a maximum of 20 digits. AccountNumber string `json:"AccountNumber"` // The name of the bank where the account is held REQUIRED. // Must be letters or numbers only and maximum 50 characters long. BankName string `json:"BankName"` }
BankAccountCACreate is the payload used to create an new bank account in Canada.
type BankAccountDebited ¶
type BankAccountGB ¶
type BankAccountGB struct { ID string `json:"Id"` // The type of bank account Type BankAccountType `json:"Type"` // The address of the owner of the bank account OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account OwnerName string `json:"OwnerName"` // The object owner's UserId UserID string `json:"UserId"` // Whether the bank account is active or not Active bool `json:"Active"` // The sort code of the bank account. Must be numbers only, and 6 digits long SortCode string `json:"SortCode"` // The account number of the bank account. Must be numbers only. GB account numbers must be 8 digits long. AccountNumber string `json:"AccountNumber"` }
BankAccountGB represents the bank account in Great Britain.
type BankAccountGBCreate ¶
type BankAccountGBCreate struct { // The address of the owner of the bank account REQUIRED. OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account REQUIRED. OwnerName string `json:"OwnerName"` // The sort code of the bank account. Must be numbers only, and 6 digits long REQUIRED. SortCode string `json:"SortCode"` // The account number of the bank account. Must be numbers only. GB account numbers must be 8 digits long. REQUIRED. AccountNumber string `json:"AccountNumber"` }
BankAccountGBCreate is the payload used to create a new bank account in Great Britain.
type BankAccountIBAN ¶
type BankAccountIBAN struct { ID string `json:"Id"` // The type of bank account Type BankAccountType `json:"Type"` // The address of the owner of the bank account OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account OwnerName string `json:"OwnerName"` // The object owner's UserId UserID string `json:"UserId"` // Whether the bank account is active or not Active bool `json:"Active"` // The IBAN of the bank account IBAN string `json:"IBAN"` // The BIC of the bank account BIC string `json:"BIC"` }
BankAccountIBAN is the IBAN informations to create bankwire.
type BankAccountIBANCreate ¶
type BankAccountIBANCreate struct { // The address of the owner of the bank account REQUIRED. OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account REQUIRED. OwnerName string `json:"OwnerName"` // The IBAN of the bank account REQUIRED. IBAN string `json:"IBAN"` // The BIC of the bank account OPTIONAL. BIC string `json:"BIC,omitempty"` }
BankAccountIBANCreate contain all data in order to save som account IBAN informations.
type BankAccountOther ¶
type BankAccountOther struct { ID string `json:"ID"` // The type of bank account Type BankAccountType `json:"Type"` // The address of the owner of the bank account OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account OwnerName string `json:"OwnerName"` // The object owner's UserId UserID string `json:"UserId"` // Whether the bank account is active or not Active bool `json:"Active"` }
BankAccountOther represent a bank account fron another country.
type BankAccountOtherCreate ¶
type BankAccountOtherCreate struct { // The address of the owner of the bank account REQUIRED. OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account REQUIRED. OwnerName string `json:"OwnerName"` // The Country of the Address REQUIRED. Country string `json:"Country"` // The BIC of the bank account REQUIRED. BIC string `json:"BIC"` // The account number of the bank account REQUIRED. // Must be numbers only. Canadian account numbers must be a maximum of 20 digits. AccountNumber string `json:"AccountNumber"` }
BankAccountOtherCreate is the payload used to create a new bank account in an other country.
type BankAccountType ¶
type BankAccountType string
The type of BankAccount
const ( BankAccountTypeIBAN BankAccountType = "IBAN" BankAccountTypeGB BankAccountType = "GB" BankAccountTypeUS BankAccountType = "US" BankAccountTypeCA BankAccountType = "CA" BankAccountTypeOther BankAccountType = "OTHER" )
type BankAccountUSCreate ¶
type BankAccountUSCreate struct { // The address of the owner of the bank account REQUIRED. OwnerAddress Address `json:"OwnerAddress"` // The name of the owner of the bank account REQUIRED. OwnerName string `json:"OwnerName"` // The account number of the bank account. US account numbers must be digits only REQUIRED. AccountNumber string `json:"AccountNumber"` // The ABA of the bank account. Must be numbers only, and 9 digits long REQUIRED ABA string `json:"ABA"` // The type of account OPTIONAL DepositAccount DepositAccount `json:"DepositAccount,omitempty"` }
BankAccountUSCreate is the payload used to create an account in US.
type BankAccountV2 ¶
type BankAccountV2 struct { // The BIC of the bank account BIC string `json:"BIC"` // The IBAN of the bank account IBAN string `json:"IBAN"` // The name of the owner of the bank account OwnerName string `json:"OwnerName"` // The address of the owner of the bank account OwnerAddress string `json:"OwnerAddress"` // The type of bank account Type BankAccountType `json:"Type"` }
BankAccountV2 describes a bank account access. ?? can we name it BankAccount ??
type BankingAlias ¶
type BankingAlias struct { // The user ID who is credited (defaults to the owner of the wallet) CreditedUserID string `json:"CreditedUserId"` // The ID of a wallet WalletID string `json:"WalletId"` // The type of banking alias (note that only IBAN is available at present) Type BankingAliasType `json:"Type"` // The Country of the Address Country country.ISO2 `json:"Country"` // The owner of the wallet/banking alias OwnerName string `json:"OwnerName"` // Whether the banking alias is active or not Active bool `json:"Active"` }
BankingAlias allow you to create a way to pay funds directly into a wallet, without having to declare the payin beforehand (unlike a traditional payin bankwire). For example, if you create an IBAN banking alias for a wallet, you'll be given a unique IBAN and BIC for this wallet. Any funds that we receive for this IBAN and BIC will be automatically credited to the wallet. You should be aware that you are unable to add Fees to a payin created via a banking alias.
type BankingAliasCountry ¶
type BankingAliasCountry string
BankingAliasCountry is the country format for the banking alias. Note that FR is not currently available, but will be shortly.
const ( BankingAliasCountryLU BankingAliasCountry = "LU" BankingAliasCountryFR BankingAliasCountry = "FR" )
type BankingAliasCreate ¶
type BankingAliasCreate struct { // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserID string `json:"CreditedUserId"` // The owner of the wallet/banking alias REQUIRED. OwnerName string `json:"OwnerName"` // The country format for the banking alias. Note that we only provide FR and LU IBAN. REQUIRED Country BankingAliasCountry `json:"Country"` }
type BankingAliasType ¶
type BankingAliasType string
BankingAliasType is the type of banking alias. Currently only IBAN is supported.
const ( // BankingAliasIBAN stands for BankingAliasType IBAN. BankingAliasIBAN BankingAliasType = "IBAN" )
type BankingAliasing ¶
type BankingAliasing struct { // The user ID who is credited (defaults to the owner of the wallet) CreditedUserID string `json:"CreditedUserId"` // The ID of a wallet WalletID string `json:"WalletId"` // The type of banking alias (note that only IBAN is available at present) Type BankingAliasType `json:"Type"` // The Country of the Address Country country.ISO2 `json:"Country"` // The owner of the wallet/banking alias OwnerName string `json:"OwnerName"` // Whether the banking alias is active or not Active bool `json:"Active"` // The IBAN of the banking alias IBAN string `json:"IBAN"` // The BIC of the banking alias BIC string `json:"BIC"` }
BankingAliasing is for Banking IBAN details.
type BankwireCreate ¶
type BankwireCreate struct { // The ID of the wallet where money will be credited REQUIRED. CreditedWalletId ClientWalletAlias `json:"CreditedWalletId"` // The declared debited funds REQUIRED. DeclaredDebitedFunds Money `json:"DeclaredDebitedFunds"` }
Create a Bankwire PayIn to your Client Credit Wallet
It is possible to add funds to your Credit/Repudiation Wallets via a PayIn Bankwire in order to settle the funds after a dispute. This endpoint can be used only for this purpose. For more information check The Settement Transfer object on the doc.
type BankwireDirect ¶
type BankwireDirect struct { ID string `json:"Id"` // Custom data that you can add to this item OPTIONAL. Tag string `json:"Tag"` CreationDate int64 `json:"CreationDate"` // The type of payin Payment Payment `json:"Payment"` // The type of execution for the payin Execution Execution `json:"Execution"` // The declared debited funds DeclaredDebitedFunds Money `json:"DeclaredDebitedFunds"` // The declared fees DeclaredFees Money `json:"DeclaredFees"` // Wire reference WireReference string `json:"WireReference"` // Bank account details BankAccount BankAccountV2 `json:"BankAccount"` }
type BankwireDirectCreate ¶
type BankwireDirectCreate struct { // A user's ID REQUIRED. AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserID string `json:"CreditedUserId,omitempty"` // The ID of the wallet where money will be credited REQUIRED. CreditedWalletID string `json:"CreditedWalletId"` // The declared debited funds REQUIRED. DeclaredDebitedFunds Money `json:"DeclaredDebitedFunds"` // The declared fees REQUIRED. DeclaredFees Money `json:"DeclaredFees"` }
type BankwireExternalInstruction ¶
type BankwireExternalInstruction struct { // The ID of a banking alias BankingAliasID string `json:"BankingAliasId"` // Wire reference WireReference string `json:"WireReference"` // Information about the account that was debited BankAccountDebited BankAccountDebited `json:"DebitedBankAccount"` }
A bankwire by "external instruction" is a slightly particular payin whereby (BETA*). it is created when we receive funds for a banking alias
- this means there is no way of creating a payin of this kind via the API (in sandbox, please contact our support team for them to create some examples for you).
type BankwireToClientCreditWalletCreate ¶
type BankwireToClientCreditWalletCreate struct { // The ID of the wallet where money will be credited REQUIRED. CreditedWalletID ClientWalletAlias // ?? this should be a string for ID ??. // The declared debited funds REQUIRED. DeclaredDebitedFunds Money }
PayInBankwireToClientCreditWalletCreate make it is possible to add funds to your Credit/Repudiation Wallets via a PayIn Bankwire in order to settle the funds after a dispute. This endpoint can be used only for this purpose. For more information check The Settement Transfer object on the doc
type Birthplace ¶
type Business ¶
type Business string
Business for the business type.
const ( // BusinessMarketplace is for a bunisess in marketplace. BusinessMarketplace Business = "MARKETPLACE" // BusinessCrowdfunding is for a bunisess in crowdfunding. BusinessCrowdfunding Business = "CROWDFUNDING" // BusinessFranchise is for a bunisess in franchise. BusinessFranchise Business = "FRANCHISE" // BusinessOther is for a bunisess in other. BusinessOther Business = "OTHER" )
type Card ¶
type Card struct { // The expiry date of the card - must be in format MMYY ExpirationDate int64 `json:"ExpirationDate"` // A partially obfuscated version of the credit card number Alias string `json:"Alias"` // The provider of the card CardProvider string `json:"CardProvider"` // The type of card . The card type is optional, but the default parameter is "CB_VISA_MASTERCARD" . CardType CardType `json:"CardType"` // The Country of the Address Country string `json:"Country"` // The card product type - more info Product string `json:"Product"` // The BankCode of the card. BankCode string `json:"BankCode"` // Whether the card is active or not Active bool `json:"Active"` // The currency - should be ISO_4217 format Currency currency.ISO3 `json:"Currency"` // Whether the card is valid or not. Once they process (or attempt to process) a payment with the card we are able to indicate if it is "valid" or "invalid". If they didn’t process a payment yet the "Validity" stay at "unknown". Validity CardValidity `json:"Validity"` // A unique representation of a 16-digits card number Fingerprint string `json:"Fingerprint"` }
Card represents the card.
type CardDeactivate ¶
type CardDeactivate struct { // Whether the card is active or not (OPTIONAL). Active bool `json:"Active"` }
CardDeactivate let you desactivate or activate a Card.
type CardDirect ¶
type CardDirect struct { // This is the URL where users are automatically redirected after 3D secure validation (if activated). SecureModeReturnURL string `json:"SecureModeReturnURL"` // The ID of a card CardID string `json:"CardId"` // The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. // This field lets you activate it manually. // The field lets you activate it automatically with "DEFAULT" // (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), // "FORCE" (if you wish to specifically force the secured mode). SecureMode SecureMode `json:"SecureMode"` // A custom description to appear on the user's bank statement. // It can be up to 10 characters long, and can only include alphanumeric characters or spaces. // See here for important info. Note that each bank handles this information differently, some show less or no information. StatementDescriptor string `json:"StatementDescriptor"` // Contains every useful informations related to the user billing. Billing Billing `json:"Billing"` // Contains useful informations related to security and fraud. SecurityInfo SecurityInfo `json:"SecurityInfo"` // The language to use for the payment page - needs to be the ISO code of the language. Culture CultureCode `json:"Culture"` // The value is 'true' if the SecureMode was used. SecureModeNeeded bool `json:"SecureModeNeeded"` // This is the URL where to redirect users to proceed to 3D secure validation. SecureModeRedirectURL string `json:"SecureModeRedirectUrl"` }
type CardDirectCreate ¶
type CardDirectCreate struct { // A user's ID REQUIRED. AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserID string `json:"CreditedUserId,omitempty"` // The ID of the wallet where money will be credited REQUIRED. CreditedWalletID string `json:"CreditedWalletId"` // Information about the funds that are being debited REQUIRED DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client REQUIRED. // for this transaction (and were hence transferred to the Client's platform wallet). Fees Money `json:"Fees"` // This is the URL where users are automatically redirected after 3D secure validation (if activated) REQUIRED. SecureModeReturnURL string `json:"SecureModeReturnURL"` // The ID of a card REQUIRED. CardID string `json:"CardId"` // The SecureMode corresponds to '3D secure' for CB Visa and MasterCard OPTIONAL. // This field lets you activate it manually. // The field lets you activate it automatically with "DEFAULT" // (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), // "FORCE" (if you wish to specifically force the secured mode). SecureMode SecureMode `json:"SecureMode,omitempty"` // A custom description to appear on the user's bank statement OPTIONAL. // It can be up to 10 characters long, and can only include alphanumeric characters or spaces. // See here for important info. Note that each bank handles this information differently, some show less or no information. StatementDescriptor string `json:"StatementDescriptor,omitempty"` // Contains every useful informations related to the user billing OPTIONAL. Billing Billing `json:"Billing,omitempty"` // The language to use for the payment page OPTIONAL. // - needs to be the ISO code of the language. Culture CultureCode `json:"Culture,omitempty"` // Custom data that you can add to this item OPTIONAL. Tag string `json:"Tag,omitempty"` }
type CardPreAuthorized ¶
type CardPreAuthorized struct { string `json:"PreauthorizationId"` }PreauthorizationID
type CardPreAuthorizedCreate ¶
type CardPreAuthorizedCreate struct { // A user's ID OPTIONAL. AuthorID string `json:"AuthorId,omitempty"` // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserID string `json:"CreditedUserId,omitempty"` // The ID of the wallet where money will be credited REQUIRED. CreditedWalletID string `json:"CreditedWalletId"` // Information about the funds that are being debited REQUIRED. DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client for this transaction // (and were hence transferred to the Client's platform wallet) REQUIRED. Fees Money `json:"Fees"` PreauthorizationID string `json:"PreauthorizationId"` }
type CardRegistration ¶
type CardRegistration struct { // ID of the current card's registration. ID string `json:"Id"` // ?? new ?? // The object owner's UserId. UserID string `json:"UserId"` // The currency - should be ISO_4217 format. Currency currency.ISO3 `json:"Currency"` // A special key to use when registering a card. AccessKey string `json:"AccessKey"` // A specific value to pass to the CardRegistrationURL. PreregistrationData string `json:"PreregistrationData"` // The URL to submit the card details form to. CardRegistrationURL string `json:"CardRegistrationURL"` // Having registered a card, this confirmation hash needs to be updated to the card item. RegistrationData string `json:"RegistrationData"` // The type of card . The card type is optional, but the default parameter is "CB_VISA_MASTERCARD". CardType CardType `json:"CardType"` // The ID of a card. CardID string `json:"CardId"` // The result code. ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode. ResultMessage string `json:"ResultMessage"` // Status of the card registration. Status CardStatus `json:"Status"` // Tag of the card. Tag string `json:"Tag"` // ?? new ?? // CreationDate CreationDate int64 `json:"CreationDate"` // ?? new ?? }
CardRegistration you need to register a card in order to process a Direct PayIn. Card registration enables you to tokenize a Card. These are the steps to follow: - Create a CardRegistration Object (1. 2. & 3. in the diagram). - Get the PreRegistrationData , CardRegistrationURL and AccessKey (4. in the diagram). - The user posts PreRegistrationData, AccessKey and card details through a form to the CardRegistrationURL (5. in the diagram). - Get a RegistrationData back (6. in the diagram). - Edit the CardRegistration Object with the RegistrationData just received (7.8. in the diagram). - Get the CardId ready to use into the Direct PayIn Object (9. in the diagram).
type CardRegistrationCreate ¶
type CardRegistrationCreate struct { // The object owner's UserId (REQUIRED). UserID string `json:"UserId"` // The currency - should be ISO_4217 format (REQUIRED). Currency currency.ISO3 `json:"Currency"` // The type of card. The card type is optional, but the default parameter is "CB_VISA_MASTERCARD" (OPTIONAL). CardType CardType `json:"CardType,omitempty"` }
CardRegistrationCreate is the payload used for registering a new Card.
type CardRegistrationUpdate ¶
type CardRegistrationUpdate struct { // Having registered a card, this confirmation hash needs to be updated to the card item (OPTIONAL). RegistrationData string `json:"RegistrationData"` }
CardRegistrationUpdate is a payload used for updating a card's registration.
type CardStatus ¶
type CardStatus string
CardStatus is the kind of status of a card.
const ( // CardStatusCreated is used for a created status. CardStatusCreated CardStatus = "CREATED" // CardStatusValidated is used for a validated status. CardStatusValidated CardStatus = "VALIDATED" // CardStatusError is used for a error status. CardStatusError CardStatus = "ERROR" )
type CardType ¶
type CardType string
CardType is the kind of card.
const ( // CardCBvisaMastercard is used for type CB VISA MASTERCARD CardCBvisaMastercard CardType = "CB_VISA_MASTERCARD" // CardDiners is used for Diners card. CardDiners CardType = "DINERS" // CardMasterpass is used for Masterpass card. CardMasterpass CardType = "MASTERPASS" // CardAmex is used for Amex card. CardAmex CardType = "AMEX " // CardMaestro is used for Maestro card. CardMaestro CardType = "MAESTRO" // CardP24 is used for P24 card. CardP24 CardType = "P24" // CardIdeal is used for IDEAL card. CardIdeal CardType = "IDEAL" // CardBcmc is used for BCMC card. CardBcmc CardType = "BCMC" // CardPaylib is used for Paylib card. CardPaylib CardType = "PAYLIB" )
type CardValidity ¶
type CardValidity string
CardValidity is for the validity of the Card.
const ( // CardValidityUnknown is used for a validity status unknown. CardValidityUnknown CardValidity = "UNKNOWN" // CardValidityValid is used for a validity status valid. CardValidityValid CardValidity = "VALID" // CardValidityInvalid is used for a validity status invalid. CardValidityInvalid CardValidity = "INVALID" )
type CardWeb ¶
type CardWeb struct { // The URL to redirect to after payment (whether successful or not). ReturnURL string // The type of card . The card type is optional, but the default parameter is "CB_VISA_MASTERCARD". CardType CardType // The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. // This field lets you activate it manually. // The field lets you activate it automatically // with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), // "FORCE" (if you wish to specifically force the secured mode). SecureMode SecureMode // The language to use for the payment page - needs to be the ISO code of the language Culture CultureCode // The URL to use for the payment page template TemplateURL string // A custom description to appear on the user's bank statement. // It can be up to 10 characters long, and can only include alphanumeric characters or spaces. // See here for important info. Note that each bank handles this information differently, some show less or no information. StatementDescriptor string // The URL to redirect to user to for them to proceed with the payment. RedirectURL string }
type CardWebCreate ¶
type CardWebCreate struct { // Custom data that you can add to this item OPTIONAL. Tag string `json:"Tag,omitempty"` // A user's ID REQUIRED. AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserID string `json:"CreditedUserId,omitempty"` // Information about the funds that are being debited REQUIRED. DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client REQUIRED. // for this transaction (and were hence transferred to the Client's platform wallet). Fees Money `json:"Fees"` // The URL to redirect to after payment (whether successful or not) REQUIRED. ReturnURL string `json:"ReturnURL"` // The type of card . The card type is optional, but the default parameter is "CB_VISA_MASTERCARD" REQUIRED. CardType CardType `json:"CardType"` // The ID of the wallet where money will be credited REQUIRED. CreditedWalletID string `json:"CreditedWalletId"` // The SecureMode corresponds to '3D secure' for CB Visa and MasterCard OPTIONAL. // This field lets you activate it manually. The field lets you activate it automatically // with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), // "FORCE" (if you wish to specifically force the secured mode). SecureMode SecureMode `json:"SecureMode,omitempty"` // The language to use for the payment page - needs to be the ISO code of the language REQUIRED. Culture CultureCode `json:"Culture"` // A URL to an SSL page to allow you to customise the payment page OPTIONAL. // Must be in the format: array("PAYLINE"=>"https://...") and meet all the specifications listed here. // Note that only a template for Payline is currently available. TemplateURLOptions TemplateURLOptions `json:"TemplateURLOptions,omitempty"` // A custom description to appear on the user's bank statement OPTIONAL. // It can be up to 10 characters long, and can only include alphanumeric characters or spaces. // See here for important info. Note that each bank handles this information differently, some show less or no information. StatementDescriptor string `json:"StatementDescriptor,omitempty"` }
type Client ¶
type Client struct { // Name it the pretty name for the client. Name string `json:"name"` // RegisteredName it the registered name of your company. RegisteredName string `json:"RegisteredName"` // ClientID is an ID for the client (i.e. url friendly, lowercase etc - sort of namespace identifier). ClientID string `json:"ClientId"` // PrimaryThemeColour is the primary branding colour to use for your merchant. PrimaryThemeColour string `json:"PrimaryThemeColour"` // PrimaryButtonColour is the primary branding colour to use for buttons for your merchant. PrimaryButtonColour string `json:"PrimaryButtonColour"` // Logo is the URL of the logo of your client. Logo string `json:"Logo"` // TechEmails is a list of email addresses to use when contacting you for technical issues/communications. TechEmails []string `json:"TechEmails"` // AdminEmails is a list of email addresses to use when contacting you for admin/commercial issues/communications. AdminEmails []string `json:"AdminEmails"` // FraudEmails is a list of email addresses to use when contacting you for fraud/compliance issues/communications. FraudEmails []string `json:"FraudEmails"` // BillingEmails is a list of email addresses to use when contacting you for billing issues/communications. BillingEmails []string `json:"BillingEmails"` // PlatformCategorization is the Categorization of your platform, in terms of Business Type and Sector. PlatformCategorization PlatformCategorization `json:"PlatformCategorization"` // PlatformDescription is a description of what your platform does. PlatformDescription string `json:"PlatformDescription"` // PlatformURL is the URL for your website. PlatformURL string `json:"PlatformURL"` // HeadquartersAddress is the address of the company’s headquarters. This field is mandatory to accept payout (More info here). HeadquartersAddress Address `json:"HeadquartersAddress"` // TaxNumber is the tax (or VAT) number for your company. TaxNumber string `json:"TaxNumber"` // CompanyReference is your unique MANGOPAY reference which you should use when contacting us. CompanyReference string `json:"CompanyReference"` }
Client represents a client.
type ClientLogo ¶
type ClientLogo struct {
File string `json:"File"`
}
ClientLogo is the payload used for updating the Logo image of the client. the value in file must be encoded in a base64 format.
func NewClientLogo ¶
func NewClientLogo(data []byte) *ClientLogo
NewClientLogo is giving a new ClientLogo from a data bytes file, it is encoding into base64 format the given bytes.
type ClientUpdate ¶
type ClientUpdate struct { // AdminEmails is a list of email addresses to use when contacting you for admin/commercial issues/communications. AdminEmails []string `json:"AdminEmails,omitempty"` // TechEmails is a list of email addresses to use when contacting you for technical issues/communications. TechEmails []string `json:"TechEmails,omitempty"` // BillingEmails is a list of email addresses to use when contacting you for billing issues/communications. BillingEmails []string `json:"BillingEmails,omitempty"` // FraudEmails is a list of email addresses to use when contacting you for fraud/compliance issues/communications. FraudEmails []string `json:"FraudEmails,omitempty"` // HeadquartersAddress is the address of the company’s headquarters. This field is mandatory to accept payout (More info here). HeadquartersAddress Address `json:"HeadquartersAddress,omitempty"` // TaxNumber is the tax (or VAT) number for your company. TaxNumber string `json:"TaxNumber,omitempty"` // PlatformCategorization is the Categorization of your platform, in terms of Business Type and Sector. PlatformCategorization PlatformCategorization `json:"PlatformCategorization,omitempty"` // PlatformDescription is a description of what your platform does. PlatformDescription string `json:"PlatformDescription,omitempty"` // PlatformURL is the URL for your website. PlatformURL string `json:"PlatformURL,omitempty"` // PrimaryThemeColour is the primary branding colour to use for your merchant. PrimaryThemeColour string `json:"PrimaryThemeColour,omitempty"` // PrimaryButtonColour is the primary branding colour to use for buttons for your merchant. PrimaryButtonColour string `json:"PrimaryButtonColour,omitempty"` }
ClientUpdate is the payload used for updating a client.
type ClientWallet ¶
type ClientWallet struct { //Balance is the current balance of the wallet. Balance Money `json:"Balance"` // FundsType is the type of funds in the wallet. FundsType Funds `json:"FundsType"` }
ClientWallet is very similar to a normal wallet except the parameters "Description" and "Owners" are removed. Currently, there are two types of client wallet (specified by the "FundsType" parameter) - "FEES" where your collected turnover is stored and "CREDIT" where repudiations are taken from. A normal wallet for a user has the "FundsType" of "DEFAULT".
type ClientWalletAlias ¶
type ClientWalletAlias string
An alias for a client wallet - made up from the FundsType and the Currency - "FEES_EUR" would therefore give the client's FEES wallet for EUR
const ( ClientWalletAliasFeeEUR ClientWalletAlias = "FEES_EUR" ClientWalletAliasCreditEUR ClientWalletAlias = "CREDIT_EUR" ClientWalletAliasFeeUSD ClientWalletAlias = "FEES_USD" ClientWalletAliasCreditUSD ClientWalletAlias = "CREDIT_USD" ClientWalletAliasFeeGBP ClientWalletAlias = "FEES_GBP" ClientWalletAliasCreditGBP ClientWalletAlias = "CREDIT_GBP" ClientWalletAliasOthers ClientWalletAlias = "..." // ? is it for some other currencies ? )
type CultureCode ¶
type CultureCode string
CultureCode is the language to use for the payment webpage.
const ( // CultureCodeDE is the culture code for the country iso2 DE. CultureCodeDE CultureCode = "DE" // CultureCodeEN is the culture code for the country iso2 EN. CultureCodeEN CultureCode = "EN" // CultureCodeDA is the culture code for the country iso2 DA. CultureCodeDA CultureCode = "DA" // CultureCodeES is the culture code for the country iso2 ES. CultureCodeES CultureCode = "ES" // CultureCodeET is the culture code for the country iso2 ET. CultureCodeET CultureCode = "ET" // CultureCodeFI is the culture code for the country iso2 FI. CultureCodeFI CultureCode = "FI" // CultureCodeFR is the culture code for the country iso2 FR. CultureCodeFR CultureCode = "FR" // CultureCodeEL is the culture code for the country iso2 EL. CultureCodeEL CultureCode = "EL" // CultureCodeHU is the culture code for the country iso2 HU. CultureCodeHU CultureCode = "HU" // CultureCodeIT is the culture code for the country iso2 IT. CultureCodeIT CultureCode = "IT" // CultureCodeNL is the culture code for the country iso2 NL. CultureCodeNL CultureCode = "NL" // CultureCodeNO is the culture code for the country iso2 NO. CultureCodeNO CultureCode = "NO" // CultureCodePL is the culture code for the country iso2 PL. CultureCodePL CultureCode = "PL" // CultureCodePT is the culture code for the country iso2 PT. CultureCodePT CultureCode = "PT" // CultureCodeSK is the culture code for the country iso2 SK. CultureCodeSK CultureCode = "SK" // CultureCodeSV is the culture code for the country iso2 SV. CultureCodeSV CultureCode = "SV" // CultureCodeCS is the culture code for the country iso2 CS. CultureCodeCS CultureCode = "CS" )
type DepositAccount ¶
type DepositAccount string
DepositAccount is the type of account
const ( // DepositAccountChecking is for checking bank account. DepositAccountChecking DepositAccount = "CHECKING" // DepositAccountSavings is for saving bank account. DepositAccountSavings DepositAccount = "SAVINGS" )
type DirectDebit ¶
type DirectDebit string
The type of web direct debit
const ( DirectDebitSofort DirectDebit = "SOFORT" DirectDebitGiropay DirectDebit = "GIROPAY" )
type DirectDebitDirect ¶
type DirectDebitDirect struct { ID string `json:"Id"` CreationDate int64 `json:"CreationDate"` Ta string `json:"Tag"` // The ID of a Mandate MandateID string `json:"MandateID"` // The date the user will be charged. Note that for direct debit payments, // it will take one more day more the payment becomes successful. ChargeDate int64 `json:"ChargeDate"` // A custom description to appear on the user's bank statement. // It can be up to 100 characters long, and can only include alphanumeric characters or spaces. // See here for important info and note that this functionality is only available for SEPA payments. StatementDescriptor string `json:"StatementDescriptor"` }
type DirectDebitDirectCreate ¶
type DirectDebitDirectCreate struct { // A user's ID REQUIRED. AuthorId string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserId string `json:"CreditedUserId,omitempty"` // The ID of the wallet where money will be credited REQUIRED. CreditedWalletId string `json:"CreditedWalletId"` // Information about the funds that are being debited REQUIRED. DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client REQUIRED // for this transaction (and were hence transferred to the Client's platform wallet) . Fees Money `json:"Fees"` // The ID of a Mandate REQUIRED. MandateId string `json:"MandateId"` // A custom description to appear on the user's bank statement OPTIONAL. // It can be up to 100 characters long, and can only include alphanumeric characters or spaces. // See here for important info and note that this functionality is only available for SEPA payments. StatementDescriptor string `json:"StatementDescriptor,omitempty"` }
type DirectDebitWeb ¶
type DirectDebitWeb struct { // The type of payin PaymentType Payment `json:"PaymentType"` // ?? the fiedl shoud be PayInPayment instead of PaymentType ?? // The type of execution for the payin ExecutionType Execution `json:"ExecutionType"` // The URL to redirect to after payment (whether successful or not) ReturnURL string `json:"ReturnURL"` // The type of web direct debit DirectDebit DirectDebit `json:"DirectDebit"` // The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. // This field lets you activate it manually. The field lets you activate it automatically // with "DEFAULT" (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), // "FORCE" (if you wish to specifically force the secured mode). SecureMode SecureMode `json:"SecureMode"` // The language to use for the payment page - needs to be the ISO code of the language Culture CultureCode `json:"Culture"` // The URL to use for the payment page template TemplateURL string `json:"TemplateURL"` // The URL to redirect to user to for them to proceed with the payment RedirectURL string `json:"RedirectURL"` }
The Direct-Debit Web PayIn
type Dispute ¶
type Dispute struct { // The initial transaction ID InitialTransactionID string `json:"InitialTransactionId"` // The initial transaction type InitialTransactionType TransactionType `json:"InitialTransactionType"` // The result code ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode ResultMessage string `json:"ResultMessage"` // Info about the reason for the dispute DisputeReason DisputeReason `json:"DisputeReason"` // The status of the dispute Status DisputeStatus `json:"Status"` // Used to communicate information about the dispute status to you StatusMessage string `json:"StatusMessage"` // The amount of funds that were disputed DisputedFunds Money `json:"DisputedFunds"` // The amount you wish to contest ContestedFunds Money `json:"ContestedFunds"` // The type of dispute DisputeType DisputeType `json:"DisputeType"` // The deadline by which you must contest the dispute (if you wish to contest it) ContestDeadlineDate int64 `json:"ContestDeadlineDate"` // The ID of the associated repudiation transaction RepudiationID string `json:"RepudiationId"` }
Dispute is used when a User requests a chargeback of transaction to their bank – in turn, their bank withdraws the funds from us and we will then repudiate the required funds from your client credit wallet.
type DisputeDocRefusedReasonType ¶
type DisputeDocRefusedReasonType string
DisputeDocRefusedReasonType is the type of refusal reason.
const ( // DisputeDocRefusedReasonDocumentUnreadable is for dispute doc reason DOCUMENT_UNREADABLE. DisputeDocRefusedReasonDocumentUnreadable DisputeDocRefusedReasonType = "DOCUMENT_UNREADABLE" // DisputeDocRefusedReasonDocumentNotAccepted is for dispute doc reason DOCUMENT_NOT_ACCEPTED. DisputeDocRefusedReasonDocumentNotAccepted DisputeDocRefusedReasonType = "DOCUMENT_NOT_ACCEPTED" // DisputeDocRefusedReasonDocumentHasExpired is for dispute doc reason DOCUMENT_HAS_EXPIRED. DisputeDocRefusedReasonDocumentHasExpired DisputeDocRefusedReasonType = "DOCUMENT_HAS_EXPIRED" // DisputeDocRefusedReasonDocumentIncomplete is for dispute doc reason DOCUMENT_INCOMPLETE. DisputeDocRefusedReasonDocumentIncomplete DisputeDocRefusedReasonType = "DOCUMENT_INCOMPLETE" // DisputeDocRefusedReasonDocumentMissing is for dispute doc reason DOCUMENT_MISSING. DisputeDocRefusedReasonDocumentMissing DisputeDocRefusedReasonType = "DOCUMENT_MISSING" // DisputeDocRefusedReasonSpecificCase is for dispute doc reason SPECIFIC_CASE. DisputeDocRefusedReasonSpecificCase DisputeDocRefusedReasonType = "SPECIFIC_CASE" // DisputeDocRefusedReasonDocumentFalsified is for dispute doc reason DOCUMENT_FALSIFIED. DisputeDocRefusedReasonDocumentFalsified DisputeDocRefusedReasonType = "DOCUMENT_FALSIFIED" // DisputeDocRefusedReasonOther is for dispute doc reason OTHER. DisputeDocRefusedReasonOther DisputeDocRefusedReasonType = "OTHER" )
type DisputeDocument ¶
type DisputeDocument struct { // The Id of a Dispute. DisputeID string `json:"DisputeId"` // The status of this KYC/Dispute document. Status DocumentStatus `json:"Status"` // Gives the type of the dispute document. Type DisputeDocumentType `json:"Type"` // The message accompanying a refusal. RefusedReasonMessage string `json:"RefusedReasonMessage"` // The type of reason for refusal. RefusedReasonType DisputeDocRefusedReasonType `json:"RefusedReasonType"` // The date when the document was processed by MANGOPAY. ProcessedDate int64 `json:"ProcessedDate"` }
DisputeDocument is the KYC document. You need to create document in order to upload pages on this document. Note that dispute documents function in just the same way KYC documents. ?? Why we don't use the same status of the KYC documents ??
type DisputeDocumentCreate ¶
type DisputeDocumentCreate struct {
File string `json:"File"`
}
DisputeDocumentCreate is the payload used to send the data of the document in base64.
type DisputeDocumentType ¶
type DisputeDocumentType string
DisputeDocumentType is the type of dispute document.
const ( // DisputeDocumentDeliveryProof is for dispute document type of DELIVERY_PROOF. DisputeDocumentDeliveryProof DisputeDocumentType = "DELIVERY_PROOF" // DisputeDocumentInvoice is for dispute document type of INVOICE. DisputeDocumentInvoice DisputeDocumentType = "INVOICE" // DisputeDocumentRefundProof is for dispute document type of REFUND_PROOF. DisputeDocumentRefundProof DisputeDocumentType = "REFUND_PROOF" // DisputeDocumentUserCorrespondance is for dispute document type of USER_CORRESPONDANCE. DisputeDocumentUserCorrespondance DisputeDocumentType = "USER_CORRESPONDANCE" // DisputeDocumentUserAcceptanceProof is for dispute document type of USER_ACCEPTANCE_PROOF. DisputeDocumentUserAcceptanceProof DisputeDocumentType = "USER_ACCEPTANCE_PROOF" // DisputeDocumentProductReplacementProof is for dispute document type of PRODUCT_REPLACEMENT_PROOF. DisputeDocumentProductReplacementProof DisputeDocumentType = "PRODUCT_REPLACEMENT_PROOF" // DisputeDocumentOther is for dispute document type of OTHER. DisputeDocumentOther DisputeDocumentType = "OTHER" )
type DisputeReason ¶
type DisputeReason struct { // The type of reason for the dispute DisputeReasonType DisputeReasonType `json:"DisputeReasonType"` // More information about the reason for the dispute DisputeReasonMessage string `json:"DisputeReasonMessage"` }
DisputeReason is the reason of the Dispute.
type DisputeReasonType ¶
type DisputeReasonType string
DisputeReasonType is the reason type for the dispute.
const ( // DisputeReasonDuplicated stands for a DUPLICATE reason. DisputeReasonDuplicated DisputeReasonType = "DUPLICATE" // DisputeReasonFraud stands for a FRAUD reason. DisputeReasonFraud DisputeReasonType = "FRAUD" // DisputeReasonProductUnacceptable stands for a PRODUCT_UNACCEPTABLE reason. DisputeReasonProductUnacceptable DisputeReasonType = "PRODUCT_UNACCEPTABLE" // DisputeReasonUnknown stands for a UNKNOWN reason. DisputeReasonUnknown DisputeReasonType = "UNKNOWN" // DisputeReasonOther stands for a OTHER reason. DisputeReasonOther DisputeReasonType = "OTHER" // DisputeReasonRefundConverstionRate stands for a REFUND_CONVERSION_RATE reason. DisputeReasonRefundConverstionRate DisputeReasonType = "REFUND_CONVERSION_RATE" // DisputeReasonLateFailureInsufficientFunds stands for a LATE_FAILURE_INSUFFICIENT_FUNDS reason. DisputeReasonLateFailureInsufficientFunds DisputeReasonType = "LATE_FAILURE_INSUFFICIENT_FUNDS" // DisputeReasonLateFailureContactUser stands for a LATE_FAILURE_CONTACT_USER reason. DisputeReasonLateFailureContactUser DisputeReasonType = "LATE_FAILURE_CONTACT_USER" // DisputeReasonLateFailureBankAccountClosed stands for a LATE_FAILURE_BANKACCOUNT_CLOSED reason. DisputeReasonLateFailureBankAccountClosed DisputeReasonType = "LATE_FAILURE_BANKACCOUNT_CLOSED" // DisputeReasonLateFailureBancAccountIncompatible stands for a LATE_FAILURE_BANKACCOUNT_INCOMPATIBLE reason. DisputeReasonLateFailureBancAccountIncompatible DisputeReasonType = "LATE_FAILURE_BANKACCOUNT_INCOMPATIBLE" // DisputeReasonLateFailureBankAccountIncorrect stands for a LATE_FAILURE_BANKACCOUNT_INCORRECT reason. DisputeReasonLateFailureBankAccountIncorrect DisputeReasonType = "LATE_FAILURE_BANKACCOUNT_INCORRECT" // DisputeReasonAutorizationDisputed stands for a AUTHORISATION_DISPUTED reason. // ?? AUTHORISATION or AUTHORIZATION?? DisputeReasonAutorizationDisputed DisputeReasonType = "AUTHORISATION_DISPUTED" // DisputeReasonTransactionNotReconized stands for a TRANSACTION_NOT_RECOGNIZED reason. DisputeReasonTransactionNotReconized DisputeReasonType = "TRANSACTION_NOT_RECOGNIZED" // DisputeReasonProductNotProvided stands for a PRODUCT_NOT_PROVIDED reason. DisputeReasonProductNotProvided DisputeReasonType = "PRODUCT_NOT_PROVIDED" // DisputeReasonCanceledReccuringTransaction stands for a CANCELED_REOCCURING_TRANSACTION reason. // ?? CANCELED_REOCCURING_TRANSACTION or CANCELED_RECCURING_TRANSACTION ?? DisputeReasonCanceledReccuringTransaction DisputeReasonType = "CANCELED_REOCCURING_TRANSACTION" // DisputeReasonRefundNotProcessed stands for a REFUND_NOT_PROCESSED reason. DisputeReasonRefundNotProcessed DisputeReasonType = "REFUND_NOT_PROCESSED" )
type DisputeStatus ¶
type DisputeStatus string
DisputeStatus is the status of the Dispute.
const ( // DisputeStatusCreated stands for the status CREATED. DisputeStatusCreated DisputeStatus = "CREATED" // DisputeStatusPendingClientAction stands for the status PENDING_CLIENT_ACTION. DisputeStatusPendingClientAction DisputeStatus = "PENDING_CLIENT_ACTION" // DisputeStatusSubmitted stands for the status SUBMITTED. DisputeStatusSubmitted DisputeStatus = "SUBMITTED" // DisputeStatusPendingBankAction stands for the status PENDING_BANK_ACTION. DisputeStatusPendingBankAction DisputeStatus = "PENDING_BANK_ACTION" // DisputeStatusReopenedPendingClientAction stands for the status REOPENED_PENDING_CLIENT_ACTION. DisputeStatusReopenedPendingClientAction DisputeStatus = "REOPENED_PENDING_CLIENT_ACTION" // DisputeStatusClosed stands for the status CLOSED. DisputeStatusClosed DisputeStatus = "CLOSED" )
type DisputeType ¶
type DisputeType string
DisputeType is the type of Dispute.
const ( // DisputeContestable stands for CONTESTABLE. DisputeContestable DisputeType = "CONTESTABLE" // DisputeNotContestable stands for NOT_CONTESTABLE. DisputeNotContestable DisputeType = "NOT_CONTESTABLE" // DisputeRetrieval stands for RETRIEVAL. DisputeRetrieval DisputeType = "RETRIEVAL" )
type DocumentStatus ¶
type DocumentStatus string
DocumentStatus is the Status of the Document
const ( // DocumentStatusCreated stands for a status created. DocumentStatusCreated DocumentStatus = "CREATED" // DocumentStatusValidationAsked stands for a status validation asked. DocumentStatusValidationAsked DocumentStatus = "VALIDATION_ASKED" // DocumentStatusValidated stands for a status validated. DocumentStatusValidated DocumentStatus = "VALIDATED" // DocumentStatusRefused stands for a status refused. DocumentStatusRefused DocumentStatus = "REFUSED" )
type DocumentType ¶
type DocumentType string
DocumentType is the type of KYC document.
const ( // DocumentTypeIdentity is for a document of iendtity proof. DocumentTypeIdentity DocumentType = "IDENTITY_PROOF" // DocumentTypeRegistration is for a document of registration proff. DocumentTypeRegistration DocumentType = "REGISTRATION_PROOF" // DocumentTypeArticleOfAssociation is for a document of article of association. DocumentTypeArticleOfAssociation DocumentType = "ARTICLES_OF_ASSOCIATION" DocumentTypeShareHolder DocumentType = "SHAREHOLDER_DECLARATION" // DocumentTypeAddress is for a document of address proof. DocumentTypeAddress DocumentType = "ADDRESS_PROOF" )
type DownloadFormat ¶
type DownloadFormat string
DownloadFormat is the file format for the report download
const (
DownloadFormatCSV DownloadFormat = "CSV"
)
type Error ¶
type Error struct { ID string `json:"Id"` Message string `json:"Message"` Type ErrorType `json:"Type"` Date int64 `json:"Date"` Err error `json:"error"` }
Error is the payload for an error from Mangopay.
func (Error) MarshalJSON ¶
MarshalJSON statify the Marshaler interface. It is used to make sure the Date is easy to use in front of the current API impelentation.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON satify the Unmarshaler interface, this is fixing the date that should be an int64 and not in float64 as it is the currently implemented.
type Event ¶
type Event struct { // The ID of whatever the event is ResourceID string `json:"ResourceId"` // When the event happened Date int64 `json:"Date"` // The event type EventType EventType `json:"EventType"` }
Event is the payload for events.
type EventType ¶
type EventType string
EventType is the type of event for the Hook.
const ( // EventPayInNormalCreated is used for an event type PAYIN_NORMAL_CREATED. EventPayInNormalCreated EventType = "PAYIN_NORMAL_CREATED`" // EventPayInNormalSucceeded is used for an event type PAYIN_NORMAL_SUCCEEDED. EventPayInNormalSucceeded EventType = "PAYIN_NORMAL_SUCCEEDED`" // EventPayInNormalFailed is used for an event type PAYIN_NORMAL_FAILED. EventPayInNormalFailed EventType = "PAYIN_NORMAL_FAILED`" // EventPayOutNormalCreated is used for an event type PAYOUT_NORMAL_CREATED. EventPayOutNormalCreated EventType = "PAYOUT_NORMAL_CREATED`" // EventPayOutNormalSucceeded is used for an event type PAYOUT_NORMAL_SUCCEEDED. EventPayOutNormalSucceeded EventType = "PAYOUT_NORMAL_SUCCEEDED`" // EventPayOutNormalFailed is used for an event type PAYOUT_NORMAL_FAILED. EventPayOutNormalFailed EventType = "PAYOUT_NORMAL_FAILED`" // EventTransferNormalCreated is used for an event type TRANSFER_NORMAL_CREATED. EventTransferNormalCreated EventType = "TRANSFER_NORMAL_CREATED`" // EventTransferNormalSucceeded is used for an event type TRANSFER_NORMAL_SUCCEEDED. EventTransferNormalSucceeded EventType = "TRANSFER_NORMAL_SUCCEEDED`" // EventTransferNormalFailed is used for an event type TRANSFER_NORMAL_FAILED. EventTransferNormalFailed EventType = "TRANSFER_NORMAL_FAILED`" // EventPayInRefundCreated is used for an event type PAYIN_REFUND_CREATED. EventPayInRefundCreated EventType = "PAYIN_REFUND_CREATED`" // EventPayInRefundSucceeded is used for an event type PAYIN_REFUND_SUCCEEDED. EventPayInRefundSucceeded EventType = "PAYIN_REFUND_SUCCEEDED`" // EventPayInRefundFailed is used for an event type PAYIN_REFUND_FAILED. EventPayInRefundFailed EventType = "PAYIN_REFUND_FAILED`" // EventPayOutRefundCreated is used for an event type PAYOUT_REFUND_CREATED. EventPayOutRefundCreated EventType = "PAYOUT_REFUND_CREATED`" // EventPayOutRefundSucceeded is used for an event type PAYOUT_REFUND_SUCCEEDED. EventPayOutRefundSucceeded EventType = "PAYOUT_REFUND_SUCCEEDED`" // EventPayOutRefundFailed is used for an event type PAYOUT_REFUND_FAILED. EventPayOutRefundFailed EventType = "PAYOUT_REFUND_FAILED`" // EventTransferRefundCreated is used for an event type TRANSFER_REFUND_CREATED. EventTransferRefundCreated EventType = "TRANSFER_REFUND_CREATED`" // EventTransferRefundSucceeded is used for an event type TRANSFER_REFUND_SUCCEEDED. EventTransferRefundSucceeded EventType = "TRANSFER_REFUND_SUCCEEDED`" // EventTransferRefundFailed is used for an event type TRANSFER_REFUND_FAILED. EventTransferRefundFailed EventType = "TRANSFER_REFUND_FAILED`" // EventKYCCreated is used for an event type EventType. EventKYCCreated EventType = "KYC_CREATED`" // EventKYCValidationAsked is used for an event type KYC_VALIDATION_ASKED. EventKYCValidationAsked EventType = "KYC_VALIDATION_ASKED`" // EventKYCSucceeded is used for an event type. EventKYCSucceeded EventType = "KYC_SUCCEEDED` =" // EventKYCFailed is used for an event type EventType. EventKYCFailed EventType = "KYC_FAILED`" // EventPayInRepudiationCreated is used for an event type PAYIN_REPUDIATION_CREATED. EventPayInRepudiationCreated EventType = "PAYIN_REPUDIATION_CREATED`" // EventPayInRepudiationSucceeded is used for an event type PAYIN_REPUDIATION_SUCCEEDED. EventPayInRepudiationSucceeded EventType = "PAYIN_REPUDIATION_SUCCEEDED`" // EventPayInRepudiationFailed is used for an event type PAYIN_REPUDIATION_FAILED. EventPayInRepudiationFailed EventType = "PAYIN_REPUDIATION_FAILED`" // EventDisputeDocumentCreated is used for an event type DISPUTE_DOCUMENT_CREATED. EventDisputeDocumentCreated EventType = "DISPUTE_DOCUMENT_CREATED`" // EventDisputeDocumentValidationAsked is used for an event type DISPUTE_DOCUMENT_VALIDATION_ASKED. EventDisputeDocumentValidationAsked EventType = "DISPUTE_DOCUMENT_VALIDATION_ASKED`" // EventDisputeDocumentSucceeded is used for an event type DISPUTE_DOCUMENT_SUCCEEDED. EventDisputeDocumentSucceeded EventType = "DISPUTE_DOCUMENT_SUCCEEDED`" // EventDisputeDocumentFailed is used for an event type DISPUTE_DOCUMENT_FAILED. EventDisputeDocumentFailed EventType = "DISPUTE_DOCUMENT_FAILED`" // EventDisputeCreated is used for an event type. EventDisputeCreated EventType = "DISPUTE_CREATED` DISPUTE_CREATED" // EventDisputeSubmitted is used for an event type. EventDisputeSubmitted EventType = "DISPUTE_SUBMITTED` DISPUTE_SUBMITTED" // EventDisputeActionRequired is used for an event type DISPUTE_ACTION_REQUIRED. EventDisputeActionRequired EventType = "DISPUTE_ACTION_REQUIRED`" // EventDisputeFurtherActionRequired is used for an event type DISPUTE_FURTHER_ACTION_REQUIRED. EventDisputeFurtherActionRequired EventType = "DISPUTE_FURTHER_ACTION_REQUIRED`" // EventDisputeDisputeClosed is used for an event type DISPUTE_CLOSED. EventDisputeDisputeClosed EventType = "DISPUTE_CLOSED`" // EventDisputeDisputeSentToBank is used for an event type DISPUTE_SENT_TO_BANK. EventDisputeDisputeSentToBank EventType = "DISPUTE_SENT_TO_BANK`" // EventTransferSettlementCreated is used for an event type TRANSFER_SETTLEMENT_CREATED. EventTransferSettlementCreated EventType = "TRANSFER_SETTLEMENT_CREATED`" // EventTransferSettlementSucceeded is used for an event type TRANSFER_SETTLEMENT_SUCCEEDED. EventTransferSettlementSucceeded EventType = "TRANSFER_SETTLEMENT_SUCCEEDED`" // EventTransferSettlementFailed is used for an event type TRANSFER_SETTLEMENT_FAILED. EventTransferSettlementFailed EventType = "TRANSFER_SETTLEMENT_FAILED`" // EventMandateCreated is used for an event type. EventMandateCreated EventType = "MANDATE_CREATED` MANDATE_CREATED" // EventMandateFailed is used for an event type. EventMandateFailed EventType = "MANDATE_FAILED` =" // EventMandateActivated is used for an event type. EventMandateActivated EventType = "MANDATE_ACTIVATED` MANDATE_ACTIVATED" // EventMandateSubmitted is used for an event type. EventMandateSubmitted EventType = "MANDATE_SUBMITTED` MANDATE_SUBMITTED" // EventPreAuthorizationPaymentWaiting is used for an event type PREAUTHORIZATION_PAYMENT_WAITING. EventPreAuthorizationPaymentWaiting EventType = "PREAUTHORIZATION_PAYMENT_WAITING`" // EventPreAuthorizationPaymentExpired is used for an event type PREAUTHORIZATION_PAYMENT_EXPIRED. EventPreAuthorizationPaymentExpired EventType = "PREAUTHORIZATION_PAYMENT_EXPIRED`" // EventPreAuthorizationPaymentCanceled is used for an event type PREAUTHORIZATION_PAYMENT_CANCELED. EventPreAuthorizationPaymentCanceled EventType = "PREAUTHORIZATION_PAYMENT_CANCELED`" // EventPreAuthorizationPaymentValidated is used for an event type PREAUTHORIZATION_PAYMENT_VALIDATED. EventPreAuthorizationPaymentValidated EventType = "PREAUTHORIZATION_PAYMENT_VALIDATED`" // EventUBODeclarationCreated is used for an event type UBO_DECLARATION_CREATED. EventUBODeclarationCreated EventType = "UBO_DECLARATION_CREATED`" // EventUBODeclarationValidationAsked is used for an event type UBO_DECLARATION_VALIDATION_ASKED. EventUBODeclarationValidationAsked EventType = "UBO_DECLARATION_VALIDATION_ASKED`" // EventUBODeclarationRefused is used for an event type UBO_DECLARATION_REFUSED. EventUBODeclarationRefused EventType = "UBO_DECLARATION_REFUSED`" // EventUBODeclarationValidation is used for an event type UBO_DECLARATION_VALIDATED. EventUBODeclarationValidation EventType = "UBO_DECLARATION_VALIDATED`" // EventUBODeclarationIncomplete is used for an event type UBO_DECLARATION_INCOMPLETE. EventUBODeclarationIncomplete EventType = "UBO_DECLARATION_INCOMPLETE" )
type Execution ¶
type Execution string
Execution is the execution type of the payin.
const ( // ExecutionWeb is for an execution web. ExecutionWeb Execution = "WEB" // ExecutionDirect is for an execution direct. ExecutionDirect Execution = "DIRECT" // ExecutionExternalInstruction is for an execution external instruction. ExecutionExternalInstruction Execution = "EXTERNAL_INSTRUCTION" )
type Hook ¶
type Hook struct { // This is the URL where your receive notification for each EventType. URL string `json:"Url"` // Whether the hook is enabled or not. Status HookStatus `json:"Status"` // Whether the hook is valid or not. Validity HookValidity `json:"Validity"` // The event type. Event EventType `json:"Event"` }
Hook is used for a hook.
type HookCreate ¶
type HookCreate struct { // The event type REQUIRED. EventType EventType `json:"EventType"` // This is the URL where your receive notification for each EventType REQUIRED. URL string `json:"Url"` }
HookCreate is the payload used for creating a new hook.
type HookStatus ¶
type HookStatus string
HookStatus is the status of the hook.
const ( // HookStatusDisable is for a status disabled. HookStatusDisable HookStatus = "DISABLED" // HookStatusEnabled is for a status enabled. HookStatusEnabled HookStatus = "ENABLED" )
type HookValidity ¶
type HookValidity string
HookValidity describe Whether the hook is enabled or not.
const ( // HookValidityUnknown is for hook validity unknown. HookValidityUnknown HookValidity = "UNKNOWN" // HookValidityValid is for hook validity valid. HookValidityValid HookValidity = "VALID" // HookValidityInvalid is for hook validity invalid. HookValidityInvalid HookValidity = "INVALID" )
type IempotencyResponse ¶
type IempotencyResponse struct { // The status code of the API response StatusCode string // The content length of the API response ContentLength string // The content type of the API response ContentType string // The long format date when the API request was received Date int64 // An API resource Resource interface{} // The URL of the API request RequestURL string }
type InvitationStatus ¶
type InvitationStatus string
InvitationStatus is the status of the invitation.
const ( // InvitationStatusAccepted stands for invistation status ACCEPTED. InvitationStatusAccepted InvitationStatus = "ACCEPTED" // InvitationStatusSent stands for invistation status SENT. InvitationStatusSent InvitationStatus = "SENT" // InvitationStatusExpired stands for invistation status EXPIRED. InvitationStatusExpired InvitationStatus = "EXPIRED" )
type KYCDocument ¶
type KYCDocument struct { // ?? some fields may missing ?? // ID of the current card's registration. ID string `json:"Id"` // ?? new ?? // Tag of the card. Tag string `json:"Tag"` // ?? new ?? // CreationDate CreationDate int64 `json:"CreationDate"` // ?? new ?? // The object owner's UserId UserID string `json:"UserId"` // The status of this KYC/Dispute document Status DocumentStatus `json:"Status"` // The message accompanying a refusal RefusedReasonMessage string `json:"RefusedReasonMessage"` // The type of reason for refusal RefusedReason RefusedReason `json:"RefusedReason"` // The date when the document was processed by MANGOPAY ProcessedDate int64 `json:"ProcessedDate"` }
KYCDocument describe a KYC document.
type KYCDocumentCreate ¶
type KYCDocumentCreate struct { }
KYCDocumentCreate is a payload use for creating a new KYCDocument.
type KYCLevel ¶
type KYCLevel string
KYCLevel there are two levels of user verification, also called API levels: Light (default) and Regular. Light (default) verification requires basic information provided during the user creation process. Regular verification requires identity proof which allows users to handle unlimited funds freely.
type KYCPage ¶
type KYCPage struct {
File string `json:"File"`
}
KYCPage is used as a container to hold the files encoded in base64. if you are creating a new Page please use the function `NewKYCPage` that will help you to read and encode the given file.
func NewDisputeDocument ¶
NewDisputeDocument is reading from a file an encode the given []bytes into a base64 fromat.
func NewKYCPage ¶
NewKYCPage is reading from the given filepath the file and insert it into the KYCPage struct encoded in base64. The maximum size per page is about 7MB. The following formats are accepted : .pdf, .jpeg, .jpg, .gif and .png. The minimum size is 1Kb.
type LegalPerson ¶
type LegalPerson string
const ( LegalPersonBusiness LegalPerson = "BUSINESS" LegalPersonOrganization LegalPerson = "ORGANIZATION" LegalPersonSoletrader LegalPerson = "SOLETRADER" )
func (LegalPerson) String ¶
func (lpt LegalPerson) String() string
type LegalUser ¶
type LegalUser struct { User // HeadquartersAddress is the address of the company’s headquarters. This field is mandatory to accept payout (More info here). HeadquartersAddress Address `json:"HeadquartersAddress"` // LegalPersonType is the type of legal user. LegalPersonType LegalPerson `json:"LegalPersonType"` // Name is the name of the legal user. Name string `json:"Name"` // LegalRepresentativeAddress is the address of the company’s Legal representative person. LegalRepresentativeAddress Address `json:"LegalRepresentativeAddress"` // LegalRepresentativeBirthday is the date of birth of the company’s Legal representative person. // - be careful to set the right timezone (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before). LegalRepresentativeBirthday int64 `json:"LegalRepresentativeBirthday"` // LegalRepresentativeCountryOfResidence is the country of residence of the company’s Legal representative person. LegalRepresentativeCountryOfResidence string `json:"LegalRepresentativeCountryOfResidence"` // LegalRepresentativeNationality is the nationality of the company’s Legal representative person. LegalRepresentativeNationality string `json:"LegalRepresentativeNationality"` // LegalRepresentativeEmail is the email of the company’s Legal representative person - must be a valid. LegalRepresentativeEmail *string `json:"LegalRepresentativeEmail"` // LegalRepresentativeFirstName is the firstname of the company’s Legal representative person. LegalRepresentativeFirstName string `json:"LegalRepresentativeFirstName"` // LegalRepresentativeLastName is the lastname of the company’s Legal representative person. LegalRepresentativeLastName string `json:"LegalRepresentativeLastName"` // CompanyNumber is the official registered number of the business. // This field is mandatory to accept payout (More info here). // You can find the patterns and names in your local country here. CompanyNumber *string `json:"CompanyNumber"` ShareholderDeclaration *string `json:"ShareholderDeclaration"` // ProofOfRegistration is a Mangopay reference to the validated document of the proof of registration of the company. ProofOfRegistration *string `json:"ProofOfRegistration"` // LegalRepresentativeProofOfIdentity LegalRepresentativeProofOfIdentity *string `json:"LegalRepresentativeProofOfIdentity"` // Statute is the business statute of the company. Statute *string `json:"Statute"` }
type LegalUserCreate ¶
type LegalUserCreate struct { LegalUserUpdate // Email is the person's email address (not more than 12 consecutive numbers) - must be a valid email. Email *string `json:"Email,omitempty"` }
type LegalUserUpdate ¶
type LegalUserUpdate struct { // HeadquartersAddress is the address of the company’s headquarters. This field is mandatory to accept payout (More info here). HeadquartersAddress Address `json:"HeadquartersAddress,omitempty"` // LegalPersonType is the type of legal user. LegalPersonType LegalPerson `json:"LegalPersonType,omitempty"` // Name is the name of the legal user. Name string `json:"Name,omitempty"` // LegalRepresentativeAddress is the address of the company’s Legal representative person. LegalRepresentativeAddress Address `json:"LegalRepresentativeAddress,omitempty"` // LegalRepresentativeBirthday is the date of birth of the company’s Legal representative person. // - be careful to set the right timezone (should be UTC) to avoid 00h becoming 23h (and hence interpreted as the day before). LegalRepresentativeBirthday int64 `json:"LegalRepresentativeBirthday,omitempty"` // LegalRepresentativeCountryOfResidence is the country of residence of the company’s Legal representative person LegalRepresentativeCountryOfResidence string `json:"LegalRepresentativeCountryOfResidence,omitempty"` // LegalRepresentativeNationality is the nationality of the company’s Legal representative person LegalRepresentativeNationality string `json:"LegalRepresentativeNationality,omitempty"` // LegalRepresentativeEmail is the email of the company’s Legal representative person - must be a valid LegalRepresentativeEmail string `json:"LegalRepresentativeEmail,omitempty"` // LegalRepresentativeFirstName is the firstname of the company’s Legal representative person LegalRepresentativeFirstName string `json:"LegalRepresentativeFirstName,omitempty"` // LegalRepresentativeLastName is the lastname of the company’s Legal representative person LegalRepresentativeLastName string `json:"LegalRepresentativeLastName,omitempty"` // CompanyNumber is the official registered number of the business. // This field is mandatory to accept payout (More info here). // You can find the patterns and names in your local country here. CompanyNumber string `json:"CompanyNumber,omitempty"` }
type Mandate ¶
type Mandate struct { // An ID of a Bank Account. BankAccountID string `json:"BankAccountId"` // The object owner's UserId. UserID string `json:"UserId"` // The URL to redirect to after payment (whether successful or not). ReturnURL string `json:"ReturnURL"` // The URL to redirect to user to for them to proceed with the payment. RedirectURL string `json:"RedirectURL"` // The URL to download the mandate. DocumentURL string `json:"DocumentURL"` // The language to use for the mandate confirmation page - needs to be the ISO code of the language. Culture MandateCultureCode `json:"Culture"` // The type of mandate, but will only be completed once the mandate has been submitted. Scheme MandateScheme `json:"Scheme"` // The status of the mandate: // // "CREATED" - the mandate has been created // "SUBMITTED" - the mandate has been submitted to the banks and you can now do payments with this mandate. // "ACTIVE" - the mandate is active and has been accepted by the banks and/or successfully used in a payment. // "FAILED" - the mandate has failed for a variety of reasons and is no longer available for payments. Status MandateStatus `json:"Status"` // The result code ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode. ResultMessage string `json:"ResultMessage"` // The execution type for creating the mandate. ExecutionType MandateExecutionType `json:"ExecutionType"` // The type of Mandate. MandateType MandateType `json:"MandateType"` // The banking reference for this mandate. BankReference string `json:"BankReference"` }
Mandate is a Direct Debit Mandate is an instruction between a user and a bank account which allows you to process payments directly from his bank to a wallet for a dedicated user.
type MandateCreate ¶
type MandateCreate struct { // An ID of a Bank Account REQUIRED. BankAccountID string `json:"BankAccountId"` // The language to use for the mandate confirmation page - needs to be the ISO code of the language REQUIRED. Culture MandateCultureCode `json:"Culture"` // The URL to redirect to after payment (whether successful or not) REQUIRED. ReturnURL string `json:"ReturnURL"` }
MandateCreate is the payload used for creating a new Mandate.
type MandateCultureCode ¶
type MandateCultureCode string
MandateCultureCode is the language to use for the mandate confirmation webpage.
const ( // MandateCultureCodeEN if for an iso2 country name EN. MandateCultureCodeEN MandateCultureCode = "EN" // MandateCultureCodeFR if for an iso2 country name FR. MandateCultureCodeFR MandateCultureCode = "FR" // MandateCultureCodeNL if for an iso2 country name NL. MandateCultureCodeNL MandateCultureCode = "NL" // MandateCultureCodeDE if for an iso2 country name DE. MandateCultureCodeDE MandateCultureCode = "DE" // MandateCultureCodeES if for an iso2 country name ES. MandateCultureCodeES MandateCultureCode = "ES" // MandateCultureCodeIT if for an iso2 country name IT. MandateCultureCodeIT MandateCultureCode = "IT" // MandateCultureCodePL if for an iso2 country name PL. MandateCultureCodePL MandateCultureCode = "PL" )
type MandateExecutionType ¶
type MandateExecutionType string
MandateExecutionType is the execution type of the mandate.
const ( // MandateExecutionWEB is the execution type web. MandateExecutionWEB MandateExecutionType = "WEB" )
type MandateScheme ¶
type MandateScheme string
MandateScheme is the mandate scheme use.
const ( // MandateSchemeSEPA is for a kind fo mandate SEPA. MandateSchemeSEPA MandateScheme = "SEPA" // MandateSchemeBACS is for a kind fo mandate BACS. MandateSchemeBACS MandateScheme = "BACS" )
type MandateStatus ¶
type MandateStatus string
MandateStatus is the status of a mandate.
const ( // MandateStatusCreated is used for the status created. MandateStatusCreated MandateStatus = "CREATED" // MandateStatusSubmitted is used for the status submitted. MandateStatusSubmitted MandateStatus = "SUBMITTED" // MandateStatusActive is used for the status active. MandateStatusActive MandateStatus = "ACTIVE" // MandateStatusFailed is used for the status failed. MandateStatusFailed MandateStatus = "FAILED" )
type MandateType ¶
type MandateType string
MandateType is the type of mandate.
const ( // MandateTypeDirectDebit is for direct debit. MandateTypeDirectDebit MandateType = "DIRECT_DEBIT" )
type Money ¶
type Money struct { // Currency is the currency - should be ISO_4217 format. Currency currency.ISO3 `json:"CurrencyIso"` // Amount of money in the smallest sub-division of the currency, // e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12) Amount int `json:"Amount"` }
Money represent the amout in the currency of a wallet.
type NaturalUser ¶
type NaturalUser struct { User // FirstName is the name of the user. FirstName string `json:"FirstName"` // LastName is the last name of the user. LastName string `json:"LastName"` // Address is the address. Address Address `json:"Address"` // Birthday is the date of birth of the user // be careful to set the right timezone (should be UTC) // to avoid 00h becoming 23h (and hence interpreted as the day before). Birthday int64 `json:"Birthday"` // Nationality is the user’s nationality. ISO 3166-1 alpha-2 format is expected. Nationality string `json:"Nationality"` // CountryOfResidence The user’s country of residence. ISO 3166-1 alpha-2 format is expected. CountryOfResidence string `json:"CountryOfResidence"` // Occupation is the User’s occupation, ie. Work. Occupation *string `json:"Occupation"` // Could be only one of these values: // 1 - for incomes <18K€), // 2 - for incomes between 18 and 30K€, // 3 - for incomes between 30 and 50K€, // 4 - for incomes between 50 and 80K€, // 5 - for incomes between 80 and 120K€, // 6 - for incomes >120K€. IncomeRange *int `json:"IncomeRange"` ProofOfAddress *string `json:"ProofOfAddress"` ProofOfIdentity *string `json:"ProofOfIdentity"` }
type NaturalUserCreate ¶
type NaturalUserCreate struct { // FirstName is the name of the user. FirstName string `json:"FirstName,omitempty"` // LastName is the last name of the user. LastName string `json:"LastName,omitempty"` // Address is the address. Address Address `json:"Address,omitempty"` // Birthday is the date of birth of the user // be careful to set the right timezone (should be UTC) // to avoid 00h becoming 23h (and hence interpreted as the day before). Birthday int64 `json:"Birthday,omitempty"` // Nationality is the user’s nationality. ISO 3166-1 alpha-2 format is expected. Nationality string `json:"Nationality,omitempty"` // CountryOfResidence The user’s country of residence. ISO 3166-1 alpha-2 format is expected. CountryOfResidence string `json:"CountryOfResidence,omitempty"` // Occupation is the User’s occupation, ie. Work. Occupation string `json:"Occupation,omitempty"` // Could be only one of these values: // 1 - for incomes <18K€), // 2 - for incomes between 18 and 30K€, // 3 - for incomes between 30 and 50K€, // 4 - for incomes between 50 and 80K€, // 5 - for incomes between 80 and 120K€, // 6 - for incomes >120K€. IncomeRange int `json:"IncomeRange,omitempty"` // Email The person's email address (not more than 12 consecutive numbers) - must be a valid email Email string `json:"Email,omitempty"` // REQUIRED }
type NaturalUserUpdate ¶
type NaturalUserUpdate struct { // FirstName is the name of the user. FirstName string `json:"FirstName,omitempty"` // LastName is the last name of the user. LastName string `json:"LastName,omitempty"` // Address is the address. Address Address `json:"Address,omitempty"` // Birthday is the date of birth of the user // be careful to set the right timezone (should be UTC) // to avoid 00h becoming 23h (and hence interpreted as the day before). Birthday int64 `json:"Birthday,omitempty"` // Nationality is the user’s nationality. ISO 3166-1 alpha-2 format is expected. Nationality string `json:"Nationality,omitempty"` // CountryOfResidence The user’s country of residence. ISO 3166-1 alpha-2 format is expected. CountryOfResidence string `json:"CountryOfResidence,omitempty"` // Occupation is the User’s occupation, ie. Work. Occupation string `json:"Occupation,omitempty"` // Could be only one of these values: // 1 - for incomes <18K€), // 2 - for incomes between 18 and 30K€, // 3 - for incomes between 30 and 50K€, // 4 - for incomes between 50 and 80K€, // 5 - for incomes between 80 and 120K€, // 6 - for incomes >120K€. IncomeRange int `json:"IncomeRange,omitempty"` // Email The person's email address (not more than 12 consecutive numbers) - must be a valid email Email string `json:"Email,omitempty"` }
type PayOut ¶
type PayOut struct { // ?? not describe in the documentation yet ?? ID string `json:"Id"` Tag string `json:"Tag"` CreationDate int64 `json:"CreationDate"` // ?? end ?? // An ID of a Bank Account BankAccountID string `json:"BankAccountId"` // A custom reference you wish to appear on the user’s bank statement (your Client Name is already shown). We advise you not to add more than 12 characters. BankWireRef string `json:"BankWireRef"` // The type of Pay out Payment PayOutPayment `json:"PayOutPaymentType"` }
type PayOutCreate ¶
type PayOutCreate struct { // A user's ID REQUIRED. AuthorId string `json:"AuthorId"` // Information about the funds that are being debited REQUIRED. DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client REQUIRED // for this transaction (and were hence transferred to the Client's platform wallet). Fees Money `json:"Fees"` // An ID of a Bank Account REQUIRED. BankAccountId string `json:"BankAccountId"` // The ID of the wallet that was debited REQUIRED. DebitedWalletId string `json:"DebitedWalletId"` // A custom reference you wish to appear on the user’s bank statement OPTIONAL // (your Client Name is already shown). We advise you not to add more than 12 characters. BankWireRef string `json:"BankWireRef,omitempty"` }
type PayOutPayment ¶
type PayOutPayment string
The payment type of the payout
const (
PayOutPaymentBankWire PayOutPayment = "BANK_WIRE"
)
type Payin ¶
type Payin struct { // The type of payin. Payment Payment `json:"PaymentType"` // The type of execution for the payin. Execution Execution `json:"ExecutionType"` }
Payin is used for the payin instrcution.
type Payment ¶
type Payment string
Payment is the payment type of the payin.
const ( // PaymentCard is for a payment with card. PaymentCard Payment = "CARD" // PaymentDirectDebit is for a payment with direct debit. PaymentDirectDebit Payment = "DIRECT_DEBIT" PaymentPreauthorized Payment = "PREAUTHORIZED" // PaymentBankWire is for a payment with bank wire. PaymentBankWire Payment = "BANK_WIRE" )
type PaymentStatus ¶
type PaymentStatus string
PaymentStatus is the status of the payment for a preauthorization.
const ( // PaymentStatusWaiting is for the payment status waiting. PaymentStatusWaiting PaymentStatus = "WAITING" // PaymentStatusCanceled is for the payment status canceled. PaymentStatusCanceled PaymentStatus = "CANCELED" // PaymentStatusExpired is for the payment status expired. PaymentStatusExpired PaymentStatus = "EXPIRED" // PaymentStatusValidated is for the payment status validated. PaymentStatusValidated PaymentStatus = "VALIDATED" )
type PermissionGroup ¶
type PermissionGroup struct { // The name of the permission group Name string `json:"Name"` // The type of permission group Type GroupType `json:"Type,omitempty"` // The Scopes of the permissions Scopes Scopes `json:"Scopes,omitempty"` }
PermissionGroup sets a specific level of permissions. Each SSO is assigned to a permission group that defines which API elements the user is allowed to view, edit and create. There are 3 default permission groups:
The "Admin" permission group ( "Id": "ADMIN" ) that allows to:
View and edit client settings View data such as users details Edit data such as create a payin
The "Read & Write" permission group ( "Id": "WRITE" ) that allows to:
View data such as users details Edit data such as create a payin
The "Read Only" permission group ( "Id": "READ" ) that allows to:
View data such as users details
type PermissionGroupCreate ¶
type PermissionGroupUpdate ¶
type Permissions ¶
type Permissions struct { // allows GET requests on the related endpoints. Read bool `json:"Read,omitempty"` // allows PUT requests on the related endpoints. Edit bool `json:"Edit,omitempty"` // allows POST requests on the related endpoints. Create bool `json:"Create,omitempty"` }
Permissions describe all permission.
type PlatformCategorization ¶
type PlatformCategorization struct { // BusinessType is the business type of your Platform. BusinessType Business // OPTIONAL // Sector is the sector of your platform activity. Sector Sector // OPTIONAL }
PlatformCategorization is used to categorize a platform.
type PreAuthorization ¶
type PreAuthorization struct { // A user's ID. AuthorID string `json:"AuthorId"` // Information about the funds that are being debited. DebitedFunds Money `json:"DebitedFunds"` // Status of the PreAuthorization. Status PreAuthorizationStatus `json:"Status"` // The status of the payment after the PreAuthorization. // You can pass the PaymentStatus from "WAITING" to "CANCELED" should you need/want to. PaymentStatus PaymentStatus `json:"PaymentStatus"` // The result code. ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode. ResultMessage string `json:"ResultMessage"` // How the PreAuthorization has been executed. ExecutionType PreAuthorizationExecutionType `json:"ExecutionType"` // The SecureMode corresponds to '3D secure' for CB Visa and MasterCard. // This field lets you activate it manually. // The field lets you activate it automatically with "DEFAULT" // (Secured Mode will be activated from €50 or when MANGOPAY detects there is a higher risk ), // "FORCE" (if you wish to specifically force the secured mode). SecureMode SecureMode `json:"SecureMode"` // The ID of a card. CardID string `json:"CardId"` // The value is 'true' if the SecureMode was used. SecureModeNeeded bool `json:"SecureModeNeeded"` // This is the URL where to redirect users to proceed to 3D secure validation. SecureModeRedirectURL string `json:"SecureModeRedirectUrl"` // This is the URL where users are automatically redirected after 3D secure validation (if activated). SecureModeReturnURL string `json:"SecureModeReturnURL"` // The date when the payment is to be processed by. ExpirationDate int64 `json:"ExpirationDate"` // The Id of the associated PayIn. PayInID string `json:"PayInId"` // Contains every useful informations related to the user billing. Billing Billing `json:"Billing"` // Contains useful informations related to security and fraud. SecurityInfo SecurityInfo `json:"SecurityInfo"` // The language to use for the mandate confirmation page - needs to be the ISO code of the language. Culture CultureCode `json:"Culture"` }
The PreAuthorization Object ensures the solvency of a registered card for 7 days. The overall process is as follows:
Register a card (CardRegistration) Create a PreAuthorization with the CardId. This allows you to charge an amount on a card Charge the card through the PreAuthorized PayIn object (Payins/preauthorized/direct) How does PreAuthorization work?
Once the PreAuthorization object is created the Status is "CREATED" until 3D secure validation. If the authorization is successful the status is "SUCCEEDED" if it failed the status is "FAILED". Once Status = "SUCCEEDED" and PaymentStatus = "WAITING" you can charge the card. The Pay-In amount has to be less than or equal to the amount authorized.
type PreAuthorizationExecutionType ¶
type PreAuthorizationExecutionType string
PreAuthorizationExecutionType is the execution type for a pre-authorization.
const ( // PreAuthorizationExecutionDirect is the execution type direct for a pre-autorization. PreAuthorizationExecutionDirect PreAuthorizationExecutionType = "DIRECT" )
type PreAuthorizationStatus ¶
type PreAuthorizationStatus string
PreAuthorizationStatus is the status of the preauthorization.
const ( // PreAuthorizationStatusCreated is for a pre-authorization created. PreAuthorizationStatusCreated PreAuthorizationStatus = "CREATED" // PreAuthorizationStatusSucceeded is for a pre-authorization succeded. PreAuthorizationStatusSucceeded PreAuthorizationStatus = "SUCCEEDED" // PreAuthorizationStatusFailed is for a pre-authorization failed. PreAuthorizationStatusFailed PreAuthorizationStatus = "FAILED" )
type Query ¶
Query is used to hold query params.
func NewPagination ¶
NewPagination creates query params in URL page: index of the page (start to 1) Default value: 1 perPage: number of items returned. Default value: 10 Max: 100 Here is an example:
users/154876/bank-details?page=2&per_page=10
If you miss out any parameter in the query the default value is used.
func (*Query) AddPagination ¶
AddPagination is creating a pagination from an existing Query. if this Query has allready a pagination, this will overwrite on it.
type RateLimit ¶
type RateLimit struct { Limit1 int `json:"X-RateLimit-1"` Limit2 int `json:"X-RateLimit-2"` Limit3 int `json:"X-RateLimit-3"` Limit4 int `json:"X-RateLimit-4"` LimitRemaining1 int `json:"X-RateLimit-Remaining-1"` LimitRemaining2 int `json:"X-RateLimit-Remaining-2"` LimitRemaining3 int `json:"X-RateLimit-Remaining-3"` LimitRemaining4 int `json:"X-RateLimit-Remaining-4"` LimitReset1 int `json:"X-RateLimit-Reset-1"` LimitReset2 int `json:"X-RateLimit-Reset-2"` LimitReset3 int `json:"X-RateLimit-Reset-3"` LimitReset4 int `json:"X-RateLimit-Reset-4"` }
RateLimit is in the header response of the Mangopay service ?? it uses some duplicated datas fiedds that are in the header so we have to hijac the response before the map[string][]string get the Header values. ?? end ??
type Refund ¶
type Refund struct { // Information about the funds that are being debited. DebitedFunds Money `json:"DebitedFunds"` // Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds). CreditedFunds Money `json:"CreditedFunds"` // Information about the fees that were taken by the client // for this transaction (and were hence transferred to the Client's platform wallet). Fees Money `json:"Fees"` // The ID of the wallet that was debited. DebitedWalletID string `json:"DebitedWalletId"` // The ID of the wallet where money will be credited. CreditedWalletID string `json:"CreditedWalletId"` // A user's ID. AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet). CreditedUserID string `json:"CreditedUserId"` // The nature of the transaction. Nature TransactionNature `json:"Nature"` // The status of the transaction. Status TransactionStatus `json:"Status"` // When the transaction happened. ExecutionDate int64 `json:"ExecutionDate"` // The result code. ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode. ResultMessage string `json:"ResultMessage"` // The type of the transaction. Type TransactionType `json:"Type"` // The initial transaction ID. InitialTransactionID string `json:"InitialTransactionId"` // The initial transaction type. InitialTransactionType TransactionType `json:"InitialTransactionType"` // Contains info about the reason for refund. RefundReason RefundReason `json:"RefundReason"` }
Refund represent the refund payload.
type RefundCreate ¶
type RefundCreate struct { // A user's ID REQUIRED. AuthorID string `json:"AuthorId"` // Information about the funds that are being debited OPTIONAL. DebitedFunds Money `json:"DebitedFunds,omitempty"` // Information about the fees that were taken by the client OPTIONAL. // for this transaction (and were hence transferred to the Client's platform wallet) Fees Money `json:"Fees,omitempty"` }
RefundCreate is for creating a refund. A PayIn Refund is a request to reimburse a user on their payment card. The money which has already been paid will automatically go back to the user’s bank account.
If you're doing a partial Refund, note that you can only refund the same amount on the same transaction once per day (this is to prevent unintended duplicate refunds). After 24h you can do another refund of the same amount on the same transaction. If it is a different amount on the same transaction, there is not this limit. You can only refund a Payin in the 11months period following the original transaction.
You can refund Card Direct Payins, Card Web Payins, Preauthorization Payins, Direct-Debit Web Payins and Direct-Debit Direct Payins. Note that for Direct-Debit Direct Payins, you are limited to 5 refunds for each Payin.
type RefundReason ¶
type RefundReason struct { // The type of reason for refusal RefusedReasonType RefundReasonType `json:"RefusedReasonType"` // The message accompanying a refusal RefusedReasonMessage string `json:"RefusedReasonMessage"` }
RefundReason describe the reason of the refund.
type RefundReasonType ¶
type RefundReasonType string
RefundReasonType is the reason type for the refund
const ( // RefundReasonTypeInitializedByClient is for reason type INITIALIZED_BY_CLIENT. RefundReasonTypeInitializedByClient RefundReasonType = "INITIALIZED_BY_CLIENT" // RefundReasonTypeBankAccountIncorrect is for reason type BANKACCOUNT_INCORRECT. RefundReasonTypeBankAccountIncorrect RefundReasonType = "BANKACCOUNT_INCORRECT" // RefundReasonTypeOwnerDoNotMatchBankAccount is for reason type OWNER_DO_NOT_MATCH_BANKACCOUNT. RefundReasonTypeOwnerDoNotMatchBankAccount RefundReasonType = "OWNER_DO_NOT_MATCH_BANKACCOUNT" // RefundReasonTypeBankAccountHasBeenClosed is for reason type BANKACCOUNT_HAS_BEEN_CLOSED. RefundReasonTypeBankAccountHasBeenClosed RefundReasonType = "BANKACCOUNT_HAS_BEEN_CLOSED" // RefundReasonTypeWithdrawalImpossibleOnSavingsAccounts is for reason typWITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS.e RefundReasonTypeWithdrawalImpossibleOnSavingsAccounts RefundReasonType = "WITHDRAWAL_IMPOSSIBLE_ON_SAVINGS_ACCOUNTS" // RefundReasonTypeOther is for reason type OTHER. RefundReasonTypeOther RefundReasonType = "OTHER" )
type RefusedReason ¶
type RefusedReason string
RefusedReason The type of refusal reason.
const ( // RefusedReasonDocUnreadable stands for a reason document unreadable. RefusedReasonDocUnreadable RefusedReason = "DOCUMENT_UNREADABLE" // RefusedReasonDocNotAccepted stands for a reason document not accepted. RefusedReasonDocNotAccepted RefusedReason = "DOCUMENT_NOT_ACCEPTED" // RefusedReasonDocHasExpired stands for a reason document has exired. RefusedReasonDocHasExpired RefusedReason = "DOCUMENT_HAS_EXPIRED" // RefusedReasonDocIncomplete stands for a reason document incomplete. RefusedReasonDocIncomplete RefusedReason = "DOCUMENT_INCOMPLETE" // RefusedReasonDocMissing stands for a reason document missing. RefusedReasonDocMissing RefusedReason = "DOCUMENT_MISSING" // RefusedReasonDocNotMatchWithUser stands for a reason document not match user data. RefusedReasonDocNotMatchWithUser RefusedReason = "DOCUMENT_DO_NOT_MATCH_USER_DATA" // RefusedReasonDocNotMatchWithAccount stands for a reason document do not match account data. RefusedReasonDocNotMatchWithAccount RefusedReason = "DOCUMENT_DO_NOT_MATCH_ACCOUNT_DATA" // RefusedReasonDocFalsified stands for a reason document falsifed. RefusedReasonDocFalsified RefusedReason = "DOCUMENT_FALSIFIED" // RefusedReasonSecificCase stands for a reason specific case. RefusedReasonSecificCase RefusedReason = "SPECIFIC_CASE" // RefusedReasonUnderAgePerson stands for a reason underage person. RefusedReasonUnderAgePerson RefusedReason = "UNDERAGE_PERSON" )
type Report ¶
type Report struct { // The date when the report was executed ReportDate int64 `json:"ReportDate"` // The URL to download the report DownloadURL string `json:"DownloadURL"` // A URL that we will ping when the report is ready to download (works in a similar way to the hooks) CallbackURL string `json:"CallbackURL"` // The format of the report download DownloadFormat DownloadFormat `json:"DownloadFormat"` // The type of report ReportType ReportType `json:"ReportType"` // The column to sort against and direction Sort string `json:"Sort"` // Whether the report should be limited to the first 10 lines (and therefore quicker to execute) Preview bool `json:"Preview"` // An object of various filters for the report Filters ReportFilter `json:"Filters"` // A []string of columns/infos to show in the report // - you can choose from: // Alias, AuthorId, BankAccountId, BankWireRef, CardId, CardType, Country, CreationDate, // CreationDate:ISO,CreditedFundsAmount, CreditedFundsCurrency, CreditedUserId, CreditedWalletId, // Culture, DebitedFundsAmount, DebitedFundsCurrency, DebitedWalletId, DeclaredDebitedFundsAmount, // DeclaredDebitedFundsCurrency, DeclaredFeesAmount, DeclaredFeesCurrency, ExecutionDate, // ExecutionDate:ISO ExecutionType, ExpirationDate,ExpirationDate:ISO, FeesAmount, FeesCurrency, // Id, Nature, PaymentType, PreauthorizationId, ResultCode, ResultMessage, Status, Tag, Type, // WireReference Columns []string `json:"Columns"` // The result code ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode ResultMessage string `json:"ResultMessage"` }
Report gives the possibility to download huge lists of transactions or wallets to CSV format for accounting or analysis purposes. This can be done either from the API or Dashboard.
type ReportFilter ¶
type ReportFilter struct { // To return only resources that have CreationDate BEFORE this date BeforeDate int64 `json:"BeforeDate,omitempty"` // To return only resources that have CreationDate AFTER this date AfterDate int64 `json:"AfterDate,omitempty"` // The type of the transaction Type []string `json:"Type,omitempty"` // The status of the transaction Status []string `json:"Status,omitempty"` // The nature of the transaction Nature []string `json:"Nature,omitempty"` // The minimum amount of DebitedFunds MinDebitedFundsAmount int `json:"MinDebitedFundsAmount,omitempty"` // The currency for the minimum amount of DebitedFunds MinDebitedFundsCurrency currency.ISO3 `json:"MinDebitedFundsCurrency,omitempty"` // The maximum amount of DebitedFunds MaxDebitedFundsAmount int `json:"MaxDebitedFundsAmount,omitempty"` // The currency for the maximum amount of DebitedFunds MaxDebitedFundsCurrency currency.ISO3 `json:"MaxDebitedFundsCurrency,omitempty"` // The minimum amount of Fees MinFeesAmount int `json:"MinFeesAmount,omitempty"` // The currency for the minimum amount of Fees MinFeesCurrency currency.ISO3 `json:"MinFeesCurrency,omitempty"` // The maximum amount of Fees MaxFeesAmount int `json:"MaxFeesAmount,omitempty"` // The currency for the maximum amount of Fees MaxFeesCurrency currency.ISO3 `json:"MaxFeesCurrency,omitempty"` // A user's ID AuthorID string `json:"AuthorId,omitempty"` // The ID of a wallet WalletID string `json:"WalletId,omitempty"` }
type ReportTransactionCreate ¶
type ReportTransactionCreate struct { // A URL that we will ping when the report is ready to download (works in a similar way to the hooks) CallbackURL string `json:"CallbackURL,omitempty"` // The format of the report download DownloadFormat DownloadFormat `json:"DownloadFormat,omitempty"` // The column to sort against and direction Sort string `json:"Sort,omitempty"` // Whether the report should be limited to the first 10 lines (and therefore quicker to execute) Preview bool `json:"Preview,omitempty"` // An object of various filters for the report Filters ReportFilter `json:"Filters,omitempty"` // A list of columns/infos to show in the report - you can choose from: // Alias, AuthorId, BankAccountId, BankWireRef, CardId, CardType, Country, CreationDate,CreationDate:ISO, // DebitedFundsAmount, CreditedFundsAmount, CreditedFundsCurrency, CreditedUserId, CreditedWalletId, Culture, // DebitedFundsCurrency, DebitedWalletId, DeclaredDebitedFundsAmount, DeclaredDebitedFundsCurrency, // DeclaredFeesAmount, DeclaredFeesCurrency, ExecutionDate,ExecutionDate:ISO ExecutionType, // ExpirationDate,ExpirationDate:ISO, FeesAmount, FeesCurrency, Id, Nature, PaymentType, PreauthorizationId, // ResultCode, ResultMessage, Status, Tag, Type, WireReference Columns []string `json:"Columns,omitempty"` }
type ReportType ¶
type ReportType string
ReportType is the type of report
const (
ReportTransaction ReportType = "TRANSACTIONS"
)
type ReportWalletCreate ¶
type ReportWalletCreate struct { // A URL that we will ping when the report is ready to download (works in a similar way to the hooks) CallbackURL string `json:"CallbackURL,omitempty"` // The format of the report download DownloadFormat DownloadFormat `json:"DownloadFormat,omitempty"` // The column to sort against and direction Sort string `json:"Sort,omitempty"` // Whether the report should be limited to the first 10 lines (and therefore quicker to execute) Preview bool `json:"Preview,omitempty"` // An object of various filters for the report Filters ReportFilter `json:"Filters,omitempty"` // A list of columns/infos to show in the report - you can choose from: Id, Tag, CreationDate, // Owners, Description, BalanceAmount, BalanceCurrency, Currency, FundsType Columns []string `json:"Columns,omitempty"` }
type Repudiation ¶
type Repudiation struct { // Information about the funds that are being debited DebitedFunds Money `json:"DebitedFunds"` // Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds) CreditedFunds Money `json:"CreditedFunds"` // Information about the fees that were taken by the client // for this transaction (and were hence transferred to the Client's platform wallet) Fees Money `json:"Fees"` // The ID of the wallet that was debited DebitedWalletID string `json:"DebitedWalletId"` // The ID of the wallet where money will be credited CreditedWalletID string `json:"CreditedWalletId"` // A user's ID AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) CreditedUserID string `json:"CreditedUserId"` // The nature of the transaction Nature TransactionNature `json:"Nature"` // The status of the transaction Status TransactionStatus `json:"Status"` // When the transaction happened ExecutionDate int64 `json:"ExecutionDate"` // The result code ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode ResultMessage string // The type of the transaction Type TransactionType `json:"Type"` // The initial transaction ID InitialTransactionID string `json:"InitialTransactionId"` // The initial transaction type InitialTransactionType TransactionType `json:"InitialTransactionType"` }
Repudiation is created when a user has a requested a chargeback for a PayIn and the bank has withdrawn the funds from us automatically – they are always linked to a dispute.
type SSO ¶
type SSO struct { // The name of the user FirstName string `json:"FirstName"` // The last name of the user LastName string `json:"LastName"` // The user's email address - must be a valid email (not more than 12 consecutive numbers). // This email should not be already used for another SSO. (not more than 12 consecutive numbers) Email string `json:"Email"` // Whether the SSO is active or not Active bool `json:"Active"` // Status of the invitation sent to the user to confirm the SSO activation InvitationStatus InvitationStatus `json:"InvitationStatus"` // Date of the latest authentification LastLoginDate int64 `json:"LastLoginDate"` // PermissionGroup assigned to this SSO PermissionGroupID string `json:"PermissionGroupId"` // An ID for the client (i.e. url friendly, lowercase etc - sort of namespace identifier) ClientID string `json:"ClientId"` }
SSO (Single Sign-On) allows you to access to the Dashboard. You can create multiple SSOs so that several users can access to the Dashboard with personal credentials and specific permissions.
type SSOCreate ¶
type SSOCreate struct { // The name of the user REQUIRED FirstName string `json:"FirstName"` // The last name of the user REQUIRED LastName string `json:"LastName"` // The user's email address - must be a valid email (not more than 12 consecutive numbers). REQUIRED // This email should not be already used for another SSO. (not more than 12 consecutive numbers) Email string `json:"Email"` // PermissionGroup assigned to this SSO REQUIRED PermissionGroupID string `json:"PermissionGroupId"` }
SSOCreate is use to create an new SSO.
type SSOUpdate ¶
type SSOUpdate struct { // The name of the user OPTIONAL. FirstName string `json:"FirstName,omitempty"` // The last name of the user OPTIONAL. LastName string `json:"LastName,omitempty"` // PermissionGroup assigned to this SSO OPTIONAL. PermissionGroupID string `json:"PermissionGroupId,omitempty"` // Whether the SSO is active or not OPTIONAL. Active bool `json:"Active,omitempty"` }
SSOUpdate is use to update an existing SSO.
type Scopes ¶
type Scopes struct { // API endpoints linked to client details ClientDetails Permissions `json:"ClientDetails,omitempty"` // API endpoints linked to client logo ClientLogo Permissions `json:"ClientLogo,omitempty"` // API endpoints linked to client wallets ClientWallets Permissions `json:"ClientWallets,omitempty"` // API endpoints linked to client bank accounts ClientBankAccounts Permissions `json:"ClientBankAccounts,omitempty"` // API endpoints linked to client payins ClientPayins Permissions `json:"ClientPayins,omitempty"` // API endpoints linked to client payouts ClientPayouts Permissions `json:"ClientPayouts,omitempty"` // API endpoints linked to client transactions ClientTransactions Permissions `json:"ClientTransactions,omitempty"` // API endpoints linked to SSOs SSOs Permissions `json:"SSOs,omitempty"` // API endpoints linked to permission groups PermissionGroups Permissions `json:"PermissionGroups,omitempty"` // API endpoints linked to users Users Permissions `json:"Users,omitempty"` // API endpoints linked to wallets Wallets Permissions `json:"Wallets,omitempty"` // API endpoints linked to banking aliases BankingAliases Permissions `json:"BankingAliases,omitempty"` // API endpoints linked to cards Cards Permissions `json:"Cards,omitempty"` // API endpoints linked to bank accounts BankAccounts Permissions `json:"BankAccounts,omitempty"` // API endpoints linked to preauthorizations PreAuthorizations Permissions `json:"PreAuthorizations,omitempty"` // API endpoints linked to payins Payins Permissions `json:"Payins,omitempty"` // API endpoints linked to transfers Transfers Permissions `json:"Transfers,omitempty"` // API endpoints linked to payouts Payouts Permissions `json:"Payouts,omitempty"` // API endpoints linked to refunds Refunds Permissions `json:"Refunds,omitempty"` // API endpoints linked to transactions Transactions Permissions `json:"Transactions,omitempty"` // API endpoints linked to KYC documents KYCDocuments Permissions `json:"KYCDocuments,omitempty"` // API endpoints linked to disputes Disputes Permissions `json:"Disputes,omitempty"` // API endpoints linked to repudiations Repudiations Permissions `json:"Repudiations,omitempty"` // API endpoints linked to mandates Mandates Permissions `json:"Mandates,omitempty"` // API endpoints linked to reporting Reporting Permissions `json:"Reporting,omitempty"` // API endpoints linked to responses Responses Permissions `json:"Responses,omitempty"` // API endpoints linked to events Events Permissions `json:"Events,omitempty"` // API endpoints linked to hooks Hooks Permissions `json:"Hooks,omitempty"` // API endpoints linked to UBO declaration UboDeclarations Permissions `json:"UboDeclarations,omitempty"` }
type Sector ¶
type Sector string
Sector is the sector of the business.
const ( // SectorRentals is for a rentals sector. SectorRentals Sector = "RENTALS" // SectorStoreFashionAccessoriesObjects is for a stores fashion accessorties objects sector. SectorStoreFashionAccessoriesObjects Sector = "STORES_FASHION_ACCESSORIES_OBJECTS" // SectorBeautyCosmeticsHealth is for a beauty cosmetics health sector. SectorBeautyCosmeticsHealth Sector = "BEAUTY_COSMETICS_HEALTH" // SectorFoodWineRestaurants is for a food wine restaurants sector. SectorFoodWineRestaurants Sector = "FOOD_WINE_RESTAURANTS" // SectorHospitalityTravelCording is for a hospitality travel coriding sector. SectorHospitalityTravelCording Sector = "HOSPITALITY_TRAVEL_CORIDING" // SectorArtMusicEntretainement is for an art music entrertainment sector. SectorArtMusicEntretainement Sector = "ART_MUSIC_ENTERTAINMENT" // SectorFurnitureGarden is for a furniture garden sector. SectorFurnitureGarden Sector = "FURNITURE_GARDEN" // SectorServicesJobbingEducation is for a service jobbing education sector. SectorServicesJobbingEducation Sector = "SERVICES_JOBBING_EDUCATION" // SectorSportRecreationActivities is for a sport recreation activities sector. SectorSportRecreationActivities Sector = "SPORT_RECREATION_ACTIVITIES" // SectorTicketing is for a ticketing sector. SectorTicketing Sector = "TICKETING" // SectorLoan is for a loan sector. SectorLoan Sector = "LOAN" // SectorEquity is for a eauity sector. SectorEquity Sector = "EQUITY" // SectorPropertyEquity is for a property equity sector. SectorPropertyEquity Sector = "PROPERTY_EQUITY" // SectorRewardsCharity is for a rewards charity sector. SectorRewardsCharity Sector = "REWARDS_CHARITY" // SectorPoolGroupPayment is for a pool group payment sector. SectorPoolGroupPayment Sector = "POOL_GROUP_PAYMENT" // SectorFranchise is for a franchise sector. SectorFranchise Sector = "FRANCHISE" // SectorOther is for a other sector. SectorOther Sector = "OTHER" )
type SecureMode ¶
type SecureMode string
SecureMode is the type of mode.
const ( // SecureModeDefault is the mode of payin by DEFAULT. SecureModeDefault SecureMode = "DEFAULT" // SecureModeForce is the mode of payin by FORCE. SecureModeForce SecureMode = "FORCE" )
type SecurityInfo ¶
type SecurityInfo struct { // Result of Address Verification System check (only available for UK, US and Australia). AVSResult AVSResult `json:"AVSResult"` }
type SettlementTransfer ¶
type SettlementTransfer struct { // Information about the funds that are being debited DebitedFunds Money `json:"DebitedFunds"` // Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds) CreditedFunds Money `json:"CreditedFunds"` // Information about the fees that were taken by the client // for this transaction (and were hence transferred to the Client's platform wallet) Fees Money `json:"Fees"` // The ID of the wallet that was debited DebitedWalletID string `json:"DebitedWalletId"` // The ID of the wallet where money will be credited CreditedWalletID string `json:"CreditedWalletId"` // A user's ID AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) CreditedUserID string `json:"CreditedUserId"` // The nature of the transaction Nature TransactionNature `json:"Nature"` // The status of the transaction Status TransactionStatus `json:"Status"` // When the transaction happened ExecutionDate int64 `json:"ExecutionDate"` // The result code ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode ResultMessage string `json:"ResultMessage"` // The type of the transaction Type TransactionType `json:"Type"` // The ID of the associated repudiation transaction RepudiationID string `json:"RepudiationId"` }
SettlementTransfer is a transfer that can be used to settle the credit from a repudiation following a lost dispute (to impact the balance of the original wallet and settle the credit in your client credit wallet.
type SettlementTransferCreate ¶
type SettlementTransferCreate struct { // A user's ID REQUIRED. AuthorID string `json:"AuthorId"` // Information about the funds that are being debited REQUIRED. DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client REQUIRED // for this transaction (and were hence transferred to the Client's platform wallet). Fees Money `json:"Fees"` }
SettlementTransferCreate is for creating a SettlementTransfer payload. The AuthorId must match the AuthorId of original transaction that was repudiated
type TansfertCreate ¶
type TansfertCreate struct { // A user's ID REQUIRED. AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet) OPTIONAL. CreditedUserID string `json:"CreditedUserId,omitempty"` // Information about the funds that are being debited REQUIRED. DebitedFunds Money `json:"DebitedFunds"` // Information about the fees that were taken by the client // for this transaction (and were hence transferred to the Client's platform wallet) REQUIRED. Fees Money `json:"Fees"` // The ID of the wallet that was debited REQUIRED. DebitedWalletID string `json:"DebitedWalletId"` // The ID of the wallet where money will be credited REQUIRED. CreditedWalletID string `json:"CreditedWalletId"` }
TansfertCreate is used to create a new tranfert.
type TemplateURLOptions ¶
type TemplateURLOptions struct { // The corresponding template URL for this PSP REQUIRED. Payline string `json:"Payline"` }
type Transaction ¶
type Transaction struct { // Information about the funds that are being debited. DebitedFunds Money `json:"DebitedFunds"` // Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds)/ CreditedFunds Money `json:"CreditedFunds"` // Information about the fees that were taken by the client // for this transaction (and were hence transferred to the Client's platform wallet). Fees Money `json:"Fees"` // The ID of the wallet that was debited. DebitedWalletID string `json:"DebitedWalletId"` // The ID of the wallet where money will be credited, CreditedWalletID string `json:"CreditedWalletId"` // A user's ID. AuthorID string `json:"AuthorId"` // The user ID who is credited (defaults to the owner of the wallet), CreditedUserID string `json:"CreditedUserId"` // The nature of the transaction, Nature TransactionNature `json:"Nature"` // The status of the transaction, Status TransactionStatus `json:"Status"` // When the transaction happened, ExecutionDate int64 `json:"ExecutionDate"` // The result code, ResultCode string `json:"ResultCode"` // A verbal explanation of the ResultCode, ResultMessage string `json:"ResultMessage"` // The type of the transaction, Type TransactionType `json:"Type"` }
Transaction is used to describe a transaction.
type TransactionNature ¶
type TransactionNature string
TransactionNature is the nature of a transaction.
const ( // TransactionNatureRegular is for the transaction nature regular. TransactionNatureRegular TransactionNature = "REGULAR" // TransactionNatureRepudiation is for the transaction nature repudiation. TransactionNatureRepudiation TransactionNature = "REPUDIATION" // TransactionNatureRefund is for the transaction nature refund. TransactionNatureRefund TransactionNature = "REFUND" // TransactionNatureSettlement is for the transaction nature settlement. TransactionNatureSettlement TransactionNature = "SETTLEMENT" )
type TransactionStatus ¶
type TransactionStatus string
TransactionStatus stands for the transaction status.
const ( // TransactionStatusCreated is for the transaction status created. TransactionStatusCreated TransactionStatus = "CREATED" // TransactionStatusSucceeded is for the transaction status succeeded. TransactionStatusSucceeded TransactionStatus = "SUCCEEDED" // TransactionStatusFailed is for the transaction status failed. TransactionStatusFailed TransactionStatus = "FAILED" )
type TransactionType ¶
type TransactionType string
TransactionType stands for the transaction type.
const ( // TransactionTypePayin is for the transaction type payin. TransactionTypePayin TransactionType = "PAYIN" // TransactionTypeTransfer is for the transaction type transfert. TransactionTypeTransfer TransactionType = "TRANSFER" // TransactionTypePayout is for the transaction type payout. TransactionTypePayout TransactionType = "PAYOUT" )
type Transfert ¶
type Transfert struct { ID string `json:"Id"` Tag string `json:"Tag"` CreationDate int64 `json:"CreationDate"` TansfertCreate }
Transfert is the payload for tranferts.
type UBO ¶
type UBO struct { // The item's ID ID string `json:"Id"` // When the item was created CreationDate int64 `json:"CreationDate"` // The date when the document was processed by MANGOPAY ProcessedDate int64 `json:"ProcessedDate"` // Status of a UBO Declaration Status UBODeclarationStatus `json:"Status"` // Refused or incomplete Reason for a UBO Declaration Reason UBOReason `json:"Reason"` // Refused or incomplete Message for a UBO Declaration Message string `json:"Message"` }
UBO is a Declaration is an electronic version of the previous KYC document "Shareholder Declaration", in order to declare all the Ultimate Beneficial Owners of a BUSINESS-typed legal User (ie the shareholders with >25% of capital or voting rights).
type UBOCreate ¶
type UBOCreate struct { // The name of the UBO REQUIRED. FirstName string `json:"FirstName"` // The last name of the UBO REQUIRED. LastName string `json:"LastName"` // The address REQUIRED. Address Address `json:"Address"` // The UBO's nationality. ISO 3166-1 alpha-2 format is expected REQUIRED. Nationality country.ISO2 `json:"Nationality"` // The date of birth of the UBO - be careful to set the right timezone (should be UTC) REQUIRED. // to avoid 00h becoming 23h (and hence interpreted as the day before) Birthday int64 `json:"Birthday"` // The UBO's birthplace REQUIRED. Birthplace Birthplace `json:"Birthplace"` }
type UBODeclarationStatus ¶
type UBODeclarationStatus string
UBODeclarationStatus is for UBOs declaration type.
const ( // UBODeclarationStatusCreated is for an UBO status created. UBODeclarationStatusCreated UBODeclarationStatus = "CREATED" // UBODeclarationStatusValidationAsked is for an UBO status validation asked. UBODeclarationStatusValidationAsked UBODeclarationStatus = "VALIDATION_ASKED" // UBODeclarationStatusIncomplete is for an UBO status incomplete. UBODeclarationStatusIncomplete UBODeclarationStatus = "INCOMPLETE" // UBODeclarationStatusValidated is for an UBO status validated. UBODeclarationStatusValidated UBODeclarationStatus = "VALIDATED" // UBODeclarationStatusRefused is for an UBO status refused. UBODeclarationStatusRefused UBODeclarationStatus = "REFUSED" )
type UBOReason ¶
type UBOReason string
UBOReason is a reason type for UBO declaration
const ( UBOReasonMissing UBOReason = "MISSING_UBO" UBOReasonWrongInformation UBOReason = "WRONG_UBO_INFORMATION" UBOReasonIdentityNeeded UBOReason = "UBO_IDENTITY_NEEDED" UBOReasonOrganizationChartNeeded UBOReason = "ORGANIZATION_CHART_NEEDED" UBOReasonOrganizationDocumentNeeded UBOReason = "DOCUMENTS_NEEDED" UBOReasonDeclarationNotMatch UBOReason = "DECLARATION_DO_NOT_MATCH_UBO_INFORMATION" UBOReasonSpecificCase UBOReason = "SPECIFIC_CASE" )
type UBOUpdate ¶
type UBOUpdate struct { // The name of the UBO OPTIONAL. FirstName string `json:"FirstName,omitempty"` // The last name of the UBO OPTIONAL. LastName string `json:"LastName,omitempty"` // The address OPTIONAL. Address Address `json:"Address,omitempty"` // The UBO's nationality. ISO 3166-1 alpha-2 format is expected OPTIONAL. Nationality country.ISO2 `json:"Nationality,omitempty"` // The date of birth of the UBO - be careful to set the right timezone (should be UTC) // to avoid 00h becoming 23h (and hence interpreted as the day before) OPTIONAL. Birthday int64 `json:"Birthday,omitempty"` // The UBO's birthplace OPTIONAL. Birthplace Birthplace `json:"Birthplace,omitempty"` // To remove a UBO from your UBO declaration only put isActive to "false". You cannot activate back a UBO OPTIONAL. IsActive bool `json:"isActive,omitempty"` }
type User ¶
type User struct { // ID is the user's unique identification. ID string `json:"id"` // PersonType is the type of user. PersonType Person `json:"PersonType"` // Email is the person's email address (not more than 12 consecutive numbers) - must be a valid email. Email string `json:"Email"` // KYCLevel More info here. KYCLevel KYCLevel `json:"KYCLevel"` // Tag is a custom data that you can add to this item. Tag *string `json:"Tag"` // CreationDate is when the item was created. CreationDate int64 `json:"CreationDate"` }
type UserEmoney ¶
type UserEmoney struct { // The object owner's UserId UserID string `json:"userId"` // The amount of money that has been credited to this user CreditedEMoney Money `json:"CreditedEMoney"` // The amount of money that has been debited from this user DebitedEMoney Money `json:"DebitedEMoney"` }
UserEmoney represent the payload for a User Emoney.
type UserEmoneyParam ¶
type UserEmoneyParam struct { // Year is the year of the Emoney (optional). Year int // Month is the month in number (optional). Month int // Currency in ISO3 displayed (optional). Currency string }
UserEmoneyParam is the param that can be used to call a User Emoney.
type Wallet ¶
type Wallet struct { // An array of userIDs of who own's the wallet. For now, you only can set up a unique owner. Owners []string `json:"Owners"` // The current balance of the wallet Balance Money `json:"Balance"` // The type of funds in the wallet FundsType Funds `json:"FundsType"` // A desciption of the wallet Description string `json:"Description"` // The currency - should be ISO_4217 format Currency currency.ISO3 `json:"Currency"` }
Wallet is an object in which PayIns and Transfers from users are stored in order to collect money. You can pay into a Wallet, withdraw funds from a wallet or transfer funds from a Wallet to another Wallet.
type WalletCreate ¶
type WalletCreate struct { // An array of userIDs of who own's the wallet. For now, you only can set up a unique owner. (REQUIRED) Owners []string `json:"Owners"` // A desciption of the wallet (REQUIRED) Description string `json:"Description"` // The currency - should be ISO_4217 format (REQUIRED). Currency currency.ISO3 `json:"Currency"` // Custom data that you can add to this item (OPTIONAL). Tag string `json:"Tag"` }
WalletCreate helps to create a new Wallet.
type WalletUpdate ¶
type WalletUpdate struct { // A desciption of the wallet (OPTIONAL) Description string `json:"Description"` }
WalletUpdate helps to update an existing Wallet.
type WebExtended ¶
type WebExtended struct { // The item's ID ID string `json:"Id"` // The type of payin Payment Payment `json:"Payment"` // When the transaction happened ExecutionDate int64 `json:"ExecutionDate"` // The expiry date of the card - must be in format MMYY ExpirationDate string `json:"ExpirationDate"` // A partially obfuscated version of the credit card number Alias string `json:"Alias"` // The type of card . The card type is optional, but the default parameter is "CB_VISA_MASTERCARD" . CardType CardType `json:"CardType"` // The Country of the Address Country country.ISO2 `json:"Country"` // A unique representation of a 16-digits card number Fingerprint string `json:"Fingerprint"` }
The Pay-in web extended view is a view to get more details about the card used to process a payin web.
Source Files
¶
- bank_account.go
- banking_alias.go
- card.go
- client.go
- client_wallet.go
- dispute.go
- dispute_document.go
- error.go
- event.go
- hook.go
- idempotency.go
- kyc_doc.go
- mandate.go
- model.go
- pagination.go
- payin.go
- payout.go
- permission_group.go
- preauthorization.go
- rate_limit.go
- refund.go
- report.go
- repudiation.go
- settlement_tranfer.go
- sso.go
- transaction.go
- transfert.go
- ubo.go
- user.go
- usere_money.go
- wallet.go