# Tokenization

To try a test and directly interact with the API endpoint click "Test It" and use an embedded API client to send requests with custom headers and variables, then see the live response; essentially letting you test this API directly within this page. When testing please use our Demo URL: `https://demo-payments.frontstream.com/api/tokenize`

## POST /api/tokenize

> Tokenize a credit card

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/tokenize":{"post":{"tags":["Tokenization"],"summary":"Tokenize a credit card","description":"","parameters":[{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/GetTokenRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/GetTokenRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetTokenRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/GetTokenRequest"}}}},"responses":{"201":{"description":"Returns the newly created token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTokenResponse"}}}},"400":{"description":"If it fails to create a token","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}}}}}},"components":{"schemas":{"GetTokenRequest":{"required":["CardNum","City","Country","Email","ExpMonth","ExpYear","NameOnCard","Street"],"type":"object","properties":{"ProcessorGuid":{"type":"string","description":"optional for Non-Profit transactions like donations but required if For-Profit API Partner - Identifies Processor being used by an API Partner","nullable":true},"CharityId":{"type":"string","description":"optional - Valid CharityId from Charity Search","nullable":true},"OrganizationGuid":{"type":"string","description":"internal use - Valid Panorama Organization Guid","nullable":true},"IntegrationSource":{"type":"string","description":"internal use","nullable":true},"CardNum":{"maxLength":30,"type":"string","description":"Valid Credit card number"},"CardType":{"maxLength":20,"type":"string","description":"optional (max: 20) - \"American Express\", \"Mastercard\", \"Visa\", \"Discover\", \"Diners Club\" - will be set internally based on cardNum","nullable":true},"ExpMonth":{"maxLength":2,"minLength":2,"type":"string","description":"example: \"01\" for January - required"},"ExpYear":{"maxLength":2,"minLength":2,"type":"string","description":"example: \"29\" for 2029 - required"},"CVNum":{"maxLength":4,"type":"string","description":"optional (max: 4) - valid CVV - please provide for CVV checks","nullable":true},"NameOnCard":{"maxLength":25,"type":"string","description":"required - Name on Card"},"Email":{"maxLength":100,"type":"string","description":"required - valid contact email","format":"email"},"Zip":{"maxLength":10,"type":"string","description":"optional (max: 10) - please provide for best interchange and avs checks - US, CA, AU formats are validated (example formats - US: 12345 or 12345-1234, CA: A1A 1A1, AU: 3000","nullable":true},"Street":{"maxLength":50,"type":"string","description":"required - please provide for best interchange and avs checks"},"City":{"maxLength":50,"type":"string","description":"required - please provide for best interchange and avs checks"},"State":{"maxLength":50,"type":"string","description":"optional - 2 char US state code, 3 char may be used for other non-US","nullable":true},"Country":{"maxLength":2,"type":"string","description":"required - 2 char country code"},"Currency":{"maxLength":3,"type":"string","description":"optional - 3 char currency code - Example for US - \"USD\", for CA - \"CAD\"","nullable":true},"ExternalConstituentId":{"maxLength":200,"type":"string","description":"optional (max: 200) - ConstituentId per Product","nullable":true},"FirstName":{"maxLength":50,"type":"string","description":"optional (max: 50) - billing First Name","nullable":true},"LastName":{"maxLength":50,"type":"string","description":"optional (max: 50) - billing Last Name","nullable":true},"IpAddress":{"maxLength":40,"type":"string","description":"client ip address (max: 40) where transaction originates","nullable":true}},"additionalProperties":false,"description":""},"GetTokenResponse":{"type":"object","properties":{"Successful":{"type":"boolean","description":"This is \"true\" tokenization process was successful, and \"false\" if unsuccessful."},"Message":{"type":"string","description":"Get Token response message","nullable":true},"ProcessorMessage":{"type":"string","description":"Get Token Processor response message","nullable":true},"TransactionId":{"type":"string","description":"Not currently used and may be null","nullable":true},"TokenGuid":{"type":"string","description":"The unique GUID associated with the credit card or bank token you created that is used with the api/paymentToken endpoint","format":"uuid"},"ExternalCardToken":{"type":"string","description":"ExternalCardToken if available to return - represents 3rd party gateway card token","nullable":true},"ExternalCheckToken":{"type":"string","description":"ExternalCheckToken if available to return - represents 3rd party gateway check token","nullable":true},"ExternalCustomerId":{"type":"string","description":"ExternalCustomerId if available to return - represents 3rd party gateway customer id tied to gateway token","nullable":true},"ResponseCode":{"type":"string","description":"Response Code - Successful = \"OK\" or \"0\", any other response code unsuccessful","nullable":true}},"additionalProperties":false,"description":""},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

