{"title":"Pay.gov","slug":"paygov-payment-provider","url":"https://support.storeconnect.com/articles/paygov-payment-provider","url_markdown":"https://support.storeconnect.com/articles/paygov-payment-provider.md","subtitle":null,"summary":"Configure Pay.gov Hosted Collection Pages in StoreConnect so shoppers pay by card, or by PayPal if configured, on Pay.gov\u0026#39;s page, including API options, production mode, what shoppers see, what happens when a payment\u0026#39;s outcome is unclear, limits and testing.","type":"Help_Documentation","video_url":"","keywords":"Pay.gov, paygov, hosted collection pages, federal agency payments, production mode, unresolved charge, payment being checked, payment cancelled","last_modified":"2026-11-16T00:11:44+0000","body_markdown":"This topic explains how to configure Pay.gov, the U.S. Treasury's collection service, as a payment provider in StoreConnect. Shoppers are redirected from your store to Pay.gov's hosted page to pay by card, then return to your store. To take PayPal instead of card, set `payment_type` to `PAYPAL` (see [API Options](#api-options)). ACH bank debit will follow in a later release.\n\n## What you need\n\n-   A Pay.gov Hosted Collection Pages cash flow application, set up by Pay.gov. Pay.gov supplies the TCS application ID.\n-   The TCS client certificate and the matching private key, issued through Pay.gov.\n-   Your store's outbound IP addresses, whitelisted by Pay.gov. StoreConnect support can provide these addresses.\n\nMake all requests to Pay.gov through your agency's Pay.gov Agency Implementation liaison.\n\n## Configure Pay.gov in StoreConnect\n\n1.  Open StoreConnect and go to **Settings \u003e Payments \u003e Payment providers**. If **Pay.gov** is not listed under **Provider** after a StoreConnect upgrade, open the Console, run the picklist manager, and apply the missing value for **Payment Provider \u003e Provider** first. The value to apply has the API name `PayGov` and the label **Pay.gov**.\n2.  Select **New**. Complete the fields as follows, then **Save**:\n\n    | StoreConnect field | Select or enter                                                                 |\n    |--------------------|---------------------------------------------------------------------------------|\n    | Name               | Pay.gov                                                                         |\n    | Provider           | Select Pay.gov from the list                                                    |\n    | API Mode           | `sandbox` (Pay.gov's QA environment, qa.pay.gov) or `production` (www.pay.gov) |\n    | API Key            | Not used by Pay.gov, but required by StoreConnect. Enter `x`.                   |\n    | API Secret         | Not used by Pay.gov, but required by StoreConnect. Enter `x`.                   |\n    | API Options        | See [API Options](#api-options).                                                |\n\n## API Options\n\nThe **API Options** field uses YAML format. Each option goes on its own line.\n\n| Option               | Required | Value |\n|----------------------|----------|-------|\n| `tcs_app_id`         | Yes      | The Pay.gov TCS application ID for your Hosted Collection Pages cash flow application, supplied by your Pay.gov liaison. |\n| `client_certificate` | Yes      | The PEM text of the TCS client certificate issued through Pay.gov (Treasury's certificate authority). |\n| `client_private_key` | Yes      | The PEM text of the private key for that certificate. |\n| `payment_type`       | No       | The one payment type Pay.gov offers the shopper: `PLASTIC_CARD` (card, the default) or `PAYPAL`. Leave it out to take card payments. `ACH` is not supported yet and shows an error at checkout. |\n| `language`           | No       | The Pay.gov payment page language code. The default is `en`. |\n\nExample:\n\n```yaml\n\ntcs_app_id: YOUR_TCS_APP_ID\nclient_certificate: |-\n  -----BEGIN CERTIFICATE-----\n  (paste contents of your TCS certificate .pem here)\n  -----END CERTIFICATE-----\nclient_private_key: |-\n  -----BEGIN PRIVATE KEY-----\n  (paste contents of your TCS private key .pem here)\n  -----END PRIVATE KEY-----\npayment_type: PLASTIC_CARD\nlanguage: en\n```\n\nOmit `payment_type` and `language` if you do not use them.\n\n:::tip\nWhen pasting multi-line certificate content into the **API Options** field, every line of the certificate must be indented consistently beneath the key name. Prepare the YAML in a text editor before pasting.\n:::\n\nKeep the certificate and private key confidential. Never share them in email, tickets or screenshots.\n\nAfter you save the provider, Pay.gov appears as a payment option at checkout.\n\n## What shoppers see\n\n1.  At checkout, the shopper chooses **Pay.gov** and selects **Pay Now**. StoreConnect starts the Pay.gov payment and puts the cart into payment processing, so the items in it cannot change while the shopper is away.\n2.  The shopper pays on Pay.gov's page.\n3.  The shopper returns to your store and sees a processing page while StoreConnect completes the payment with Pay.gov and creates the order.\n4.  The shopper sees your store's order confirmation.\n\nPay.gov takes the money only when StoreConnect completes the payment in step 3. Refreshing the processing page, or going back to it, does not complete the payment a second time. If the shopper selects **Pay Now** again before paying, they return to the same Pay.gov payment rather than starting a new one.\n\nThe **Payment** record on the order stores the Pay.gov Tracking ID, which matches the transaction in **Transaction Search** on Pay.gov's Agency Collections site.\n\nIf the payment does not go through, the shopper returns to the payment step with a message, and the cart is released so they can pay again or choose another payment method:\n\n| What happened                           | Message the shopper sees                                                |\n|-----------------------------------------|-------------------------------------------------------------------------|\n| Pay.gov declined the card               | \"Your card was declined by Pay.gov. Please try another payment method.\" |\n| The shopper cancelled on Pay.gov's page | \"The payment was cancelled on Pay.gov.\"                                 |\n\nIf the shopper leaves Pay.gov's page without paying or cancelling, nothing is charged. StoreConnect releases the cart three hours after the Pay.gov payment started, once Pay.gov can no longer complete it.\n\n## When a payment's outcome is unclear\n\nSometimes StoreConnect asks Pay.gov to complete a payment but never gets the answer, for example when the request times out. Pay.gov may have taken the money, so StoreConnect does not tell the shopper the payment failed. StoreConnect holds the payment as unresolved instead:\n\n- The shopper sees \"We're still checking whether your payment went through, so please don't pay again. Check your email or your orders page for an update, or contact us if you don't hear back.\"\n- The cart stays in payment processing, so the items in it cannot be changed.\n- Another Pay.gov payment under the same order number is refused with the same message until the first is settled.\n\nStoreConnect cannot ask Pay.gov what happened to the payment, so an unresolved Pay.gov payment stays that way until StoreConnect Support settles it. If a shopper reports the \"still checking\" message:\n\n1.  Open **Transaction Search** on Pay.gov's Agency Collections site.\n2.  Search for the payment, and note whether Pay.gov collected the money.\n3.  [Raise a support case](how-to-raise-a-support-case). Include the order number and what Transaction Search shows.\n\nSupport then records the payment as paid, or releases the cart so the shopper can pay again.\n\n## Production mode\n\nSet **API Mode** to `production` to take live payments at checkout. Payments for an existing order, such as an order balance paid through a [Salesforce order payment link](salesforce-order-payment-link), are not available in production yet. In production mode, those payments show \"Pay.gov production payments are only available for checkout payments.\" Use a different payment provider for them.\n\n## Limits\n\n-   Pay.gov is available for USD stores only.\n-   Refunds and cancellations are not available through StoreConnect for Pay.gov. Process them in **Transaction Search** on Pay.gov.\n-   Card payments complete immediately. ACH debit support is coming in a later release.\n-   Recurring and subscription payments are not available through Pay.gov.\n-   Pay.gov's regular maintenance window is Sunday 2:00 to 8:00 AM Eastern. Payments may fail during this time.\n\n## Testing\n\n1.  Set **API Mode** to `sandbox`.\n2.  Use Pay.gov's \"Agency Guide to Application Testing\" for test card numbers and the amounts that trigger specific outcomes. For example, $3.00 approves and $3.01 declines.\n\n:::warning\nNever enter real card or bank details in sandbox mode. Pay.gov reports this to Treasury as a security incident.\n:::\n\nSee [testing orders](test-orders) for more on testing your store and checkout experience. When you are ready, change **API Mode** to `production` and use your production credentials. See [Production mode](#production-mode) for what production supports."}