# Pay Links

## POST /api/paylink

> Returns a pay link - a unique URL that when clicked, directs users to our FrontStream secure online payment page

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/paylink":{"post":{"tags":["Pay Links"],"summary":"Returns a pay link - a unique URL that when clicked, directs users to our FrontStream secure online payment page","description":"","parameters":[{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/PayLinkRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/PayLinkRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/PayLinkRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/PayLinkRequest"}}}},"responses":{"200":{"description":"Returns a pay link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLinkResponse"}}}},"400":{"description":"If pay link creation throws exception","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}},"404":{"description":"If pay link data is not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"PayLinkRequest":{"required":["ApiKey","PaymentLines","RedirectUrl"],"type":"object","properties":{"ApiKey":{"type":"string","description":"required - Your API key for pay link authentication."},"ProcessorGuid":{"type":"string","description":"optional - Identifies Processor being used by an API Partner","nullable":true},"IntegrationSource":{"type":"string","description":"optional and internal use - Identifies integrated Product","nullable":true},"IpAddress":{"maxLength":40,"type":"string","description":"client ip address where transaction originates","nullable":true},"RedirectUrl":{"maxLength":500,"type":"string","description":"required - The URL to which the user will be redirected after payment."},"PaymentLines":{"type":"array","items":{"$ref":"#/components/schemas/PayLinkPaymentLine"},"description":"required - An array of payment line objects specifying amounts and types."},"TranId":{"maxLength":100,"type":"string","description":"optional (max: 100) for API Partner Reference or Invoice number and Dup Checking - unique id per Integration Source transaction (where integration source has DupCheckEnabled) that will be checked against successfully processed prior TranIds for Duplicates","nullable":true},"ShowTransactionId":{"type":"boolean","description":"optional - 'True' will display the TranId on the checkout form. If set 'True' and optional TranId is not set, our form will allow for input to set TranId in form UI","nullable":true},"TransactionIdText":{"maxLength":100,"type":"string","description":"optional (max: 100) - The text to display in front of the TranId. Example: Invoice#:","nullable":true},"PoweredByText":{"maxLength":100,"type":"string","description":"optional (max: 100) - Text to display for branding purposes (e.g., \"Powered by Your Company\").","nullable":true},"PoweredByUrl":{"maxLength":500,"type":"string","description":"optional (max: 500) - The URL users will be directed to when clicking the PoweredByText.","nullable":true},"DonateButtonText":{"maxLength":100,"type":"string","description":"optional (max: 100) - Text displayed on the submit payment button. Default is \"Submit Payment\".","nullable":true},"Language":{"maxLength":35,"type":"string","description":"optional (max: 35) - The language of the pay link session. Default is \"en\" for english.","nullable":true},"DefaultCountryCode":{"maxLength":2,"type":"string","description":"optional - 2 char country code. The default country code for user input. Example: \"US\".","nullable":true},"Theme":{"maxLength":5000,"type":"string","description":"optional (max: 5000) - CSS string for custom styling of the embedded session. Example: \".p-card-title{ color: rgb(255, 255, 255) !important; font-family: Open Sans !important}.EPF__body{ background-color: rgb(0, 0, 0); } .card {background: transparent !important;} .p-card{background: transparent !important;} .surface-card{background: transparent !important;}.p-card-title{ color: rgb(255, 255, 255) !important; font-family: Open Sans !important}.EPF__subheading__text{ color: rgb(255, 255, 255) !important; font-family: Open Sans !important}.EPF__body__text,.p-field-checkbox,.p-steps .p-steps-item .p-steps-title{ color: rgb(255, 255, 255) !important; font-family: Montserrat !important}.p-button-label{color:rgb(19, 5, 5) !important; font-family:Roboto;}.p-button{background-color:rgb(34, 136, 231) !important;border-radius:25px;border-color: transparent !important;}.p-button:hover{background-color:rgb(21, 110, 193) !important;}.p-button-label:hover{color:rgb(44, 30, 30) !important}.gpay-card-info-container{border-radius:25px!important;}.EPF__link__text{ color: rgb(216, 243, 255) !important; font-family: Montserrat !important}.EPF__form-element, .p-dropdown{ border:none !important; -webkit-box-shadow: none; box-shadow:none;  background-color: transparent; border-bottom: 0.055rem solid gray !important; }.p-steps .p-steps-item.p-highlight .p-steps-number{background: rgb(34, 136, 231) !important;}.epf-cc {color: rgb(255, 255, 255);}.epf-cc-selected {color: rgb(34, 136, 231);}.p-button {color: rgb(19, 5, 5) !important;}.EPF__form-element:focus{color: #495057; -webkit-box-shadow: none !important; box-shadow:none !important; background-color: #FFFFFF !important; border-color: #4A4A4A !important;}.EPF_form-element--error{ -webkit-box-shadow: none !important; box-shadow:none !important;  background-color: #F6CCD1 !important; border-color: #DC143C !important;}.EPF_form-element--error:focus{background-color: #F6CCD1 !important;}.has-error .input-group-addon { background-color: #F6CCD1 !important }.select--error { background: #F6CCD1 }.select--error ~ .fa-angle-down { display:none }.select--error:focus ~ .fa-angle-down { display: inline }.select--error:focus ~ .fa-exclamation-circle { display: none}.select--error:focus { background-color: #F6CCD1 }.exclamation-textArea { padding-top: 3.75rem }.form-field--invalid {border-color: #d0021b !important;}.form-field--invalid .p-dropdown {border-color: #d0021b !important;}.EPF__form-element, .p-dropdown{border-radius: 0 !important; }.EPF_form-element:focus{ -webkit-box-shadow: none !important; box-shadow:none !important;  background-color: transparent !important; border-color: #4A4A4A !important;}.EPF_form-element--error{ -webkit-box-shadow: none !important; box-shadow:none !important;  background-color: transparent !important; border-color: #DC143C !important;}.EPF_form-element--error:focus{background-color: #F6CCD1 !important; }.has-error .form-control{ -webkit-box-shadow: none !important; box-shadow:none !important;  background-color: transparent !important;}.has-error .form-control:focus{ -webkit-box-shadow: none !important; box-shadow:none !important;  background-color: transparent !important;}.EPF__form-element{color: rgb(255, 255, 255); }.p-inputtext{color: rgb(255, 255, 255)}.EPF__form-element::placeholder{color: rgb(255, 255, 255)}\"","nullable":true},"ThemeFonts":{"maxItems":50,"type":"array","items":{"type":"string"},"description":"optional - Array of fonts to be used in the session. example: \"\"Open Sans:400,500,600,700 \",\"Montserrat:400, 700 \",\"Roboto:400, 700 \".","nullable":true},"FirstName":{"maxLength":50,"type":"string","description":"optional (max: 50) - if set, this FirstName will display in payment form","nullable":true},"LastName":{"maxLength":50,"type":"string","description":"optional (max: 50) - if set, this LastName will display in payment form","nullable":true},"Email":{"maxLength":100,"type":"string","description":"option (max: 100) - valid contact email - - if set, this Email will display in payment form","format":"email","nullable":true},"Street":{"maxLength":50,"type":"string","description":"optional (max: 50) - if set, this Street will display in payment form","nullable":true},"City":{"maxLength":50,"type":"string","description":"optional (max: 50) - if set, this City will display in payment form","nullable":true},"Zip":{"maxLength":10,"type":"string","description":"optional (max: 10) - US, CA, AU formats are validated (example formats - US: 12345 or 12345-1234, CA: A1A 1A1, AU: 3000 - if set, this Zip will display in payment form","nullable":true},"State":{"maxLength":50,"type":"string","description":"optional - 2 char US state code, 3 char may be used for other non-US - if set, this State will display in payment form","nullable":true},"Country":{"maxLength":2,"type":"string","description":"optional - 2 char country code - if set, this Country will display in payment form","nullable":true},"Phone":{"maxLength":20,"type":"string","description":"optional (max: 20) - valid North America and AU patterns currently supported: 123-456-7890, (123) 456-7890, 123.456.7890, +12025550123, 1234567890, 0412345678, +61412345678","nullable":true},"TokenizeCard":{"type":"boolean","description":"optional - set to true to tokenize card or check at time of purchase","nullable":true},"TokenGuid":{"type":"string","description":"optional - TokenGuid to use to process transaction in payment form. If using ExternalCardToken or ExternalCheckToken instead of TokenGuid - Valid Token Guid from a Tokenized card through Embedded Payment Form/Payment API","nullable":true},"ExternalCardToken":{"maxLength":200,"type":"string","description":"optional (max: 200) - Customer credit card token generated outside the Embedded Form (e.g. ArgoFire). ExternalCardToken to use to process transaction in payment form.","nullable":true},"ExternalCheckToken":{"maxLength":200,"type":"string","description":"optional (max: 200) - Customer check token generated outside the Embedded Form (e.g. ArgoFire). ExternalCheckToken to use to process transaction in payment form.","nullable":true},"ExternalEventId":{"maxLength":10,"type":"string","description":"optional (max: 10) - Customer Event Id","nullable":true},"ExternalEventName":{"maxLength":500,"type":"string","description":"optional (max: 500) - Customer Event Name","nullable":true}},"additionalProperties":false},"PayLinkPaymentLine":{"required":["Recurring","Type"],"type":"object","properties":{"Amount":{"maxLength":7,"type":"string","description":"optional - transaction amount. If amount is not provided and single payment line, the amount field will be editable for input on form (range $0.01 to $99,999.99)","nullable":true},"Type":{"type":"integer","description":"required - Payment type identifier - possible values -\r\n        1 - Donation Fee,\r\n        3 - Auction Performance Fee,\r\n        4 - Ticket Fee,\r\n        5 - Registration Fee,\r\n        12 - PaymentNoFee;","format":"int32"},"Recurring":{"type":"integer","description":"required - Indicates if the payment is recurring and billing frequency - possible values -\r\n        0 - Not recurring,\r\n        1 - Daily,\r\n        2 - Weekly,\r\n        3 - Bi-Weekly,\r\n        4 - Monthly,\r\n        5 - Bi-Monthly,\r\n        6 - Quarterly,\r\n        7 - Semi-Annually,\r\n        8 - Annually\r\n        9 - Semi-Monthly","format":"int32"},"ExternalLineId":{"maxLength":100,"type":"string","description":"optional (max: 100) - use this to track individual line item IDs if necessary.","nullable":true}},"additionalProperties":false},"PayLinkResponse":{"type":"object","properties":{"PayLinkUrl":{"type":"string","description":"a unique URL that when clicked, direct users to our FrontStream secure online payment page","nullable":true}},"additionalProperties":false},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```

## DELETE /api/paylink

> Delete/Cancel a previous pay link url created from being used again

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/paylink":{"delete":{"tags":["Pay Links"],"summary":"Delete/Cancel a previous pay link url created from being used again","description":"","parameters":[{"name":"PayLinkId","in":"query","description":"required - Valid pay link identifier to be cancelled/deleted - the identifier is the last parameter of the pay link url returned in the original creation process","required":true,"schema":{"type":"string"}},{"name":"IntegrationSource","in":"query","description":"internal use - Identifies integrated Product","schema":{"type":"string"}},{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLinkResponse"}}}},"400":{"description":"Failure","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}}}}}},"components":{"schemas":{"PayLinkResponse":{"type":"object","properties":{"PayLinkUrl":{"type":"string","description":"a unique URL that when clicked, direct users to our FrontStream secure online payment page","nullable":true}},"additionalProperties":false},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.frontstream.com/welcome-to-our-payment-api/api-references/test-payment-api-features/each-api-reference-specifics/pay-links.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