### Tokenize bank data

## POST /api/tokenizeAch

> Tokenize ACH/check account

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/tokenizeAch":{"post":{"tags":["Tokenization"],"summary":"Tokenize ACH/check account","description":"","parameters":[{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/GetTokenAchRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/GetTokenAchRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/GetTokenAchRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/GetTokenAchRequest"}}}},"responses":{"201":{"description":"Returns the newly created token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTokenResponse"}}}},"400":{"description":"If it fails to create a token","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}}}}}},"components":{"schemas":{"GetTokenAchRequest":{"required":["CheckAccountNumber","CheckAccountTypeId","CheckRoutingNumber","CheckTypeId","City","Country","Email","NameOnCheck","Street"],"type":"object","properties":{"ProcessorGuid":{"type":"string","description":"optional for Non-Profit transactions like donations but required if For-Profit API Partner - Identifies Processor being used by an API Partner","nullable":true},"CharityId":{"type":"string","description":"optional - Valid CharityId Guid from Charity Search","nullable":true},"OrganizationGuid":{"type":"string","description":"internal use - Valid Panorama Organization Guid","nullable":true},"IntegrationSource":{"type":"string","description":"internal use - Identifies integrated Product","nullable":true},"CheckRoutingNumber":{"maxLength":9,"type":"string","description":"required - Valid Check Bank Routing Number - formats -\r\nUS: Enter 9-digits,\r\nCA: Enter 9-digits (Format: 0YYYXXXXX: A mandatory leading zero. YYY: The 3-digit institution number. XXXXX: The 5-digit transit number),\r\nAU: Enter 6-digits - BSB Number (Bank State Branch) without hyphen"},"CheckAccountNumber":{"maxLength":20,"type":"string","description":"required - Valid Check Account Number - formats -\r\nUS: Enter 8-12 digits,\r\nCA: Enter 7-12 digits,\r\nAU: Enter 3-9 digits"},"CheckNumber":{"maxLength":10,"type":"string","description":"optional (max: 10) - Valid Check Number","nullable":true},"CheckAccountTypeId":{"type":"string","description":"required for Check ACH transactions - possible values -\r\n        1 - Checking,\r\n        2 - Saving"},"CheckTypeId":{"type":"string","description":"required for Check ACH transactions - possible values -\r\n        1 - Personal,\r\n        2 - Corporate,\r\n        3 - Government"},"NameOnCheck":{"maxLength":25,"type":"string","description":"required - Name on ACH Check Account"},"Email":{"maxLength":100,"type":"string","description":"required - valid contact email","format":"email"},"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","nullable":true},"Street":{"maxLength":50,"type":"string","description":"optional (max: 50) - billing street"},"City":{"maxLength":50,"type":"string","description":"optional (max: 50) - billing city"},"State":{"maxLength":50,"type":"string","description":"optional - 2 char US state code, 3 char may be used for other non-US","nullable":true},"Country":{"maxLength":2,"type":"string","description":"optional - 2 char country code"},"Currency":{"maxLength":3,"type":"string","description":"optional - 3 char currency code - Example for US - \"USD\", for CA - \"CAD\"","nullable":true},"ExternalConstituentId":{"maxLength":200,"type":"string","description":"optional (max: 200) - ConstituentId per Product","nullable":true},"FirstName":{"maxLength":50,"type":"string","description":"optional (max: 50) - billing First Name","nullable":true},"LastName":{"maxLength":50,"type":"string","description":"optional (max: 50) - billing Last Name","nullable":true},"IpAddress":{"maxLength":40,"type":"string","description":"client ip address (max: 40) where transaction originates","nullable":true}},"additionalProperties":false},"GetTokenResponse":{"type":"object","properties":{"Successful":{"type":"boolean","description":"This is \"true\" tokenization process was successful, and \"false\" if unsuccessful."},"Message":{"type":"string","description":"Get Token response message","nullable":true},"ProcessorMessage":{"type":"string","description":"Get Token Processor response message","nullable":true},"TransactionId":{"type":"string","description":"Not currently used and may be null","nullable":true},"TokenGuid":{"type":"string","description":"The unique GUID associated with the credit card or bank token you created that is used with the api/paymentToken endpoint","format":"uuid"},"ExternalCardToken":{"type":"string","description":"ExternalCardToken if available to return - represents 3rd party gateway card token","nullable":true},"ExternalCheckToken":{"type":"string","description":"ExternalCheckToken if available to return - represents 3rd party gateway check token","nullable":true},"ExternalCustomerId":{"type":"string","description":"ExternalCustomerId if available to return - represents 3rd party gateway customer id tied to gateway token","nullable":true},"ResponseCode":{"type":"string","description":"Response Code - Successful = \"OK\" or \"0\", any other response code unsuccessful","nullable":true}},"additionalProperties":false,"description":""},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

