Documentation
¶
Overview ¶
Package rapydgo is the root package for the rapyd-go module.
rapyd-go is a production-grade, zero-dependency Go SDK for the Rapyd fintech-as-a-service platform, built with Domain-Driven Design (DDD).
Quick Start ¶
client, err := rapyd.New(rapyd.Config{
AccessKey: os.Getenv("RAPYD_ACCESS_KEY"),
SecretKey: os.Getenv("RAPYD_SECRET_KEY"),
Sandbox: true,
})
Architecture ¶
The package is organized into four DDD layers:
- domain/ — Pure domain entities and value objects (no external deps)
- application/ — Application services orchestrating use-cases
- infrastructure/ — HTTP transport, HMAC signing, retry logic
- pkg/ — Cross-cutting concerns (errors, models, retry)
Entry Point ¶
All interaction starts through [rapyd.New], which returns a [rapyd.Client] containing domain-aligned service groups:
- Client.Collect — Accept payments, refunds, subscriptions, customers
- Client.Disburse — Send payouts to beneficiaries worldwide
- Client.Wallet — Manage wallets, transfers, virtual accounts, KYC
- Client.Issuing — Issue and manage physical and virtual cards
- Client.Partner — PayFac / KYB onboarding for sub-merchants
- Client.Webhook — Verify and route incoming Rapyd webhook events
- Client.Resource — Reference data: FX rates, countries, currencies
Error Handling ¶
All API errors are wrapped in pkg/errors.APIError and support errors.Is matching against sentinel values such as pkg/errors.ErrInsufficientFunds, pkg/errors.ErrCardDeclined, and pkg/errors.ErrRateLimit.
For full documentation, see https://github.com/iamkanishka/rapyd-go
Index ¶
Constants ¶
const Version = "1.0.0"
Version is the current SDK version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
application
|
|
|
collect
Package collect is the application service for all Rapyd Collect APIs.
|
Package collect is the application service for all Rapyd Collect APIs. |
|
disburse
Package disburse is the application service for all Rapyd Disburse (payout) APIs.
|
Package disburse is the application service for all Rapyd Disburse (payout) APIs. |
|
issuing
Package issuing is the application service for all Rapyd Card Issuing APIs.
|
Package issuing is the application service for all Rapyd Card Issuing APIs. |
|
partner
Package partner is the application service for all Rapyd Partner/PayFac APIs.
|
Package partner is the application service for all Rapyd Partner/PayFac APIs. |
|
resource
Package resource provides the application service for Rapyd utility endpoints.
|
Package resource provides the application service for Rapyd utility endpoints. |
|
wallet
Package wallet is the application service for all Rapyd Wallet APIs.
|
Package wallet is the application service for all Rapyd Wallet APIs. |
|
webhook
Package webhook is the application service for webhook verification and routing.
|
Package webhook is the application service for webhook verification and routing. |
|
Package config provides the SDK configuration struct and resolution helpers.
|
Package config provides the SDK configuration struct and resolution helpers. |
|
domain
|
|
|
beneficiary
Package beneficiary defines the Beneficiary domain entity and its related value objects used in Rapyd Disburse payouts.
|
Package beneficiary defines the Beneficiary domain entity and its related value objects used in Rapyd Disburse payouts. |
|
card
Package card defines the Issued Card domain entity and related objects.
|
Package card defines the Issued Card domain entity and related objects. |
|
cardtoken
Package cardtoken defines the Digital Wallet Card Token domain entity.
|
Package cardtoken defines the Digital Wallet Card Token domain entity. |
|
checkout
Package checkout defines the Checkout Page domain entity.
|
Package checkout defines the Checkout Page domain entity. |
|
customer
Package customer defines Customer and related billing domain entities.
|
Package customer defines Customer and related billing domain entities. |
|
dispute
Package dispute defines the Dispute domain entity.
|
Package dispute defines the Dispute domain entity. |
|
escrow
Package escrow defines the Escrow domain value objects.
|
Package escrow defines the Escrow domain value objects. |
|
grouppayment
Package grouppayment defines the Group Payment domain entity.
|
Package grouppayment defines the Group Payment domain entity. |
|
identity
Package identity defines the Identity Verification (KYC) domain entity.
|
Package identity defines the Identity Verification (KYC) domain entity. |
|
partner
Package partner defines Partner/PayFac domain entities for KYB onboarding.
|
Package partner defines Partner/PayFac domain entities for KYB onboarding. |
|
payment
Package payment defines the Payment domain entity and its value objects.
|
Package payment defines the Payment domain entity and its value objects. |
|
paymentlink
Package paymentlink defines the Payment Link domain entity.
|
Package paymentlink defines the Payment Link domain entity. |
|
payout
Package payout defines the Payout domain entity.
|
Package payout defines the Payout domain entity. |
|
refund
Package refund defines the Refund domain entity.
|
Package refund defines the Refund domain entity. |
|
virtualaccount
Package virtualaccount defines the Virtual Account domain entity.
|
Package virtualaccount defines the Virtual Account domain entity. |
|
wallet
Package wallet defines the Wallet domain entity and its sub-objects.
|
Package wallet defines the Wallet domain entity and its sub-objects. |
|
webhook
Package webhook defines the Webhook domain entity and the typed event data structures for every Rapyd webhook event type.
|
Package webhook defines the Webhook domain entity and the typed event data structures for every Rapyd webhook event type. |
|
Package examples shows idiomatic usage of the rapyd-go DDD SDK.
|
Package examples shows idiomatic usage of the rapyd-go DDD SDK. |
|
infrastructure
|
|
|
httpclient
Package httpclient provides the shared HTTP transport layer for all Rapyd application services.
|
Package httpclient provides the shared HTTP transport layer for all Rapyd application services. |
|
signing
Package signing implements Rapyd's HMAC-SHA256 request and webhook signature schemes as specified in the Rapyd API documentation.
|
Package signing implements Rapyd's HMAC-SHA256 request and webhook signature schemes as specified in the Rapyd API documentation. |
|
pkg
|
|
|
errors
Package errors defines all Rapyd SDK error types and sentinel values.
|
Package errors defines all Rapyd SDK error types and sentinel values. |
|
models
Package models defines all shared Rapyd value objects, enumerations, and primitive types used across every domain in the rapyd-go SDK.
|
Package models defines all shared Rapyd value objects, enumerations, and primitive types used across every domain in the rapyd-go SDK. |
|
retry
Package retry implements full-jitter exponential backoff for HTTP requests.
|
Package retry implements full-jitter exponential backoff for HTTP requests. |
|
Package rapyd is the top-level entry point for the rapyd-go SDK.
|
Package rapyd is the top-level entry point for the rapyd-go SDK. |