You need an API key before following this guide. See Set Up Your API Keys to generate one.
1
Create a customer
Every payment must be linked to a customer. Send a Save the
POST /merchants/{merchantId}/customers request with the customer’s entityType (individual or organization) and name fields.customerId from the response, you’ll need it in the next steps.2
Register a payment instrument
A payment instrument is a tokenized card or bank account linked to your customer. Tokenize the raw card data with our collect component first, then pass the resulting token to PayGood. Some server-side setup is required to initialize the component - see core package / React package docsSave the
paymentInstrumentId from the response.3
Create a price (recommended)
Define a reusable price in your catalog so you can reference it on payments without hard-coding amounts each time.Save the
priceId from the response.4
Create a payment
You have everything you need. Submit the payment using the IDs you collected in the previous steps.Set A successful response returns the payment record with
captureMethod to automatic to authorize and capture the funds in a single step, which charges the customer immediately.status: "captured".