About accepting payments
View as MarkdownTake payments from your own customers online with Unified Checkout or in person with Payment Requests.
Overview
This section covers a business taking payments from its own customers. Your software starts the payment, and the money settles to your own GoDaddy Payments account.
Two products cover the two places a customer pays:
- Unified Checkout takes payments on your website, where the card isn't present, and comes in two forms: embedded and hosted.
- Payment Requests takes payments on a physical terminal, where the card is present.
Both products need a GoDaddy Payments account with an active store, your storeId, and a Personal Access Token (PAT) with the right scopes. Go to How to get set up to accept payments for each of these.
Each product adds its own requirements. An online payment needs an order and public HTTPS return URLs. An in-person payment needs a terminal GoDaddy configured for the store, and that terminal's deviceId.
Ways to take payments
Where the customer is when they pay decides how you build. The following table describes the three integration paths and when each one fits:
| Product | Where the customer pays | Use it when |
|---|---|---|
| Embedded checkout | On your own website | You build in React and want checkout inside your own pages |
| Hosted checkout | On a page GoDaddy hosts | You use any other stack, or want the least frontend work |
| Payment Requests | At a terminal in front of you | The customer is present and the business has a GoDaddy terminal |
A business selling both ways runs both products against the same store, and reconciles them through its own order records.
What you can accept
The following table lists the payment methods each product accepts:
| Method | Online | On a terminal |
|---|---|---|
| Cards, for example Visa or Mastercard | Yes | Yes |
| Apple Pay | Yes, after you register your domain | Yes |
| Google Pay | Yes | Yes |
Go to How to set up Apple Pay for domain registration.
How the two products differ
The products share a store and settle to the same account, but they behave differently enough that one code path does not serve both. The difference that matters most is when you learn the outcome.
The following table describes what differs between the two products.
| Unified Checkout | Payment Requests | |
|---|---|---|
| Card | Not present | Present |
| You learn the outcome | While the shopper is on the page | Later, by callback |
| First response means | A session exists and the shopper can pay | 202 Accepted. The request reached GoDaddy, not that the customer paid |
| Where the customer acts | A browser | A terminal |
| Scope your server needs | commerce.checkout-session:write, plus commerce.transaction:read to confirm payments | commerce.payment-request:read, commerce.payment-request:write |
| Can it stall | No | Yes, if the terminal is offline |
An in-person payment moves through RECEIVED, QUEUED, IN_PROGRESS, and then COMPLETED or FAILED.
Keep the order pending until the status is final, because a terminal that goes offline can leave the request in QUEUED or IN_PROGRESS. Go to About Payment Requests for the pending state. A refund is a new request of type REFUND. Go to Refunds and voids for the refund body.
To retry an in-person payment request, resend the same paymentRequestId with a new X-Request-Id. The API returns the existing payment request rather than charging twice. Go to About Payment Requests for the full retry rules.
Creating a checkout session has no equivalent header. Guard against double submission in your own code, because a repeated call creates a second session rather than returning the first.
What the API calls things
The following table maps everyday terms to the identifiers and objects these pages use:
| In plain terms | Identifier or object |
|---|---|
| Your store | storeId |
| A place customers buy from | channelId |
| One attempt to pay for one order online | Checkout session |
| An instruction to a terminal | Payment request |
| An order that isn't a sale yet | draftOrderId |
| The money moving | Transaction |
Start building
Set up once, take a first payment, then build the path that matches where your customer pays. The following table lists the pages in the order you'll need them:
| Page | What it covers |
|---|---|
| How to get set up to accept payments | The account, store, token, and scopes every payment needs |
| How to take your first payment | One card charged end to end through hosted checkout |
| About online payments | How the two checkout forms compare and how the session flow works |
| How to create a checkout session | The server-side session both checkout forms start from |
| How to use hosted checkout | Redirecting the shopper to a checkout page GoDaddy hosts |
| How to render embedded checkout | Rendering checkout inside your own React pages |
| How to configure checkout | What checkout collects and offers, and which payment methods it shows |
| How to set up Apple Pay | Registering a website domain so Unified Checkout can offer Apple Pay |
| Checkout session reference | Every field a checkout session accepts, and what it returns |
| About Payment Requests | How a payment request works, the lifecycle, callbacks, idempotency, and refunds |
| How to connect your terminal | Supported terminals, getting one ready, and finding the deviceId |
| How to charge a card on a terminal | Create a SALE payment request on a terminal |
| How to handle the result | Verify signed callbacks, poll, and list payment requests |
| Payment request reference | Types, statuses, field limits, filters, and error codes |
Last updated on
How is this guide?