Skip to Content
SDKsGoPayments

Payments

Pay-as-you-go credit top-ups via vouchers. Check the current tiered rate, then create a voucher in TZS — credits are computed server-side.

rate, err := client.Payments.Rate(ctx) // VoucherRate{MinAmountTZS, Tiers} payment, err := client.Payments.Create(ctx, sendafrica.CreateVoucherRequest{ Amount: 10000, // TZS — converted to credits server-side Provider: "snippe", Phone: "0712345678", }) // payment.ID, payment.Status, payment.CreditAmount
GET /v1/vouchers/rate POST /v1/vouchers

Legacy payments endpoint

A legacy sender-defined payment flow is also available:

payment, err := client.Payments.CreatePayment(ctx, sendafrica.CreatePaymentRequest{ /* ... */ }) // POST /payments

See Payments & Vouchers for the full contract.

Last updated on