Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
stripe
✓ github.com/stripe/stripe-go/v71
Creates a Stripe charge using the API client.
package main
import (
"github.com/stripe/stripe-go/v71"
"github.com/stripe/stripe-go/v71/charge"
)
func main() {
stripe.Key = "sk_test_..."
params := &stripe.ChargeParams{
Amount: stripe.Int64(2000),
Currency: stripe.String("usd"),
}
ch, err := charge.New(params)
if err != nil {
panic(err)
}
_ = ch
}
Debug
Known issues
gotchaMajor version v71 is not the latest; newer versions exist (e.g., v72+).fixUpdate to the latest major version to get new features and security fixes.
affects: >=71.0.0 <72.0.0
Upgrade
Version history
71.48.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.