SAQ Integration Guide
Build SAQ compliance workflows into your application using the Preczn API.
You use the SAQ API to build the SAQ workflow in your own software. Your UI collects the merchant's answers and signature, and the API creates the SAQ, produces the signed PDF, and tracks its expiration. Use this guide when you're building that workflow or recording SAQs that merchants signed elsewhere. For what SAQ Management does and its key concepts, see Overview.
SAQ template
The SAQ template is the PDF that Preczn fills in to produce each draft and signed SAQ. Upload it before you generate any SAQ PDFs. Preczn needs it to return a draft PDF or to sign an SAQ, and returns No Template set for platform. when it's missing. Uploading a PDF signed elsewhere doesn't need it.
Upload the template as a multipart file named file, using POST /v1/saq/template/upload. The file must be a PDF of 15 MB or less.
Keep the following in mind when you prepare the template:
- One template for each mode. Your test API key and your live API key each upload their own template. Uploading again in the same mode replaces that mode's template.
- Answers you share across merchants. When a requirement has the same answer for every merchant on your platform, mark it in the template. Preczn adds each merchant's own details and answers on top.
- Fixed positions. Preczn writes each value at a fixed position on a fixed page of the template, so keep the page layout of the SAQ A form that Preczn fills in. Contact Preczn support if you need help preparing the template.
Generated SAQs
A generated SAQ is one that Preczn fills in and signs from data you send. Use it when the merchant answers the questionnaire and signs in your software.
The following steps create, fill in, and sign an SAQ. Each response is trimmed to the fields that matter here.
-
Create a draft SAQ of type
Afor the merchant, usingPOST /v1/saq. You can includethirdPartyProcessors,section2Questionnaire, andappendixCinpdfDetailsnow or add them later:{ "merchantId": "{merchantId}", "type": "A" }Preczn fills in the merchant's name, legal name, website, mailing address, and the primary owner's name, title, phone, and email from the merchant record:
{ "id": "{saqId}", "merchantId": "{merchantId}", "type": "A", "state": "draft", "version": "4.0.1.r1", "pdfDetails": { "name": "{merchantName}", "legalName": "{merchantLegalName}", "website": "{merchantWebsite}", "contactFirstName": "{ownerFirstName}", "contactLastName": "{ownerLastName}" } } -
As the merchant answers the questionnaire, save the answers to the draft, using
PATCH /v1/saq/{saqId}. Preczn merges each update into the draft, so you can call it as often as you need:{ "pdfDetails": { "thirdPartyProcessors": [ { "name": "{processorName}", "description": "{processorDescription}" } ], "section2Questionnaire": { "requirementResponses": { "3.1.1": "inPlace", "3.2.1": "inPlace", "8.2.1": "notApplicable", "9.4.1": "inPlace" } }, "appendixC": [ { "requirement": "8.2.1", "reason": "{reason}" } ] } }You can also correct the details that Preczn filled in, such as
name,legalName,website,contactEmail, andmailingAddress. For the values each field accepts, see the Field reference section. -
Optional: Show the merchant a preview before they sign. Download the draft PDF, using
GET /v1/saq/{saqId}/file/draft. The response is the PDF file itself, not JSON. The draft PDF has no signature. -
When the merchant signs, send the signature details, using
POST /v1/saq/sign/{saqId}.signedOncan't be in the future:{ "signedOn": "{signedOnDateTime}", "signedBy": "{signerName}", "signerTitle": "{signerTitle}", "signersIP": "{signerIpAddress}" }Preczn fills in your template, adds the signature, and stores the signed PDF. It sets
expiresOnto 365 days after this request:{ "id": "{saqId}", "merchantId": "{merchantId}", "state": "signed", "creationMethod": "generated", "signedOn": "{signedOnDateTime}", "expiresOn": "{expiresOnDateTime}" } -
Download the signed PDF for your records, using
GET /v1/saq/{saqId}/file/signed. The response is the PDF file itself, not JSON.
After the SAQ is signed, Preczn updates the merchant record and sends a merchant.updated webhook. You can't change a signed SAQ. To record a new one, create a new draft.
Sign or upload each SAQ once
When an SAQ is already signed, or another request is signing it, Preczn returns
409. An SAQ that's no longer a draft can't be updated or signed.
Uploaded SAQs
An uploaded SAQ is one that the merchant signed outside your software, such as in an e-signature tool. Upload the signed PDF so that Preczn tracks it with the merchant's other SAQs.
The following steps record an SAQ signed elsewhere:
-
Create a draft SAQ of type
Afor the merchant, usingPOST /v1/saq, as in the Generated SAQs section. -
Upload the signed PDF as a multipart file named
file, with the signing date in thesignedOnquery parameter, usingPOST /v1/saq/upload/{saqId}?signedOn={signedOnDateTime}. The file must be a PDF of 15 MB or less.
Preczn stores the PDF, sets the state to signed and creationMethod to uploaded, and sets expiresOn to 365 days after the upload. It updates the merchant record and sends a merchant.updated webhook, as it does for a generated SAQ.
Sending an SAQ to Payrix
For a merchant with a Payrix connection, you can send a signed SAQ to the merchant's Payrix account. Preczn sends it only when you ask. Payrix is the only connection that receives SAQs.
Before you send, check the following:
- Payrix is configured as a connection on your platform.
- The merchant's Payrix connection has a Payrix merchant ID.
- The SAQ is
signed. Preczn doesn't send drafts.
The following step sends the SAQ. The response is trimmed to the fields that matter here.
-
Send the SAQ using
POST /v1/saq/{saqId}/connection/Payrix/send. The request has no body. Preczn adds a note to the merchant's Payrix account with the signed PDF attached, then sets the merchant's SAQ type toSAQ-Aand the SAQ date to the signing date. The response adds an entry tosaqTransmissionHistory:{ "id": "{saqId}", "state": "signed", "saqTransmissionHistory": [ { "connection": "Payrix", "connectionId": "{payrixDocumentId}", "sentDate": "{sentDateTime}" } ] }
connectionId holds the ID of the document at Payrix. You can send the same SAQ again, and each send adds an entry.
Listing a merchant's SAQs
List every SAQ for a merchant, drafts and signed, using GET /v1/saq/merchant/{merchantId}. Each page holds up to 10 SAQs. When hasMore is true, request the next page with the lastId query parameter set to the lastId from the response.
To get one SAQ, use GET /v1/saq/{saqId}.
Monitoring expiration
Every merchant record holds its latest signed SAQ and when that SAQ expires, so you can check a merchant without listing its SAQs. GET /v1/merchants/{merchantId} and GET /v1/merchants return these fields. The API doesn't return a status such as "expired". To decide when a merchant must renew, compare the expiration date with the current date, using your own renewal window.
To find the merchants who need to renew, filter GET /v1/merchants by SAQ expiration. For example, saqExpiringWithinDays=90&saqExpired=true returns every merchant whose SAQ expires within 90 days, has expired, or doesn't exist. For each field and filter, see the Merchant SAQ fields and Expiration filters sections.
Test mode
SAQs follow your API key's mode. A test key works only with SAQs and merchants in test mode, and a live key works only with live ones. Each mode has its own SAQ template, so upload a template with each key.
Field reference
The following sections list the SAQ values the API accepts and returns.
Questionnaire responses
section2Questionnaire.requirementResponses maps a requirement ID to the merchant's answer. Preczn marks the matching column on the questionnaire pages.
Preczn accepts the following requirement IDs and rejects any other: 3.1.1, 3.2.1, 8.2.1, 8.2.2, 9.4.1, 9.4.1.1, 9.4.2, 9.4.3, 9.4.4, 9.4.5, and 9.4.6.
Each answer is one of the following values:
| Value | Answer |
|---|---|
inPlace | In Place |
inPlaceWithCCW | In Place with CCW |
notApplicable | Not Applicable |
notInPlace | Not in Place |
Third-party processors and Appendix C
thirdPartyProcessors lists each service provider by name and description. Preczn writes one line for each provider.
appendixC lists each requirement the merchant marked notApplicable, with the reason. It holds up to 16 entries.
Merchant SAQ fields
The merchant record returns the following SAQ fields:
| Field | Holds |
|---|---|
lastSignedSAQExpiresOn | Latest signed SAQ's expiration |
saq.lastSignedSAQ | Latest signed SAQ's ID |
saq.ids | Every SAQ's ID |
Expiration filters
GET /v1/merchants accepts the following SAQ filters. You can combine them with each other and with the endpoint's other filters.
| Parameter | Returns |
|---|---|
saqExpired=true | Expired or no signed SAQ |
saqExpired=false | Signed SAQ not yet expired |
saqExpiringWithinDays={days} | Expires within {days} days |
saqExpiringWithinDays must be a number greater than 0. On its own, it returns only SAQs that haven't expired yet. Add saqExpired=true to also include merchants whose SAQ has expired or who have none.
Updated 10 days ago
