blindpay

package module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 19 Imported by: 0

README ΒΆ

BlindPay Go SDK

The official Go SDK for BlindPay - Global payments infrastructure made simple.

πŸš€ Installation

go get github.com/blindpaylabs/blindpay-go

πŸ“‹ Requirements

  • Go 1.21 or higher
  • BlindPay API credentials (API Key and Instance ID)

πŸ”§ Quick Start

Basic Usage
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/blindpaylabs/blindpay-go"
)

func main() {
	// Create a new BlindPay client
	client, err := blindpay.New(
		"your-api-key-here",
		"your-instance-id-here",
	)
	if err != nil {
		log.Fatal(err)
	}

	// Get available payment rails
	rails, err := client.Available.GetRails(context.Background())
	if err != nil {
		log.Fatal(err)
	}

	fmt.Printf("Found %d payment rails\n", len(rails))
	for _, rail := range rails {
		fmt.Printf("- %s (%s) in %s\n", rail.Label, rail.Value, rail.Country)
	}
}
Running the Example
go run main.go

For detailed API documentation, visit:

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Made with ❀️ by the BlindPay team

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

View Source
const (
	CurrencyTypeSender   = types.CurrencyTypeSender
	CurrencyTypeReceiver = types.CurrencyTypeReceiver

	NetworkBase            = types.NetworkBase
	NetworkSepolia         = types.NetworkSepolia
	NetworkArbitrumSepolia = types.NetworkArbitrumSepolia
	NetworkBaseSepolia     = types.NetworkBaseSepolia
	NetworkArbitrum        = types.NetworkArbitrum
	NetworkPolygon         = types.NetworkPolygon
	NetworkPolygonAmoy     = types.NetworkPolygonAmoy
	NetworkEthereum        = types.NetworkEthereum
	NetworkStellar         = types.NetworkStellar
	NetworkStellarTestnet  = types.NetworkStellarTestnet
	NetworkTron            = types.NetworkTron

	StablecoinUSDC = types.StablecoinTokenUSDC
	StablecoinUSDT = types.StablecoinTokenUSDT
	StablecoinUSDB = types.StablecoinTokenUSDB

	TransactionDocumentInvoice            = types.TransactionDocumentTypeInvoice
	TransactionDocumentPurchaseOrder      = types.TransactionDocumentTypePurchaseOrder
	TransactionDocumentDeliverySlip       = types.TransactionDocumentTypeDeliverySlip
	TransactionDocumentContract           = types.TransactionDocumentTypeContract
	TransactionDocumentCustomsDeclaration = types.TransactionDocumentTypeCustomsDeclaration
	TransactionDocumentBillOfLading       = types.TransactionDocumentTypeBillOfLading
	TransactionDocumentOthers             = types.TransactionDocumentTypeOthers

	BankAccountTypeChecking = types.BankAccountTypeChecking
	BankAccountTypeSaving   = types.BankAccountTypeSaving

	CurrencyUSDC = types.CurrencyUSDC
	CurrencyUSDT = types.CurrencyUSDT
	CurrencyUSDB = types.CurrencyUSDB
	CurrencyBRL  = types.CurrencyBRL
	CurrencyUSD  = types.CurrencyUSD
	CurrencyMXN  = types.CurrencyMXN
	CurrencyCOP  = types.CurrencyCOP
	CurrencyARS  = types.CurrencyARS

	AccountClassIndividual = types.AccountClassIndividual
	AccountClassBusiness   = types.AccountClassBusiness

	TransactionStatusPending    = types.TransactionStatusPending
	TransactionStatusRefunded   = types.TransactionStatusRefunded
	TransactionStatusProcessing = types.TransactionStatusProcessing
	TransactionStatusCompleted  = types.TransactionStatusCompleted
	TransactionStatusFailed     = types.TransactionStatusFailed
	TransactionStatusOnHold     = types.TransactionStatusOnHold
)
View Source
const (
	CountryAF = types.CountryAF
	CountryAL = types.CountryAL
	CountryDZ = types.CountryDZ
	CountryAS = types.CountryAS
	CountryAD = types.CountryAD
	CountryAO = types.CountryAO
	CountryAI = types.CountryAI
	CountryAQ = types.CountryAQ
	CountryAG = types.CountryAG
	CountryAR = types.CountryAR
	CountryAM = types.CountryAM
	CountryAW = types.CountryAW
	CountryAU = types.CountryAU
	CountryAT = types.CountryAT
	CountryAZ = types.CountryAZ
	CountryBS = types.CountryBS
	CountryBH = types.CountryBH
	CountryBD = types.CountryBD
	CountryBB = types.CountryBB
	CountryBY = types.CountryBY
	CountryBE = types.CountryBE
	CountryBZ = types.CountryBZ
	CountryBJ = types.CountryBJ
	CountryBM = types.CountryBM
	CountryBT = types.CountryBT
	CountryBO = types.CountryBO
	CountryBQ = types.CountryBQ
	CountryBA = types.CountryBA
	CountryBW = types.CountryBW
	CountryBV = types.CountryBV
	CountryBR = types.CountryBR
	CountryIO = types.CountryIO
	CountryBN = types.CountryBN
	CountryBG = types.CountryBG
	CountryBF = types.CountryBF
	CountryBI = types.CountryBI
	CountryCV = types.CountryCV
	CountryKH = types.CountryKH
	CountryCM = types.CountryCM
	CountryCA = types.CountryCA
	CountryKY = types.CountryKY
	CountryCF = types.CountryCF
	CountryTD = types.CountryTD
	CountryCL = types.CountryCL
	CountryCN = types.CountryCN
	CountryCX = types.CountryCX
	CountryCC = types.CountryCC
	CountryCO = types.CountryCO
	CountryKM = types.CountryKM
	CountryCD = types.CountryCD
	CountryCG = types.CountryCG
	CountryCK = types.CountryCK
	CountryCR = types.CountryCR
	CountryHR = types.CountryHR
	CountryCU = types.CountryCU
	CountryCW = types.CountryCW
	CountryCY = types.CountryCY
	CountryCZ = types.CountryCZ
	CountryCI = types.CountryCI
	CountryDK = types.CountryDK
	CountryDJ = types.CountryDJ
	CountryDM = types.CountryDM
	CountryDO = types.CountryDO
	CountryEC = types.CountryEC
	CountryEG = types.CountryEG
	CountrySV = types.CountrySV
	CountryGQ = types.CountryGQ
	CountryER = types.CountryER
	CountryEE = types.CountryEE
	CountrySZ = types.CountrySZ
	CountryET = types.CountryET
	CountryFK = types.CountryFK
	CountryFO = types.CountryFO
	CountryFJ = types.CountryFJ
	CountryFI = types.CountryFI
	CountryFR = types.CountryFR
	CountryGF = types.CountryGF
	CountryPF = types.CountryPF
	CountryTF = types.CountryTF
	CountryGA = types.CountryGA
	CountryGM = types.CountryGM
	CountryGE = types.CountryGE
	CountryDE = types.CountryDE
	CountryGH = types.CountryGH
	CountryGI = types.CountryGI
	CountryGR = types.CountryGR
	CountryGL = types.CountryGL
	CountryGD = types.CountryGD
	CountryGP = types.CountryGP
	CountryGU = types.CountryGU
	CountryGT = types.CountryGT
	CountryGG = types.CountryGG
	CountryGN = types.CountryGN
	CountryGW = types.CountryGW
	CountryGY = types.CountryGY
	CountryHT = types.CountryHT
	CountryHM = types.CountryHM
	CountryVA = types.CountryVA
	CountryHN = types.CountryHN
	CountryHK = types.CountryHK
	CountryHU = types.CountryHU
	CountryIS = types.CountryIS
	CountryIN = types.CountryIN
	CountryID = types.CountryID
	CountryIR = types.CountryIR
	CountryIQ = types.CountryIQ
	CountryIE = types.CountryIE
	CountryIM = types.CountryIM
	CountryIL = types.CountryIL
	CountryIT = types.CountryIT
	CountryJM = types.CountryJM
	CountryJP = types.CountryJP
	CountryJE = types.CountryJE
	CountryJO = types.CountryJO
	CountryKZ = types.CountryKZ
	CountryKE = types.CountryKE
	CountryKI = types.CountryKI
	CountryKP = types.CountryKP
	CountryKR = types.CountryKR
	CountryKW = types.CountryKW
	CountryKG = types.CountryKG
	CountryLA = types.CountryLA
	CountryLV = types.CountryLV
	CountryLB = types.CountryLB
	CountryLS = types.CountryLS
	CountryLR = types.CountryLR
	CountryLY = types.CountryLY
	CountryLI = types.CountryLI
	CountryLT = types.CountryLT
	CountryLU = types.CountryLU
	CountryMO = types.CountryMO
	CountryMG = types.CountryMG
	CountryMW = types.CountryMW
	CountryMY = types.CountryMY
	CountryMV = types.CountryMV
	CountryML = types.CountryML
	CountryMT = types.CountryMT
	CountryMH = types.CountryMH
	CountryMQ = types.CountryMQ
	CountryMR = types.CountryMR
	CountryMU = types.CountryMU
	CountryYT = types.CountryYT
	CountryMX = types.CountryMX
	CountryFM = types.CountryFM
	CountryMD = types.CountryMD
	CountryMC = types.CountryMC
	CountryMN = types.CountryMN
	CountryME = types.CountryME
	CountryMS = types.CountryMS
	CountryMA = types.CountryMA
	CountryMZ = types.CountryMZ
	CountryMM = types.CountryMM
	CountryNA = types.CountryNA
	CountryNR = types.CountryNR
	CountryNP = types.CountryNP
	CountryNL = types.CountryNL
	CountryNC = types.CountryNC
	CountryNZ = types.CountryNZ
	CountryNI = types.CountryNI
	CountryNE = types.CountryNE
	CountryNG = types.CountryNG
	CountryNU = types.CountryNU
	CountryNF = types.CountryNF
	CountryMP = types.CountryMP
	CountryNO = types.CountryNO
	CountryOM = types.CountryOM
	CountryPK = types.CountryPK
	CountryPW = types.CountryPW
	CountryPS = types.CountryPS
	CountryPA = types.CountryPA
	CountryPG = types.CountryPG
	CountryPY = types.CountryPY
	CountryPE = types.CountryPE
	CountryPH = types.CountryPH
	CountryPN = types.CountryPN
	CountryPL = types.CountryPL
	CountryPT = types.CountryPT
	CountryPR = types.CountryPR
	CountryQA = types.CountryQA
	CountryMK = types.CountryMK
	CountryRO = types.CountryRO
	CountryRU = types.CountryRU
	CountryRW = types.CountryRW
	CountryRE = types.CountryRE
	CountryBL = types.CountryBL
	CountrySH = types.CountrySH
	CountryKN = types.CountryKN
	CountryLC = types.CountryLC
	CountryMF = types.CountryMF
	CountryPM = types.CountryPM
	CountryVC = types.CountryVC
	CountryWS = types.CountryWS
	CountrySM = types.CountrySM
	CountryST = types.CountryST
	CountrySA = types.CountrySA
	CountrySN = types.CountrySN
	CountryRS = types.CountryRS
	CountrySC = types.CountrySC
	CountrySL = types.CountrySL
	CountrySG = types.CountrySG
	CountrySX = types.CountrySX
	CountrySK = types.CountrySK
	CountrySI = types.CountrySI
	CountrySB = types.CountrySB
	CountrySO = types.CountrySO
	CountryZA = types.CountryZA
	CountryGS = types.CountryGS
	CountrySS = types.CountrySS
	CountryES = types.CountryES
	CountryLK = types.CountryLK
	CountrySD = types.CountrySD
	CountrySR = types.CountrySR
	CountrySJ = types.CountrySJ
	CountrySE = types.CountrySE
	CountryCH = types.CountryCH
	CountrySY = types.CountrySY
	CountryTW = types.CountryTW
	CountryTJ = types.CountryTJ
	CountryTZ = types.CountryTZ
	CountryTH = types.CountryTH
	CountryTL = types.CountryTL
	CountryTG = types.CountryTG
	CountryTK = types.CountryTK
	CountryTO = types.CountryTO
	CountryTT = types.CountryTT
	CountryTN = types.CountryTN
	CountryTR = types.CountryTR
	CountryTM = types.CountryTM
	CountryTC = types.CountryTC
	CountryTV = types.CountryTV
	CountryUG = types.CountryUG
	CountryUA = types.CountryUA
	CountryAE = types.CountryAE
	CountryGB = types.CountryGB
	CountryUM = types.CountryUM
	CountryUS = types.CountryUS
	CountryUY = types.CountryUY
	CountryUZ = types.CountryUZ
	CountryVU = types.CountryVU
	CountryVE = types.CountryVE
	CountryVN = types.CountryVN
	CountryVG = types.CountryVG
	CountryVI = types.CountryVI
	CountryWF = types.CountryWF
	CountryEH = types.CountryEH
	CountryYE = types.CountryYE
	CountryZM = types.CountryZM
	CountryZW = types.CountryZW
	CountryAX = types.CountryAX
)
View Source
const (
	RailWire               = types.RailWire
	RailACH                = types.RailACH
	RailPix                = types.RailPix
	RailSpeiBitso          = types.RailSpeiBitso
	RailTransfersBitso     = types.RailTransfersBitso
	RailACHCopBitso        = types.RailACHCopBitso
	RailInternationalSwift = types.RailInternationalSwift
	RailRTP                = types.RailRTP
)
View Source
const (
	WebhookEventReceiverNew         = types.WebhookEventReceiverNew
	WebhookEventReceiverUpdate      = types.WebhookEventReceiverUpdate
	WebhookEventBankAccountNew      = types.WebhookEventBankAccountNew
	WebhookEventPayoutNew           = types.WebhookEventPayoutNew
	WebhookEventPayoutUpdate        = types.WebhookEventPayoutUpdate
	WebhookEventPayoutComplete      = types.WebhookEventPayoutComplete
	WebhookEventPayoutPartnerFee    = types.WebhookEventPayoutPartnerFee
	WebhookEventBlockchainWalletNew = types.WebhookEventBlockchainWalletNew
	WebhookEventPayinNew            = types.WebhookEventPayinNew
	WebhookEventPayinUpdate         = types.WebhookEventPayinUpdate
	WebhookEventPayinComplete       = types.WebhookEventPayinComplete
	WebhookEventPayinPartnerFee     = types.WebhookEventPayinPartnerFee
)
View Source
const Version = "1.3.0"

