Documentation ¶
Index ¶
- Constants
- Variables
- type Bank
- type BanksResponse
- type BulkTransferDetailsResponse
- type BulkTransferResponse
- type Config
- type Environment
- type GeneralTransaction
- type GeneralTransactionResponse
- type LoginResponse
- type Monnify
- type ResendOTPResponse
- type ReserveAccountResponse
- type ReservedAccountTransaction
- type ReservedAccountTransactionsResponse
- type SingleTransferDetails
- type SingleTransferDetailsResponse
- type SingleTransferResponse
- type TransferTransactionsResponse
- type ValidAccountNumberResponse
- type WalletBalanceResponse
Constants ¶
View Source
const ( EnvSandbox Environment = "sandbox" //Sandbox environment for development EnvLive Environment = "live" //Live environmrnt EnvTest Environment = "test" //Test environment used during unit/integration testing SandBoxAPIKey string = "MK_TEST_SAF7HR5F3F" SandBoxSecretKey string = "4SY6TNL8CK3VPRSBTHTRG2N8XXEGC6NL" DefaultContractCode string = "4934121686" APIBaseUrlSandbox string = "https://sandbox.monnify.com/api" APIBaseUrlLive string = "https://api.monnify.com/api" RequestTimeout time.Duration = 5 * time.Second CurrencyNGN = params.CurrencyNGN ValidationFailedContinue = params.ValidationFailedContinue ValidationFailedBreak = params.ValidationFailedBreak NotificationInterval10 = params.NotificationInterval10 NotificationInterval20 = params.NotificationInterval20 NotificationInterval50 = params.NotificationInterval50 NotificationInterval100 = params.NotificationInterval100 PaymentStatusPaid string = "PAID" PaymentStatusPending string = "PENDING" PaymentStatusOverpaid string = "OVERPAID" PaymentStatusPartiallyPaid string = "PARTIALLY_PAID" PaymentStatusExpired string = "EXPIRED" PaymentStatusFailed string = "FAILED" PaymentStatusCancelled string = "CANCELLED" )
Variables ¶
View Source
var ( DefaultConfig = Config{ Environment: EnvSandbox, APIKey: SandBoxAPIKey, SecretKey: SandBoxSecretKey, RequestTimeout: RequestTimeout, DefaultContractCode: DefaultContractCode, } AuthToken string ExpiresIn time.Time )
Functions ¶
This section is empty.
Types ¶
type BanksResponse ¶ added in v1.1.0
type BanksResponse struct { ResponseBody []Bank `json:"responseBody"` // contains filtered or unexported fields }
type BulkTransferDetailsResponse ¶
type BulkTransferDetailsResponse struct { ResponseBody struct { Title string `json:"title"` TotalAmount float64 `json:"totalAmount"` TotalFee float64 `json:"totalFee"` BatchReference string `json:"batchReference"` TotalTransactions int `json:"totalTransactions"` FailedCount int `json:"failedCount"` SuccessfulCount int `json:"successfulCount"` PendingCount int `json:"pendingCount"` BatchStatus string `json:"batchStatus"` DateCreated string `json:"dateCreated"` } `json:"responseBody"` // contains filtered or unexported fields }
type BulkTransferResponse ¶
type BulkTransferResponse struct { ResponseBody struct { TotalAmount float64 `json:"totalAmount"` TotalFee float64 `json:"totalFee"` BatchReference string `json:"batchReference"` BatchStatus string `json:"batchStatus"` TotalTransactions int `json:"totalTransactions"` DateCreated string `json:"date_created"` } // contains filtered or unexported fields }
type Config ¶
type Config struct { Environment Environment APIKey string SecretKey string RequestTimeout time.Duration DefaultContractCode string }
Config is used to initialize the Monnify client. Environment - sets the current environment. Sandbox or Live APIKey - well pretty obvious :) SecretKey - same as above RequestTimeout - used to set a deadline on the HTTP requests made. defaults to 5seconds. setting it to 0 to ignores timeout and could make request wait indefinitely (not recommended). DefaultContractCode - used by some endpoints. is not provided in the endpoint method params. Not required.
type Environment ¶
type Environment string
type GeneralTransaction ¶ added in v1.1.0
type GeneralTransaction struct { TransactionReference string `json:"transactionReference"` PaymentReference string `json:"paymentReference"` AmountPaid string `json:"amountPaid"` TotalPayable string `json:"totalPayable"` SettlementAmount string `json:"settlementAmount"` PaidOn string `json:"paidOn"` PaymentStatus string `json:"paymentStatus"` PaymentDescription string `json:"paymentDescription"` TransactionHash string `json:"transactionHash"` Currency string `json:"currency"` PaymentMethod string `json:"paymentMethod"` Product struct { Type string `json:"type"` Reference string `json:"reference"` } `json:"product"` CardDetails struct { CardType string `json:"cardType"` AuthorizationCode string `json:"authorizationCode"` Last4 string `json:"last4"` ExpMonth string `json:"expMonth"` ExpYear string `json:"expYear"` Bin string `json:"bin"` Reusable bool `json:"reusable"` } `json:"cardDetails"` AccountDetails accountDetails `json:"accountDetails"` AccountPayments []accountDetails `json:"accountPayments"` Customer struct { Email string `json:"email"` Name string `json:"name"` } `json:"customer"` MetaData struct { Name string `json:"name"` Age string `json:"age"` } }
type GeneralTransactionResponse ¶ added in v1.1.0
type GeneralTransactionResponse struct { ResponseBody GeneralTransaction `json:"responseBody"` // contains filtered or unexported fields }
type LoginResponse ¶
type Monnify ¶
type Monnify struct { General *general //Invoicing *invoicing Disbursements *disbursements ReservedAccounts *reservedAccounts }
type ResendOTPResponse ¶
type ResendOTPResponse struct { ResponseBody struct { Message string `json:"message"` } `json:"responseBody"` // contains filtered or unexported fields }
type ReserveAccountResponse ¶
type ReserveAccountResponse struct { ResponseBody struct { ContractCode string `json:"contractCode"` AccountReference string `json:"accountReference"` AccountName string `json:"accountName"` CurrencyCode string `json:"currencyCode"` CustomerEmail string `json:"customerEmail"` CustomerName string `json:"customerName"` AccountNumber string `json:"accountNumber"` BankName string `json:"bankName"` BankCode string `json:"bankCode"` CollectionChannel string `json:"collectionChannel"` ReservationReference string `json:"reservationReference"` ReservedAccountType string `json:"reservedAccountType"` Status string `json:"status"` CreatedOn string `json:"createdOn"` IncomeSplitConfig []struct { SubAccountCode string `json:"subAccountCode"` FeePercentage float64 `json:"feePercentage"` FeeBearer bool `json:"feeBearer"` SplitPercentage float64 `json:"splitPercentage"` } `json:"incomeSplitConfig"` RestrictPaymentSource bool `json:"restrictPaymentSource"` Contract struct { Name string `json:"name"` Code string `json:"code"` Description string `json:"description"` SupportsAdvancedSettlementAccountSelection bool `json:"supportsAdvancedSettlementAccountSelection"` SweepToExternalAccount bool `json:"sweepToExternalAccount"` } `json:"contract"` } `json:"responseBody"` // contains filtered or unexported fields }
type ReservedAccountTransaction ¶ added in v1.1.0
type ReservedAccountTransaction struct { CustomerDTO struct { Email string `json:"email"` Name string `json:"name"` MerchantCode string `json:"merchantCode"` } `json:"customerDTO"` ProviderAmount float64 `json:"providerAmount"` PaymentMethod string `json:"paymentMethod"` CreatedOn string `json:"createdOn"` Amount float64 `json:"amount"` Flagged bool `json:"flagged"` ProviderCode string `json:"providerCode"` Fee float64 `json:"fee"` CurrencyCode string `json:"currencyCode"` CompletedOn string `json:"completedOn"` PaymentDescription string `json:"paymentDescription"` PaymentStatus string `json:"paymentStatus"` TransactionReference string `json:"transactionReference"` PaymentReference string `json:"paymentReference"` MerchantCode string `json:"merchantCode"` MerchantName string `json:"merchantName"` PayableAmount float64 `json:"payableAmount"` AmountPaid float64 `json:"amountPaid"` Completed bool `json:"completed"` }
type ReservedAccountTransactionsResponse ¶ added in v1.1.0
type ReservedAccountTransactionsResponse struct { ResponseBody struct { Content []ReservedAccountTransaction `json:"content"` Pageable struct { Sort struct { Sorted bool `json:"sorted"` Unsorted bool `json:"unsorted"` Empty bool `json:"empty"` } `json:"sort"` PageSize int `json:"pageSize"` PageNumber int `json:"pageNumber"` Offset int `json:"offset"` Unpaged bool `json:"unpaged"` Paged bool `json:"paged"` } `json:"pageable"` TotalElements int `json:"totalElements"` TotalPages int `json:"totalPages"` Last bool `json:"last"` Sort struct { Sorted bool `json:"sorted"` Unsorted bool `json:"unsorted"` Empty bool `json:"empty"` } `json:"sort"` First bool `json:"first"` NumberOfElements int `json:"numberOfElements"` Size int `json:"size"` Number int `json:"number"` Empty bool `json:"empty"` } `json:"responseBody"` // contains filtered or unexported fields }
type SingleTransferDetails ¶
type SingleTransferDetails struct { Amount float64 `json:"amount"` Reference string `json:"reference"` Narration string `json:"narration"` BankCode string `json:"bankCode"` AccountNumber string `json:"accountNumber"` Currency string `json:"currency"` AccountName string `json:"accountName"` BankName string `json:"bankName"` DateCreated string `json:"dateCreated"` Fee float64 `json:"fee"` Status string `json:"status"` }
type SingleTransferDetailsResponse ¶
type SingleTransferDetailsResponse struct { ResponseBody SingleTransferDetails `json:"responseBody"` // contains filtered or unexported fields }
type SingleTransferResponse ¶
type TransferTransactionsResponse ¶
type TransferTransactionsResponse struct { ResponseBody struct { Content []SingleTransferDetails `json:"content"` Pageable struct { Sort struct { Sorted bool `json:"sorted"` Unsorted bool `json:"unsorted"` Empty bool `json:"empty"` } `json:"sort"` PageSize int `json:"pageSize"` PageNumber int `json:"pageNumber"` Offset int `json:"offset"` Unpaged bool `json:"unpaged"` Paged bool `json:"paged"` } `json:"pageable"` TotalElements int `json:"totalElements"` TotalPages int `json:"totalPages"` Last bool `json:"last"` Sort struct { Sorted bool `json:"sorted"` Unsorted bool `json:"unsorted"` Empty bool `json:"empty"` } `json:"sort"` First bool `json:"first"` NumberOfElements int `json:"numberOfElements"` Size int `json:"size"` Number int `json:"number"` Empty bool `json:"empty"` } `json:"responseBody"` // contains filtered or unexported fields }
type WalletBalanceResponse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.