About Payment Requests
View as MarkdownHow Payment Requests take card-present payments on a terminal, what your server is responsible for, and how status moves from RECEIVED to COMPLETED or FAILED.
Overview
Payment Requests take card-present payments from your customers on a GoDaddy terminal. Your server creates a payment request, the terminal drives the customer interaction, and you learn the outcome later by callback or by polling.
This page explains how the pieces fit together, what your own code is responsible for, and how a request moves through its lifecycle.
Payment Requests settle to the same GoDaddy Payments account as Unified Checkout. Use Unified Checkout when the card isn't present on a website. Use Payment Requests when the customer is at a terminal in front of you.
Integration path
A working integration uses these pages in order:
| Order | Page | What you end up with |
|---|---|---|
| 1 | How to connect your terminal | A terminal configured for your store and its deviceId |
| 2 | How to charge a card on a terminal | A SALE and its final status, read by polling |
| 3 | How to handle the result | Verified callbacks, and a list call to find results you missed |
Your first charge needs only the first two pages. Go to Payment request reference for field limits, list filters, and error codes.
How it works
Your application never talks to the terminal directly and never handles card data. Your server holds the Personal Access Token (PAT), chooses the amount, the store, and the terminal, and sends a request to the GoDaddy API. GoDaddy routes it to the terminal. The terminal drives the customer interaction and reports back, and your server records the outcome against your own order.
Because routing happens server-side, you need no client-side SDK or browser checkout page. Any language that can make an HTTP request can drive a terminal.
The request is asynchronous
The API returns 202 Accepted right away with a paymentRequestId. The outcome arrives later by callback or by polling.
Don't treat 202 as paid
Treating the 202 as a completed payment is the most common integration mistake. Wait for the callback or poll until status is COMPLETED or FAILED before fulfilling an order or printing a receipt.
Payment lifecycle
The happy path is RECEIVED → QUEUED → IN_PROGRESS → COMPLETED. Production code also has to handle the branches. A SALE authorizes and captures in one step.
The following table lists what each status means and what to do:
| Status | What's happening | What you should do | Note |
|---|---|---|---|
RECEIVED | GoDaddy stored the request and is sending it to the terminal | Nothing | You see it only when you get the request while create is still running |
QUEUED | Waiting for the terminal | Do nothing | If it stalls here, the terminal is likely offline or deviceId is wrong |
IN_PROGRESS | The customer is interacting with the terminal | Show a waiting-for-customer state | |
COMPLETED | Payment succeeded | Fulfill the order and store the transactionIds | |
FAILED | GoDaddy couldn't send the request to the terminal, the payment failed, or the customer cancelled | Offer a retry with a new paymentRequestId |
Hold a pending state
Your system needs a pending state for a payment that has left RECEIVED without reaching a final status. A terminal that goes offline can leave the request in QUEUED or IN_PROGRESS. GoDaddy doesn't time out a request, and the API has no way to cancel one.
FAILED covers more than one cause, including a customer cancelling on the terminal. The payment request has no reason field, and GoDaddy doesn't add entries to activities[], so you can't tell a cancel from a decline or a timeout. A cancel creates no transaction. When the terminal created a transaction, transactionIds lists it, and links has a GET link for each one. Go to Get transaction by ID for the card result, which needs the commerce.transaction:read scope.
Callbacks and polling
Set callbackConfig on create when you want GoDaddy to push status updates to your HTTPS URL. With authentication.type set to hmac, GoDaddy signs every callback, and your endpoint verifies the signature before it trusts the payload. GoDaddy sends one callback per payment request, after the terminal reports the result. Every callback carries status, so read it instead of assuming the payment succeeded. GoDaddy retries delivery, so detect duplicates by paymentRequestId and that status.
Poll GET /v1/commerce/stores/{storeId}/payment-requests/{paymentRequestId} when you can't expose a public callback URL. Prefer callbacks in production; polling adds latency at the counter. Go to How to handle the result for signature verification, and Payment request reference for the callback fields. Go to How to charge a card on a terminal for polling.
Idempotency
paymentRequestId is optional on create, and GoDaddy generates one when you omit it. Send your own UUID so a retry is safe. When a create times out or you don't get a response, retry with the same paymentRequestId and a new X-Request-Id. If the payment request already exists, the API returns it instead of creating a second charge. This works for 90 days after you create the request.
The API doesn't compare the retry body with the original, so use a new paymentRequestId for a new charge. A retry never re-sends a payment request that has already FAILED. Create a new one with a new paymentRequestId instead. Send a new X-Request-Id on every create call. A repeated X-Request-Id for the same store within 30 minutes returns 409 DUPLICATE_REQUEST.
Refunds and voids
A refund is a new payment request of type REFUND, not a state transition on the original request. It runs the same lifecycle. You can also refund a payment without the API. Go to Issue a refund to my customer for the steps.
Set originalTransactionId to the transaction ID of the completed payment. Omit amount to refund the full transaction, or send amount for a partial refund. Refunds without an original transaction aren't supported. Don't modify the original request.
Partial refunds of unsettled sales
A partial refund of a sale that hasn't settled yet might void the whole sale. The refund transaction then covers the full amount, while the payment request still shows the amount you sent. Read the refund transaction for what GoDaddy refunded.
Send the refund with the same create call as a SALE, with a new paymentRequestId. The following body refunds 20.00 USD of a completed payment:
{
"paymentRequestId": "$PAYMENT_REQUEST_ID",
"type": "REFUND",
"deviceId": "$DEVICE_ID",
"originalTransactionId": "$TRANSACTION_ID",
"amount": { "amount": 2000, "currency": "USD", "amountType": "SIMPLE" }
}The create call doesn't check a refund amount against the original transaction. The terminal processes the refund and reports the result as the request's final status. A completed refund's transactionIds lists the original sale, not the refund. Get the sale transaction and read the href of its links[] entry with rel set to REFUND. That's the refund's transaction ID.
The API has no void and no separate capture. Void a payment on the terminal's payments screen.
Go to Payment request reference for types, statuses, field limits, and error codes.
Wallets and tips
A terminal takes Apple Pay and Google Pay when the customer taps a phone or watch. Send the same SALE request you send for a card, with no wallet fields.
The payment request's amount always shows the amount you sent, even when the terminal collects a tip. The transaction in transactionIds records what the customer paid. Its amount.total includes the tip, amount.subTotal is the amount you sent, and amount.tip.amount is the tip. Compare amount.total minus amount.tip.amount with your order total, and treat a missing tip as no tip. Tip settings live on the terminal.
Last updated on
How is this guide?