Version is the current version of the SDK.

Variables ΒΆ

This section is empty.

Functions ΒΆ

func VerifyWebhookSignature ΒΆ

func VerifyWebhookSignature(secret, id, timestamp, payload, signature string) bool

VerifyWebhookSignature verifies the BlindPay webhook signature using Svix.

Parameters:

  • secret: The webhook secret from BlindPay dashboard
  • id: The value of the `webhook-id` header
  • timestamp: The value of the `webhook-timestamp` header
  • payload: The raw request body as a string
  • signature: The value of the `webhook-signature` header

Returns true if the signature is valid, false otherwise.

Types ΒΆ

type APIError ΒΆ

type APIError = request.APIError

APIError represents an error response from the BlindPay API. It is an alias to the internal request.APIError for convenience.

type AccountClass ΒΆ

type AccountClass = types.AccountClass

type BankAccountType ΒΆ

type BankAccountType = types.BankAccountType

type BankDetail ΒΆ

type BankDetail = types.BankDetail

type Client ΒΆ

type Client struct {
	Available        *available.Client
	APIKeys          *apikeys.Client
	BankAccounts     *bankaccounts.Client
	Instances        *instances.Client
	PartnerFees      *partnerfees.Client
	Payins           *payins.Client
	Payouts          *payouts.Client
	Quotes           *quotes.Client
	Receivers        *receivers.Client
	VirtualAccounts  *virtualaccounts.Client
	Wallets          *wallets.Client
	OfframpWallets   *wallets.OfframpClient
	WebhookEndpoints *webhookendpoints.Client
	// contains filtered or unexported fields
}