### Process a Payment using newly created token

## Make a payment by credit card or ACH check token

> &#x20;   Request example:> \
> &#x20;   POST /api/paymentToken> \
> &#x9;{> \
> &#x20;		"ProcessorGuid": "12345678-9012-3456-7890-dc84772c0032",> \
> &#x20;       "TokenGuid": "87654321-9012-3456-7890-123456789012",> \
> &#x20;       "Transactions":> \
> &#x20;       \[> \
> &#x20;           {> \
> &#x20;               "TransactionSourceGroupId": "12",> \
> &#x20;               "Amount": "1.00",                      &#x20;> \
> &#x20;           }> \
> &#x20;       ]> \
> &#x9;}

```json
{"openapi":"3.0.1","info":{"title":"The Payment API","version":"v1"},"paths":{"/api/paymentToken":{"post":{"tags":["Payments"],"summary":"Make a payment by credit card or ACH check token","description":"    Request example:\r\n    POST /api/paymentToken\r\n\t{\r\n \t\t\"ProcessorGuid\": \"12345678-9012-3456-7890-dc84772c0032\",\r\n        \"TokenGuid\": \"87654321-9012-3456-7890-123456789012\",\r\n        \"Transactions\":\r\n        [\r\n            {\r\n                \"TransactionSourceGroupId\": \"12\",\r\n                \"Amount\": \"1.00\",                       \r\n            }\r\n        ]\r\n\t}","parameters":[{"name":"AccessToken","in":"header","description":"access token","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/PaymentTokenRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTokenRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaymentTokenRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/PaymentTokenRequest"}}}},"responses":{"201":{"description":"Returns the newly created payment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"400":{"description":"If it fails to create a payment","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrokenRule"}}}}}}}}},"components":{"schemas":{"PaymentTokenRequest":{"required":["Transactions"],"type":"object","properties":{"ProcessorGuid":{"type":"string","description":"optional for Non-Profit transactions like donations but required if For-Profit API Partner - Identifies Processor being used by an API Partner","nullable":true},"CharityId":{"type":"string","description":"optional - Valid CharityId Guid from Charity Search","nullable":true},"OrganizationGuid":{"type":"string","description":"internal use - Valid Panorama Organization Guid","nullable":true},"IntegrationSource":{"type":"string","description":"internal use - Identifies integrated Product","nullable":true},"TokenGuid":{"type":"string","description":"optional if using ExternalCardToken or ExternalCheckToken instead of TokenGuid - Valid Token Guid from a Tokenized card through Payment API","nullable":true},"ExternalCardToken":{"maxLength":200,"type":"string","description":"internal use","nullable":true},"ExternalCheckToken":{"maxLength":200,"type":"string","description":"internal use","nullable":true},"TranId":{"maxLength":100,"type":"string","description":"optional (max: 100) - system unique id for Dup Checking per Integration Source transaction (where integration source has DupCheckEnabled) that will be checked against successfully processed prior TranIds for Duplicates","nullable":true},"EpfSessionId":{"type":"string","description":"internal use - FrontStream unique Embedded Payment Form Session Id if available","nullable":true},"BillingDescriptor":{"maxLength":22,"type":"string","description":"optional (max: 22) - descriptor to show on bank statement","nullable":true},"IpAddress":{"maxLength":40,"type":"string","description":"client ip address (max: 40) where transaction originates","nullable":true},"ShippingFee":{"maxLength":7,"type":"string","description":"optional (max: 7) - fee for shipping that will be added to the total amount","nullable":true},"TaxableBenefit":{"maxLength":7,"type":"string","description":"optional (max: 7) - If part of the donation being passed in is taxable, include that amount here. No calculations are performed using this value, it is simply a placeholder to be used for your own reporting; all commission and credit card fees still apply as normal.","nullable":true},"Transactions":{"type":"array","items":{"$ref":"#/components/schemas/PaymentTransTypeRequest"},"description":"required - 1 to n transactions to break down transaction line items"},"Zip":{"maxLength":10,"type":"string","description":"optional (max: 10) to override zip created during token creation - US, CA, AU formats are validated (example formats - US: 12345 or 12345-1234, CA: A1A 1A1, AU: 3000","nullable":true},"Street":{"maxLength":50,"type":"string","description":"optional (max: 50) to override street created during token creation","nullable":true},"City":{"maxLength":50,"type":"string","description":"optional (max: 50) to override city created during token creation","nullable":true},"State":{"maxLength":50,"type":"string","description":"optional (max: 50) to override state created during token creation","nullable":true},"Country":{"maxLength":2,"type":"string","description":"optional (max: 2) to override country created during token creation","nullable":true},"Currency":{"maxLength":3,"type":"string","description":"optional (max: 3) to override currency created during token creation","nullable":true},"ExternalConstituentId":{"maxLength":200,"type":"string","description":"optional (max: 200) - Donor Identifier per Product","nullable":true},"ExternalEventId":{"maxLength":10,"type":"string","description":"optional (max: 10) - Event Identifier per Product","nullable":true},"ExternalEventGuid":{"type":"string","description":"optional - Event Guid per Product","nullable":true},"ExternalEventName":{"maxLength":500,"type":"string","description":"optional (max: 500) - Event Name per Product","nullable":true},"AFShieldAdditional":{"$ref":"#/components/schemas/AFShieldPaymentRequest"},"Surcharge":{"maxLength":7,"type":"string","description":"optional (max: 7) - calculated surcharge amount","nullable":true}},"additionalProperties":false,"description":""},"PaymentTransTypeRequest":{"required":["Amount","TransactionSourceGroupId"],"type":"object","properties":{"TransactionSourceGroupId":{"type":"string","description":"required - For Direct Merchant (For Profit) Api Partners should set to PaymentNoFee (12), other values are for Non Profit transactions - possible values -\r\n        1 - Donation Fee,\r\n        2 - Peer-to-Peer Fee,\r\n        3 - Auction Performance Fee,\r\n        4 - Ticket Fee,\r\n        5 - Registration Fee,\r\n        6 - Quick Sales Fee,\r\n        7 - Online Store Fee,\r\n        8 - Campaign Fee,\r\n        9 - 0% Auction Performance Fee,\r\n        10 - ApiPartnerFee,\r\n        11 - ExpressPayrollFee;\r\n        12 - PaymentNoFee;\r\n        13 - EventDonationFee;\r\n        14 - SponsorshipFee\r\n        15 - MembershipFee"},"Amount":{"maxLength":7,"type":"string","description":"required - Amount of line item without the fees included, Payment api will calculate fees for you"},"PayFee":{"type":"boolean","description":"optional - cover the fees flag for the transaction. Indicates if the donor intends to cover the processing fees for the donation (primary used for Non Profit transactions like a donation)"},"CommissionRateOverride":{"maxLength":7,"type":"string","description":"optional (max: 7) - The percentage value that you want to set for your commission on the transaction. Minimum value that will be used is the FrontStream Commission Rate as set in your contract, maximum value is the maximum commission rate set in your contract. Passing values outside of the min/max range will not result in a validation error, but will instead default to the min/max value (i.e. if your maximum commission rate in your contract is 10%, and you pass \"15.0\" for this value, the Payment API will simply use 10%). Not including this field or passing null also defaults to using the maximum commission rate from your contract.","nullable":true},"CardProcessingFeeOverride":{"maxLength":7,"type":"string","description":"optional (max: 7) - Overrides the default percentage processing fee","nullable":true},"ExternalLineId":{"maxLength":100,"type":"string","description":"optional (max: 100) - use this to track individual line item IDs if necessary.","nullable":true},"Tip":{"maxLength":7,"type":"string","description":"optional (max: 7) - An amount taken up front for the API Partner if Donor decides to apply a tip. Added to the total amount to charge on the donor’s card . Card fee calculations are performed using this value; all commission and credit card fees still apply as normal.","nullable":true},"Tax":{"maxLength":7,"type":"string","description":"optional (max: 7) - A tax amount taken up front. Added to the total amount to charge on the donor’s card. Card fee calculations are performed using this value; all commission and credit card fees still apply as normal.","nullable":true}},"additionalProperties":false,"description":""},"AFShieldPaymentRequest":{"type":"object","properties":{"ProductDescription":{"maxLength":256,"type":"string","nullable":true},"ProductItem":{"maxLength":256,"type":"string","nullable":true},"ProductType":{"maxLength":256,"type":"string","nullable":true},"ProductQuantity":{"maxLength":3,"type":"string","nullable":true},"SessionId":{"maxLength":32,"type":"string","nullable":true},"BillToPhoneNumber":{"maxLength":32,"type":"string","nullable":true},"ShippingAddressStreet1":{"maxLength":256,"type":"string","nullable":true},"ShippingAddressStreet2":{"maxLength":256,"type":"string","nullable":true},"ShippingAddressCountry":{"maxLength":2,"type":"string","nullable":true},"ShippingAddressCity":{"maxLength":256,"type":"string","nullable":true},"ShippingAddressEmail":{"maxLength":64,"type":"string","format":"email","nullable":true},"ShippingAddressName":{"maxLength":64,"type":"string","nullable":true},"ShippingAddressZip":{"maxLength":10,"type":"string","nullable":true},"ShippingAddressState":{"maxLength":50,"type":"string","nullable":true},"ShipToPhoneNumber":{"maxLength":32,"type":"string","nullable":true},"ShipToPremiseForUK":{"maxLength":256,"type":"string","nullable":true},"ShipToStreetForUK":{"maxLength":256,"type":"string","nullable":true},"BillToPremiseForUK":{"maxLength":256,"type":"string","nullable":true},"BillToStreetForUK":{"maxLength":256,"type":"string","nullable":true}},"additionalProperties":false,"description":""},"PaymentResponse":{"type":"object","properties":{"Successful":{"type":"boolean","description":"As one would guess, this is \"true\" if the transaction was processed successfully, and \"false\" if the transaction was not processed successfully."},"Message":{"type":"string","description":"Payment Gateway response message","nullable":true},"ProcessorMessage":{"type":"string","description":"Response from the processing bank.","nullable":true},"AuthCode":{"type":"string","description":"AuthCode from the processor.","nullable":true},"TransactionId":{"type":"string","description":"Payment Gateway TransactionId","nullable":true},"PaymentGuid":{"type":"string","description":"Payment API Payment GUID","format":"uuid"},"PaymentId":{"type":"integer","description":"Payment API Payment Id","format":"int32"},"ResponseCode":{"type":"string","description":"Response Code - Approved = 0, Not processed = -100 with more possible values - https://developers.frontstream.com/argofire/full-endpoint-reference-and-tools/general-info-and-utilities#argofire-response-codes","nullable":true},"PaymentResult":{"$ref":"#/components/schemas/PaymentResult"},"ProcessStatus":{"$ref":"#/components/schemas/ProcessStatus"},"TotalAmount":{"type":"number","description":"The total amount processed toward the cardholder's account.","format":"double"},"TotalSurcharge":{"type":"number","description":"The total surcharge amount if available.","format":"double","nullable":true},"AVSStreetStatus":{"type":"string","description":"Address Verification Street Status if available.","nullable":true},"AVSZipStatus":{"type":"string","description":"Address Verification Zip Status if available.","nullable":true},"AVSResponse":{"type":"string","description":"Address Verification Response if available. AVS and CVV response values covered more here - https://developers.frontstream.com/argofire/full-endpoint-reference-and-tools/general-info-and-utilities#argofire-response-codes","nullable":true},"CVVResponse":{"type":"string","description":"Card Verification Response if available. AVS and CVV response values covered more here - https://developers.frontstream.com/argofire/full-endpoint-reference-and-tools/general-info-and-utilities#argofire-response-codes","nullable":true},"ExternalCardToken":{"type":"string","description":"ExternalCardToken if available to return - represents 3rd party gateway card token","nullable":true},"ExternalCheckToken":{"type":"string","description":"ExternalCheckToken if available to return - represents 3rd party gateway check token","nullable":true},"ExternalCustomerId":{"type":"string","description":"ExternalCustomerId if available to return - represents 3rd party gateway customer id tied to gateway token","nullable":true},"TokenGuid":{"type":"string","description":"Payment API Token GUID if available to return","format":"uuid","nullable":true},"TransactionFees":{"type":"array","items":{"$ref":"#/components/schemas/FeeResponse"},"description":"Fee Response","nullable":true},"OrganizationGuid":{"type":"string","description":"internal use","format":"uuid"},"ProcessorGuid":{"type":"string","description":"ProcessorGuid used","format":"uuid","nullable":true},"FirstName":{"type":"string","nullable":true},"LastName":{"type":"string","nullable":true},"EmailAddress":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"AddressLine1":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"ProvinceCode":{"type":"string","nullable":true},"CountryCode":{"type":"string","nullable":true},"CardNum":{"type":"string","description":"last 4 digits of card","nullable":true},"CardType":{"type":"string","description":"possible values if available: American Express, Mastercard, Visa, Discover, Diners Club, Undefined","nullable":true},"ExpMonth":{"type":"string","nullable":true},"ExpYear":{"type":"string","nullable":true},"Currency":{"type":"string","nullable":true},"PaymentMethodTypeId":{"type":"integer","description":"possible values if available:\r\nNone = 0,\r\nAmericanExpress = 1,\r\nMasterCard = 2,\r\nVisa = 3,\r\nDiscover = 4,\r\nDinersClub = 5,\r\nACH = 7,\r\nGOOGLEPAY = 8,\r\nAPPLEPAY = 9","format":"int32","nullable":true},"IsSurchargeEligible":{"type":"boolean","description":"Was card used Surcharge eligible","nullable":true},"CheckAccountNum":{"type":"string","description":"last 4 digits of check account","nullable":true},"TranId":{"type":"string","description":"unique tran id per Integration Source if available","nullable":true},"EpfSessionId":{"type":"string","description":"FrontStream unique Embedded Payment Form Session Id if available","nullable":true},"PaymentDate":{"type":"string","description":"Payment Date of transaction","format":"date-time"}},"additionalProperties":false,"description":"See more response code definitions here: https://developers.frontstream.com/welcome-to-our-payment-api/api-references/test-payment-api-features/response-codes"},"PaymentResult":{"enum":[1,2,3,4,5,6],"type":"integer","format":"int32"},"ProcessStatus":{"enum":[1,2,3,4,5,6,7,8,9,10,11,12],"type":"integer","format":"int32"},"FeeResponse":{"type":"object","properties":{"TransactionSourceGroupId":{"type":"string","nullable":true},"PaymentAmount":{"type":"number","description":"This is the amount charged to the donor. Will be equal to the sum of the Amount parameters if payFee=false, but if payFee=true, then this will be the amount that will be charged to the donor in order to have the net post-disbursement donation be equal to the Amount parameters.","format":"double","nullable":true},"CardFeeRate":{"type":"number","description":"example 2.5% - applied to EVERY donation. This is the FrontStream card processing fee. The percentage of the PaymentAmount that will be taken for credit card fees. Expressed as a human-readable percentage rather than a decimal value, it is intended to be able to be displayed directly on a page without needing to be converted.","format":"double","nullable":true},"CardFeeAmount":{"type":"number","description":"This is the amount that is owed to the gateway for the example 2.5% that FrontStream collects from the transaction.\r\n 2.5% of transaction amount if donor is not paying the fee, otherwise 2.5% of the transaction + card fee.","format":"double","nullable":true},"CardTypeFeeAmount":{"type":"number","description":"A per transaction fee configured by card type (VI, MC, DI, AMEX, etc.) per API Partner's Contract other wise 0 (zero)","format":"double","nullable":true},"TotalCommissionRate":{"type":"number","description":"The Total percentage of Commissions that FrontStream takes from a given transaction.\r\nThis rate = Partner CommissionRate + FS CommissionRate","format":"double","nullable":true},"TotalCommissionAmount":{"type":"number","description":"The product of the transaction times the Total commission rate.","format":"double","nullable":true},"PartnerCommissionRate":{"type":"number","description":"The Partner Commission percentage taken on behalf of the Partner from a given transaction.","format":"double","nullable":true},"PartnerCommissionAmount":{"type":"number","description":"The product of the transaction times the Partner commission rate.","format":"double","nullable":true},"FsCommissionRate":{"type":"number","description":"The FrontStream Commission percentage that FrontStream takes from a given transaction.","format":"double","nullable":true},"FsCommissionAmount":{"type":"number","description":"The product of the transaction times the FrontStream commission rate.","format":"double","nullable":true},"TotalFees":{"type":"number","description":"The sum of all fees applied to a transaction amount. (TotalCommission + CardFee + FlatFee + CardFeeOnFee)","format":"double","nullable":true},"MaxOverridePartnerCommissionRate":{"type":"number","description":"The derived minimum partner override rate and maximum partner override rate\r\n\r\nMaxOverridePartnerCommissionRate = TotalFees = (PartnerCommission rate) + (Card Fee Rate) + (Fs Commission Rate)\r\nMinOverridePartnerCommissionRate = (Card Fee rate) + (Fs Commission rate)","format":"double"},"MinOverridePartnerCommissionRate":{"type":"number","format":"double"},"PerTransFee":{"type":"number","description":"The flat amount that will be taken from the PaymentAmount for any Per-Transaction Fees as configured in your contract.","format":"double","nullable":true},"Tip":{"type":"number","description":"The flat amount that will be paid out to the API Partner if Donor decides to add a tip regardless of payFee true or false.","format":"double"},"CardFeeOnFeeAmount":{"type":"number","format":"double","nullable":true},"Tax":{"type":"number","format":"double","nullable":true}},"additionalProperties":false,"description":""},"BrokenRule":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32"},"Message":{"type":"string","nullable":true},"LoggerMessage":{"type":"string","nullable":true}},"additionalProperties":false}}}}
```

### Tokenize Example

Take a look at how you might call this method:

{% tabs %}
{% tab title="C#" %}

```
// Some code
```

{% endtab %}

{% tab title="Postman" %}

{% endtab %}
{% endtabs %}


---

# 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/tokenization.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.
