{"id":37192256,"url":"https://github.com/monnify/monnify-go-wrapper","last_synced_at":"2026-01-14T22:18:16.786Z","repository":{"id":276648852,"uuid":"929276662","full_name":"Monnify/Monnify-Go-Wrapper","owner":"Monnify","description":"A Golang wrapper for Monnify APIs","archived":false,"fork":false,"pushed_at":"2025-05-01T08:05:44.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T00:31:02.706Z","etag":null,"topics":["golang-library","golang-package","monnify","payment-gateway","payment-integration","sdk-go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Monnify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-08T06:52:24.000Z","updated_at":"2025-05-01T05:06:04.000Z","dependencies_parsed_at":"2025-04-03T10:29:35.187Z","dependency_job_id":"55b56072-6983-4483-82e0-7a7feac235aa","html_url":"https://github.com/Monnify/Monnify-Go-Wrapper","commit_stats":null,"previous_names":["monnify/monnify-go-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Monnify/Monnify-Go-Wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnify%2FMonnify-Go-Wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnify%2FMonnify-Go-Wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnify%2FMonnify-Go-Wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnify%2FMonnify-Go-Wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monnify","download_url":"https://codeload.github.com/Monnify/Monnify-Go-Wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monnify%2FMonnify-Go-Wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T21:32:52.117Z","status":"ssl_error","status_checked_at":"2026-01-14T21:32:33.442Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang-library","golang-package","monnify","payment-gateway","payment-integration","sdk-go"],"created_at":"2026-01-14T22:18:15.969Z","updated_at":"2026-01-14T22:18:16.774Z","avatar_url":"https://github.com/Monnify.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang Monnify Package Documentation\n\nA Golang package to effortlessly integrate the Monnify payment gateway API into your Golang projects.\n\n## Installation\n\nInstall Go Package:\n\n```bash\ngo get github.com/Monnify/Monnify-Go-Wrapper\n```\n\n## Quick Start\n\nHere's how to quickly initialize a payment transaction:\n\n```go\nimport (\n  \"log\"\n\n  \"github.com/Monnify/Monnify-Go-Wrapper\"\n  \"github.com/Monnify/Monnify-Go-Wrapper/src/collections\"\n)\n\nmonnifyPayment := monnify.New(\u0026monnify.Options{\n  ApiKey:    \"api key\",\n  SecretKey: \"secret key\",\n  IsProduction: true\n})\n\nresp, err := monnifyPayment.Transaction.InitializeTransaction(\n  collections.InitializeTransactionModel{\n    CustomerEmail:      \"example@gmail.com\",\n    CustomerName:       \"John Doe\",\n    Amount:             20.87,\n    PaymentReference:   \"payment reference\",\n    PaymentDescription: \"description\",\n    ContractCode:       \"contract code\",\n  },\n)\n\nif err != nil {\n  log.Fatalln(err)\n}\n\nlog.Println(resp)\n```\n\n# Available Services\n\nThis package provides the following services:\n\n1. **Transaction Service**: Manage payments, authorizations, and statuses.\n2. **Customer Reserved Account Service**: Create/manage virtual accounts.\n3. **Disbursement Service**: Manage single and bulk fund transfers.\n4. **Verification Service**: Perform account, BVN, NIN verifications.\n5. **Sub Account Service**: Create/manage sub-accounts for split payments.\n6. **Refund Service**: Handle payment refunds.\n\n# Detailed Usage\n\n## Transaction Service\n\nThe Transaction Service handles all payment-related operations.\n\n### All Available Methods\n\n```go\n// Initialize a new transaction\nmonnifyPayment.Transaction.InitializeTransaction(body);\n\n// Initialize bank transfer payment\nmonnifyPayment.Transaction.PayWithBankTransfer(body);\n\n// Charge a card\nmonnifyPayment.Transaction.ChargeCard(body);\n\n// Card tokenization\nmonnifyPayment.Transaction.CardTokenization(body);\n\n/* Card Authorization */\n\n// Authorize with OTP\nmonnifyPayment.Transaction.AuthorizeOTP(body);\n\n// Authorize 3D secure card\nmonnifyPayment.Transaction.ThreeDsSecureAuthTransaction(body);\n\n/* Transaction Information */\n\n// Get transaction status v\nmonnifyPayment.Transaction.GetTransactionStatusv1(body);\n\n// Get transaction status v2\nmonnifyPayment.Transaction.GetTransactionStatusv2(body);\n```\n\n## Transaction Initialization\n\n```go\nmonnifyPayment.Transaction.InitializeTransaction(collections.InitializeTransactionModel{\n    CustomerEmail:      \"example@gmail.com\",\n    CustomerName:       \"John Doe\",\n    Amount:             20.87,\n    PaymentReference:   \"payment reference\",\n    PaymentDescription: \"description\",\n    ContractCode:       \"contract code\",\n  },\n);\n```\n\n**Required fields:** `CustomerEmail`, `CustomerName`, `Amount`, `PaymentReference`, `PaymentDescription`, `ContractCode`.\n\n**Optional fields:** `PaymentMethods`, `IncomeSplitConfig`, `RedirectUrl`, `CurrencyCode`, `MetaData`.\n\n### Pay with Bank Transfer\n\nInitializes a bank transfer payment.\n\n```go\nmonnifyPayment.Transaction.PayWithBankTransfer(collections.PayWithBankTransferModel{\n\t\tTransactionReference: \"transactionReference\",\n\t\tBankCode:             \"058\",\n\t});\n```\n\n### Charge Card\n\nProcess a card payment.\n\n```go\nmonnifyPayment.Transaction.ChargeCard(collections.ChargeCardModel{\n\t\tTransactionReference: transactionReference,\n\t\tCollectionChannel:    \"API_NOTIFICATION\",\n\t\tCard: ChargeCard{\n\t\t\tNumber:      \"4111111111111111\",\n\t\t\tExpiryMonth: \"12\",\n\t\t\tExpiryYear:  \"2025\",\n\t\t\tCVV:         \"123\",\n\t\t\tPIN:         \"1234\",\n\t\t},\n\t\tDeviceInformation: DeviceInformation{\n\t\t\tHttpBrowserLanguage:          \"en-US\",\n\t\t\tHttpBrowserJavaEnabled:       false,\n\t\t\tHttpBrowserJavaScriptEnabled: false,\n\t\t\tHttpBrowserColorDepth:        24,\n\t\t\tHttpBrowserScreenHeight:      1203,\n\t\t\tHttpBrowserScreenWidth:       2138,\n\t\t\tHttpBrowserTimeDifference:    \"24\",\n\t\t\tUserAgentBrowserValue:        \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36\",\n\t\t},\n\t});\n```\n\n### Authorize with OTP\n\n```go\nmonnifyPayment.Transaction.AuthorizeOTP(collections.AuthorizeOTPModel{\n\t\tTransactionReference: \"MNFY|05|20230409198910|002725\",\n\t\tCollectionChannel:    \"API_NOTIFICATION\",\n\t\tTokenId:              \"20.87-b66bef0aa8e660863c4e1177a08fefba\",\n\t\tToken:                \"otpToken\",\n\t});\n```\n\n### Authorize 3D secure card\n\n```go\nmonnifyPayment.Transaction.ThreeDsSecureAuthTransaction(collections.ThreeDsSecureAuthTransactionModel{\n  TransactionReference: \"transactionReference\",\n  CollectionChannel: \"CollectionChannel\",\n  Card: collections.ThreeDsSecureAuthTransactionCard{\n    Number: \"39837982098238\",\n    ExpiryMonth: \"05\",\n    ExpiryYear: \"2028\",\n    CVV: \"983\",\n  },\n  ApiKey: \"apiKey\",\n});\n```\n\n### Get Transaction Status v1\n\n```go\nmonnifyPayment.Transaction.GetTransactionStatusv1(collections.GetTransactionStatusv1Model{\n  PaymentReference: \"PaymentReference\",\n});\n```\n\n### Get Transaction Status v2\n\n```go\nmonnifyPayment.Transaction.GetTransactionStatusv2(collections.GetTransactionStatusv2Model{\n  TransactionReference: \"TransactionReference\",\n});\n```\n\n### Card tokenization\n\n```go\nmonnifyPayment.Transaction.CardTokenization(collections.CardTokenizationModel{\n    CustomerName:       \"John Doe\",\n\t\tCustomerEmail:      \"example@gmail.com\",\n\t\tAmount:             25.7,\n\t\tPaymentDescription: \"payment description\",\n\t\tPaymentReference:   \"paymentReference\",\n\t\tCurrencyCode:       \"NGN\",\n\t\tContractCode:       \"contract code\",\n\t\tCardToken:          \"card token\",\n\t\tApiKey:             \"api key\",\n});\n```\n\n## Customer Reserved Account Service\n\nManages reserved account operations.\n\n### All Available Methods\n\n```go\n// Create reserved account\nmonnifyPayment.ReservedAccount.CreateReservedAccount(body);\n\n// Add linked accounts\nmonnifyPayment.ReservedAccount.AddLinkedAccounts(body);\n\n// Remove account\nmonnifyPayment.ReservedAccount.DeallocateReservedAccount(body);\n\n// Account details\nmonnifyPayment.ReservedAccount.ReservedAccountDetails(body);\n\n// Account transactions\nmonnifyPayment.ReservedAccount.ReservedAccountTransactions(body);\n\n// Update account kyc\nmonnifyPayment.ReservedAccount.UpdateReservedAccountKycInfo(body);\n```\n\n### Create Reserved Account\n\nCreates a new reserved account.\n\n```go\nmonnifyPayment.ReservedAccount.CreateReservedAccount(collections.ReservedAccountSchema{\n\t\tCustomerName:         \"John Doe\",\n\t\tCustomerEmail:        \"customer email\",\n\t\tAccountName:          \"John Doe\",\n\t\tAccountReference:     \"accRef\",\n\t\tContractCode:         \"contract code\",\n\t\tBvn:                  \"bvn\",\n\t\tGetAllAvailableBanks: true,\n\t\tRestrictPaymentSource: false,\n\t});\n```\n\n### Add linked accounts\n\nAdd linked accounts.\n\n```go\nmonnifyPayment.ReservedAccount.AddLinkedAccounts(collections.AddLinkedAccountSchema{\n\t\tAccountReference:     \"accRef\",\n\t\tGetAllAvailableBanks: true,\n\t});\n```\n\n### Get Account Details\n\nGet the full reserved account detail.\n\n```go\nmonnifyPayment.ReservedAccount.ReservedAccountDetails(collections.ReservedAccountDetailsSchema{\n\t\tAccountReference: \"accRef\",\n\t});\n```\n\n### Deallocate Account\n\n```go\nmonnifyPayment.ReservedAccount.DeallocateReservedAccount(collections.DeallocateReservedAccountSchema{\n\t\tAccountReference: \"accRef\",\n\t})\n```\n\n### Update the KYC for a reserved account.\n\n```go\nmonnifyPayment.ReservedAccount.UpdateReservedAccountKycInfo(collections.UpdateReservedAccountKycInfoSchema{\n\t\tAccountReference: accRef,\n\t\tBvn:              \"82782672868273\",\n\t});\n```\n\n## Disbursement Service\n\nHandles money transfers and disbursements.\n\n### All Available Methods\n\n```go\n// Single Transfers\nmonnifyPayment.Disbursement.InitiateSingleTransfer(body)\n\n// Authorize single transfer\nmonnifyPayment.Disbursement.AuthorizeSingleTransfer(body)\n\n// Get single transfer status\nmonnifyPayment.Disbursement.GetSingleTransferStatus(body)\n\n// Bulk Transfer\nmonnifyPayment.Disbursement.InitiateBulkTransfer(body)\n\n// Authorize bulk transfer\nmonnifyPayment.Disbursement.AuthorizeBulkTransfer(body)\n\n// Get bulk status\nmonnifyPayment.Disbursement.GetBulkTransferStatus(body)\n\n// Get All Single transactions\nmonnifyPayment.Disbursement.GetAllSingleTransfer(body)\n\n// Get All Bulk transactions\nmonnifyPayment.Disbursement.GetAllBulkTransfer(body)\n\n/** Other Operations **/\n\n// Resend OTP\nmonnifyPayment.Disbursement.ResendTransferOTP(body)\n```\n\n### Single Transfer\n\nProcess a single money transfer.\n\n```go\nmonnifyPayment.Disbursement.InitiateSingleTransfer(disbursement.SingleTransfer{\n\t\tAmount:                   20.5,\n\t\tReference:                \"879867856545687\",\n\t\tNarration:                \"narration\",\n\t\tDestinationBankCode:      \"058\",\n\t\tDestinationAccountNumber: \"89786798678879\",\n\t\tCurrency:                 \"NGN\",\n\t\tSourceAccountNumber:      \"098787867675,\n\t})\n```\n\n### Bulk Transfer\n\nProcess multiple transfers at once.\n\n```go\nmonnifyPayment.Disbursement.InitiateBulkTransfer(disbursement.BulkTransfer{\n\t\tTitle:                \"Bulk Transfer\",\n\t\tBatchReference:       \"878675656454565\",\n\t\tSourceAccountNumber:  \"8786754564345\",\n\t\tNarration:            \"Bulk Transfer Narration\",\n\t\tOnValidationFailure:  \"CONTINUE\",\n\t\tNotificationInterval: 25,\n\t\tTransactionList: []bulkTransferTransactionList{\n\t\t\t{\n\t\t\t\tAmount:                   200.5,\n\t\t\t\tReference:                \"65654534534\",\n\t\t\t\tNarration:                \"narration\",\n\t\t\t\tDestinationBankCode:      \"058\",\n\t\t\t\tDestinationAccountNumber: \"54675675456\",\n\t\t\t\tCurrency:                 \"NGN\",\n\t\t\t},\n\t\t},\n\t})\n```\n\n### Authorize a single transfer with OTP.\n\n```go\nmonnifyPayment.Disbursement.AuthorizeSingleTransfer(disbursement.AuthorizeTransfer{\n\t\tReference:         \"reference-98678578769756745\",\n\t\tAuthorizationCode: \"491763\",\n\t})\n```\n\n### Authorize a bulk transfer with OTP.\n\n```go\nmonnifyPayment.Disbursement.AuthorizeBulkTransfer(disbursement.AuthorizeTransfer{\n\t\tReference:         \"reference-98678578769756745\",\n\t\tAuthorizationCode: \"491763\",\n\t})\n```\n\n### Check Single Transfer Status\n\n```go\nmonnifyPayment.Disbursement.GetSingleTransferStatus(disbursement.GetStatus{\n\t\tReference:         \"reference-98678578769756745\",\n\t})\n```\n\n### Check Bulk Transfer Status\n\n```go\nmonnifyPayment.Disbursement.GetBulkTransferStatus(disbursement.GetBulkStatus{\n\t\tReference:         \"reference-98678578769756745\",\n    PageNo: 1,\n    PageSize: 10\n\t})\n```\n\n### Resend Transfer OTP\n\n```go\nmonnifyPayment.Disbursement.ResendTransferOTP(disbursement.ResendTransferOTP{\n\t\tReference:         \"reference-98678578769756745\",\n\t})\n```\n\n### Get All Single Transfer\n\n```go\nmonnifyPayment.Disbursement.GetAllSingleTransfer(disbursement.GetAllSingleTransfer{\n\t\tPageNo: 1,\n    PageSize: 10\n\t})\n```\n\n### Get All Bulk Transfer\n\n```go\nmonnifyPayment.Disbursement.GetAllBulkTransfer(disbursement.GetAllBulkTransfer{\n\t\tPageNo: 1,\n    PageSize: 10\n\t})\n```\n\n## Verification Service\n\n### All Available Methods\n\n```go\n// Verify account\nmonnifyPayment.verification.ValidateBankAccount(body);\n// Verify BVN\nmonnifyPayment.verification.VerifyBvnInformation(body);\n// Match BVN\nmonnifyPayment.verification.MatchBvnAndAccountName(body);\n```\n\n### Verify Bank Account\n\n```go\nmonnifyPayment.verification.ValidateBankAccount(verification.ValidateBankAccountModel{\n  AccountNumber: \"8789678675764\",\n  BankCode: \"058\"\n})\n```\n\n### Verify BVN Information\n\n```go\nmonnifyPayment.verification.VerifyBvnInformation(verification.VerifyBvnInformationModel{\n  BVN: \"8789678675764\",\n  DateOfBirth: \"05-05-2025\"\n  MobileNo: \"09878676567\"\n  Name: \"John Doe\"\n})\n```\n\n### Match BVN with Bank Account\n\n```go\nmonnifyPayment.verification.MatchBvnAndAccountName(verification.MatchBvnAndAccountNameModel{\n  BVN: \"8789678675764\",\n  AccountNumber: \"8789678675764\",\n  BankCode: \"058\"\n})\n```\n\n## Sub Account Service\n\nManages sub-accounts for split payments.\n\n### All Available Methods\n\n```go\n// Create sub account\nmonnifyPayment.collections.CreateSubAccount(body)\n// Get all sub accounts\nmonnifyPayment.collections.GetSubAccounts()\n// Update sub account\nmonnifyPayment.collections.UpdateSubAccount(body)\n// Delete sub account\nmonnifyPayment.collections.DeleteSubAccount(body)\n```\n\n### Create Sub Account\n\nCreates a new sub-account for split payments.\n\n```go\nmonnifyPayment.collections.CreateSubAccount([]collections.CreateSubAccountModel{\n\t\t{\n\t\t\tCurrencyCode:           \"NGN\",\n\t\t\tAccountNumber:          \"0211319282\",\n\t\t\tBankCode:               \"058\",\n\t\t\tEmail:                  \"example@gmail.com\",\n\t\t\tDefaultSplitPercentage: 20.87,\n\t\t},\n\t})\n```\n\n### Get All Sub Accounts\n\nRetrieves all sub-accounts associated with your contract.\n\n```go\nmonnifyPayment.collections.GetSubAccounts()\n```\n\n### Update Sub Account\n\nUpdates an existing sub-account's details.\n\n```go\nmonnifyPayment.collections.UpdateSubAccount(collections.UpdateSubAccountModel{\n  CurrencyCode:           \"NGN\",\n  AccountNumber:          \"0211319282\",\n  BankCode:               \"058\",\n  Email:                  \"example@gmail.com\",\n  DefaultSplitPercentage: 20.87,\n})\n```\n\n### Delete Sub Account\n\nRemoves a sub-account from your contract.\n\n```go\nmonnifyPayment.collections.DeleteSubAccount(collections.DeleteSubAccountModel{\n  SubAccountCode: \"subAccountCode\",\n})\n```\n\n## Refund Service\n\n### All Available Methods\n\n```go\n// Initialize a refund\nmonnifyPayment.disbursement.InitiateRefund(body)\n// Get all refunds\nmonnifyPayment.disbursement.GetAllRefunds(body)\n// Check refund status\nmonnifyPayment.disbursement.GetRefundStatus(body)\n```\n\n### Initialize Refund\n\nCreates a new refund request.\n\n```go\nmonnifyPayment.disbursement.InitiateRefund(disbursement.InitiateRefundModel{\n  RefundReason: \"reason\",\n  RefundAmount: 20.8,\n  RefundReference: \"reference-87687564535487\",\n  TransactionReference: \"transaction-ref-978656745\",\n  CustomerNote: \"customer note\"\n})\n```\n\n### Get Refund Status\n\nCheck the status of a specific refund.\n\n```go\nmonnifyPayment.disbursement.GetRefundStatus(disbursement.GetRefundStatusModel{\n  RefundReference: \"reference-87687564535487\",\n})\n```\n\n### Get All Refunds\n\nRetrieves all refunds with pagination.\n\n```go\nmonnifyPayment.disbursement.GetAllRefunds(disbursement.GetAllRefundsModel{\n  Page: 1,\n  Size: 10\n})\n```\n\n## Error Handling\n\n\u003e This package returns error in an organized structure. Below is the error structure\n\n```go\n  type Error Struct {\n    Message  string\n    Error    error\n    Response struct {\n      RequestSuccessful bool\n      ResponseMessage   string\n      ResponseCode      string\n    }\n  }\n```\n\n\u003e Response can be nil when an error is thrown on code level but available when an error is thrown from API\n\n## Testing\n\nRun package tests with:\n\n```bash\nmake test\n```\n\n## Contributing\n\n- Fork repository\n- Create feature/fix branch\n- Submit Pull Request\n\n## Credits\n\n- [Franklin Isaiah](https://github.com/Cavdy)\n\n## License\n\nThis package is licensed under the [MIT License](LICENSE.md).\n\n## Support\n\nFor any support or security issues, please contact [integration-support@monnify.com](mailto:integration-support@monnify.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonnify%2Fmonnify-go-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonnify%2Fmonnify-go-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonnify%2Fmonnify-go-wrapper/lists"}