Client is the main BlindPay client.

func New ΒΆ

func New(apiKey, instanceID string, opts ...Option) (*Client, error)

New creates a new BlindPay client with the given API key and instance ID.

type Country ΒΆ

type Country = types.Country

type Currency ΒΆ

type Currency = types.Currency

type CurrencyType ΒΆ

type CurrencyType = types.CurrencyType

type ErrorItem ΒΆ

type ErrorItem = request.ErrorItem

ErrorItem represents an individual error in the errors array. It is an alias to the internal request.ErrorItem for convenience.

type Network ΒΆ

type Network = types.Network

type Option ΒΆ

type Option func(*Client)

func WithBaseURL ΒΆ

func WithBaseURL(baseURL string) Option

func WithHTTPClient ΒΆ

func WithHTTPClient(httpClient *http.Client) Option

type PaginationMetadata ΒΆ

type PaginationMetadata = types.PaginationMetadata

type PaginationParams ΒΆ

type PaginationParams struct {
	Limit         int    `json:"limit,omitempty"`
	Offset        int    `json:"offset,omitempty"`
	StartingAfter string `json:"starting_after,omitempty"`
	EndingBefore  string `json:"ending_before,omitempty"`
}

type Rail ΒΆ

type Rail = types.Rail

type RailEntry ΒΆ

type RailEntry = types.RailEntry

type StablecoinToken ΒΆ

type StablecoinToken = types.StablecoinToken

type TrackingComplete ΒΆ

type TrackingComplete = types.TrackingComplete

type TrackingLiquidity ΒΆ

type TrackingLiquidity = types.TrackingLiquidity

type TrackingPartnerFee ΒΆ

type TrackingPartnerFee = types.TrackingPartnerFee

type TrackingPayment ΒΆ

type TrackingPayment = types.TrackingPayment

type TrackingTransaction ΒΆ

type TrackingTransaction = types.TrackingTransaction

type TransactionDocumentType ΒΆ

type TransactionDocumentType = types.TransactionDocumentType

type TransactionStatus ΒΆ

type TransactionStatus = types.TransactionStatus

type WebhookEvent ΒΆ

type WebhookEvent = types.WebhookEvent

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL