How to get set up to accept payments
View as MarkdownSet up the GoDaddy Payments account, store ID, and Personal Access Token that every online and in-person payment needs.
Overview
Every online and in-person payment needs the same three things. You need a GoDaddy Payments account with an active store, your storeId, and a Personal Access Token (PAT) with the right scopes. You set them up once, and every page under Accept payments assumes you have them.
This page also lists what must be true before your software charges a paying customer.
Create a GoDaddy Payments account
There's no API for this step. You create the GoDaddy Payments account and activate the store in the GoDaddy interface. This path uses a PAT on your own account, so there's no developer organization, OAuth client, or application registration to set up.
Create a GoDaddy Payments account
Go to Set up a GoDaddy Payments account to create your account and activate your store.
Without the GoDaddy Payments account, you can still create a session, but the payment fails.
Find your store ID
Every payment names the store it belongs to with storeId.
Find your store ID
Sign in to your GoDaddy account and go to About the Commerce API to retrieve your storeId.
Create a Personal Access Token
A PAT authenticates your server. Create it on the account that owns the store, and select only the scopes for the calls you intend to make.
The following table lists the scopes each task needs:
| Task | Scopes |
|---|---|
| Create checkout sessions | commerce.checkout-session:write |
| Charge a card on a terminal and read the result | commerce.payment-request:write, commerce.payment-request:read |
| List the terminals on a store | commerce.store:read |
| Read a store's sales channels | commerce.channel:read |
| Read transactions | commerce.transaction:read |
| Register a domain for Apple Pay | commerce.store.apple-pay:write, commerce.store:read |
Go to How to Authenticate to create the token.
Keep the token on your server
The token displays once, so store it in a secrets manager. The browser never needs it. For online payments, the checkout session carries a token of its own, and that's what the checkout form authenticates with.
Set the environment variables
The examples under Accept payments read the following values from the environment:
| Variable | Value | Used by |
|---|---|---|
GODADDY_PAT | Your Personal Access Token | Every example |
STORE_ID | Your storeId | Every example |
SKU_ID | A SKU in your catalog | Online examples that charge an existing SKU |
DRAFT_ORDER_ID | A draft order you created | Online examples that charge an existing draft order |
TRANSACTION_ID | A transaction ID from a completed payment | Transaction lookup examples |
DEVICE_ID | The terminal's device identifier | In-person examples |
SERIAL_NUMBER | The serial number printed on your terminal | In-person examples that find a deviceId |
PAYMENT_REQUEST_ID | A UUID you generate for a new charge, or the ID of the request you poll | In-person examples |
REFERENCE_ID | Your own order or ticket number | In-person examples that set references |
CALLBACK_URL | The public HTTPS URL that receives payment request callbacks | In-person examples |
WEBHOOK_SECRET | The shared secret GoDaddy signs callbacks with | In-person examples |
UPDATED_AT_AFTER | An RFC 3339 date-time, like the start of an outage | In-person examples that list payment requests |
Go to How to connect your terminal to find a terminal's DEVICE_ID.
Before you take live payments
You must meet the following prerequisites before your software charges a paying customer:
-
a GoDaddy Payments account
-
an active store on that account
-
a PAT with the scopes for every call you make
-
for in-person payments, a GoDaddy terminal (Duo, Flex, or Pro) purchased for the account
Buy a terminal
Go to GoDaddy Payments point of sale to choose and buy a terminal.
-
for Apple Pay online, every checkout domain registered
Register Apple Pay domains
Go to How to set up Apple Pay to register your domains.
Tax is optional and configured on the store. Go to Create and apply taxes to set it up in the GoDaddy interface, or How to configure your taxes to set it up through the API.
Last updated on
How is this guide?