{"componentChunkName":"component---src-templates-redoc-operation-js","path":"/creditcards/tag/Data-definitions/schema/ToastError/","result":{"data":{"contentItem":{"type":"redoc-operation","link":"/creditcards/tag/Data-definitions/schema/ToastError/","data":{"redocStoreStr":"{\"menu\":{\"activeItemIdx\":-1},\"definition\":{\"data\":{\"openapi\":\"3.0.0\",\"info\":{\"title\":\"Credit Cards API\",\"description\":\"A simple, single request, synchronous API to authorize credit card \\ntransactions associated with an orders API order.\\n\",\"version\":\"1.0.0\",\"contact\":{\"name\":\"Toast developer support\"}},\"paths\":{\"/merchants/{merchantUuid}/payments/{paymentUuid}\":{\"put\":{\"operationId\":\"merchantsMerchantUuidPaymentsPaymentUuidPut\",\"summary\":\"Authorize a credit card\",\"description\":\"Authorize a credit card payment. Funds will be held until the\\npayment is voided or captured.\\n\\nYou must submit an orders API request to apply the payment to a\\ncheck within five minutes of authorization, otherwise the\\npayment is automatically voided.\\n\\nPayment must be captured within seven days of authorization,\\notherwise the payment is automatically voided. Capture\\noccurs the evening after the order is fulfilled by the\\nrestaurant.\\n\",\"parameters\":[{\"name\":\"merchantUuid\",\"in\":\"path\",\"description\":\"The Toast GUID of the merchant (restaurant) that will\\nreceive the payment. This is the same value as the\\nToast-Restaurant-External-ID.\\n\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"paymentUuid\",\"in\":\"path\",\"description\":\"The unique identifier (UID) of this authorization,\\ngenerated by the restaurant organization or integration\\npartner.\\n\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"Toast-Restaurant-External-ID\",\"in\":\"header\",\"description\":\"The GUID of the restaurant used as the context of the request.\\n\",\"required\":true,\"schema\":{\"type\":\"string\"}}],\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PaymentAuthorization\"}}},\"description\":\"The authorization request, including encrypted credit card information and payment details.\",\"required\":true},\"responses\":{\"200\":{\"description\":\"The authorization request was processed. See the response for details.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PaymentStatus\"}}}},\"400\":{\"description\":\"The request was not valid. A required field may be missing.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ToastError\"}}}},\"404\":{\"description\":\"The merchant (restaurant) does not exist.\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ToastError\"}}}},\"409\":{\"description\":\"An authorization request was already made for this payment\\nUUID. Verify that you are generating unique payment UUIDs\\nfor each request.  This can also occur if the same request\\nis resubmitted, but the state has since been changed by\\nanother system (for example, voided on the POS).\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ToastError\"}}}},\"422\":{\"description\":\"The request failed validation. The structure is not\\ncorrect. A message with more information is returned if\\nusing the certification environment.\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ToastError\"}}}},\"500\":{\"description\":\"Unexpected error\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ToastError\"}}}}},\"security\":[{\"oauth2\":[\"credit_cards.authorization:write\"]}]}}},\"servers\":[{\"url\":\"https://toast-api-server/ccpartner/v1\"}],\"components\":{\"securitySchemes\":{\"oauth2\":{\"description\":\"Access to Toast APIs, specific endpoints, \\nand specific API endpoint operations is \\ncontrolled by the scopes that are associated \\nwith your API account. \\nA full reference for Toast API scopes and \\ntheir capabilities can be found in the\\n[_Toast Developer Guide_](https://doc.toasttab.com/doc/devguide/apiScopes.html).\\n\",\"type\":\"oauth2\",\"flows\":{\"clientCredentials\":{\"tokenUrl\":\"https://toast-api-server/authentication/v1/authentication/login\",\"scopes\":{\"credit_cards.authorization:write\":\"Allows authorization of payments through the credit cards API.\\n\"}}}}},\"schemas\":{\"ToastError\":{\"description\":\"Contains error details.\",\"type\":\"object\",\"properties\":{\"description\":{\"type\":\"string\",\"description\":\"A human-readable description of the problem.\"},\"detail\":{\"type\":\"string\",\"description\":\"Error details, such as an exception and stack trace.\"}},\"required\":[\"description\"]},\"PaymentStatus\":{\"description\":\"Status of a payment.\",\"type\":\"object\",\"required\":[\"paymentState\"],\"properties\":{\"paymentState\":{\"type\":\"string\",\"enum\":[\"AUTHORIZED\",\"ACKNOWLEDGED\",\"DENIED\"],\"description\":\"The state of the payment. Toast may add values to this field.\\nMake sure that your implementation can handle additional\\nvalues.\\n\"},\"authorizationMetadata\":{\"$ref\":\"#/components/schemas/AuthorizationMetadata\"},\"amount\":{\"description\":\"The amount of this payment, not including tip.\",\"type\":\"object\"},\"tipAmount\":{\"description\":\"The tip amount of this payment.\",\"type\":\"object\"},\"denialReason\":{\"description\":\"The reason a payment was denied. This must be displayed to the consumer.\",\"type\":\"string\"},\"error\":{\"type\":\"string\",\"description\":\"If the payment is in an error state, this will contain the error.\"}}},\"AuthorizationMetadata\":{\"description\":\"Additional details about a payment, typically displayed on a receipt\\nand logged by the partner.\\n\",\"type\":\"object\",\"required\":[\"localTransactionDate\",\"cardBrand\",\"authorizationCode\",\"last4\"],\"properties\":{\"localTransactionDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"A copy of the `localTransactionDate` provided by the partner, in ISO 8601 format.\\n\"},\"cardBrand\":{\"type\":\"string\",\"description\":\"The brand of the credit card. For example, AMEX, Discover, Visa, or Mastercard.\"},\"authorizationCode\":{\"type\":\"string\",\"description\":\"A code generated by card processing networks upon accepting an\\nauthorization request.\\n\"},\"last4\":{\"type\":\"string\",\"description\":\"The final four digits of the credit card number.\\n\"}}},\"PartnerServiceInfo\":{\"required\":[\"instanceId\"],\"description\":\"Information about the client that made the payment request. This\\ninformation can be used for troubleshooting problems.\\n\",\"type\":\"object\",\"properties\":{\"instanceId\":{\"type\":\"string\",\"description\":\"An identifier for the client that made the authorization\\nrequest. For example, this might be a partner service\\ninstance ID that is visible in log messages.\\n\"},\"additionalInfo\":{\"type\":\"string\",\"description\":\"Additional information about the service. For example, this\\nmight be a JSON structure containing the IP address and\\nservice version.\\n\"}}},\"PaymentRequestMetadata\":{\"description\":\"Metadata about the request being made.\",\"type\":\"object\",\"required\":[\"partnerServiceInfo\",\"localTransactionDate\",\"originIPAddr\",\"cardFirst6\",\"cardLast4\",\"billingAddress\",\"guestIdentifier\"],\"properties\":{\"partnerServiceInfo\":{\"$ref\":\"#/components/schemas/PartnerServiceInfo\"},\"localTransactionDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date and time, in ISO 8601 format, when the guest presents their credit card. \\n\"},\"originIPAddr\":{\"type\":\"string\",\"description\":\"The public ipv4 or ipv6 address of the cardholder making the payment. The origin IP address is essential for detecting and preventing fraud attempts in credit card authorization requests. To prevent disruption to your transaction workflow, ensure the correct origin IP address is used.\"},\"cardFirst6\":{\"type\":\"string\",\"description\":\"The first six digits of the credit card number. The first six\\ndigits are the bank identification number (BIN) for the card.\\nMust exactly match that provided in the encrypted card data.\\n\"},\"cardLast4\":{\"type\":\"string\",\"description\":\"The last four digits of the credit card number. Must exactly\\nmatch that provided in the encrypted card data.\\n\"},\"billingAddress\":{\"$ref\":\"#/components/schemas/BillingAddress\"},\"deliveryAddress\":{\"$ref\":\"#/components/schemas/DeliveryAddress\"},\"userAgent\":{\"type\":\"string\",\"description\":\"For payments taken through a browser, the browser's user agent string.\\n\"},\"guestIdentifier\":{\"type\":\"string\",\"description\":\"An identifier for the guest making the payment such as\\nan email address or phone number. Must consist of the following characters:\\n`a-z, A-Z, 0-9, =, ., -, _, +, @, :, &, ^, %, !, $`\\n\"},\"guestEmail\":{\"type\":\"string\",\"description\":\"The email address of the guest placing the payment.\\n\"},\"appName\":{\"type\":\"string\",\"description\":\"A company-specific name for the mobile app (if any) the payment is made through.\\nFor instance, use 'MyCompany Android App' instead of 'Android App'\\n\"},\"appVersion\":{\"type\":\"string\",\"description\":\"The version of the mobile app (if any) the payment is made through.\\nYou can use any string to represent the app version. There are no\\nformat or content requirements.\\n\"}}},\"PaymentAuthorization\":{\"description\":\"A request to authorize a credit card payment.\",\"type\":\"object\",\"required\":[\"cardNumberOrigin\",\"willSaveCard\",\"encryptedCardData\",\"amount\",\"tipAmount\",\"requestMetadata\",\"keyId\"],\"properties\":{\"cardNumberOrigin\":{\"type\":\"string\",\"enum\":[\"END_USER\",\"PARTNER_VAULT\"],\"description\":\"The way that the credit card was provided for the payment\\nrequest. The value is `END_USER` if the cardholder entered\\nthe card number (PAN) as part of a web order. The value is\\n`PARTNER_VAULT` if the PAN was retrieved from a vault\\ncontrolled by the integration partner.\\n\\nThis value is used with `willSaveCard` to report information \\nabout stored credit card numbers to credit card provider \\nnetworks. If your organization is using stored credit card \\ninformation for a credit card authorization, this value must \\nbe `PARTNER_VAULT`. The default value is `END_USER`.\\n\"},\"willSaveCard\":{\"type\":\"boolean\",\"description\":\"Indicates whether your organization will save the restaurant \\nguests' credit card information for future use.\\n\\nToast reports information about stored credit card information \\nto some credit card providers. This \\\"card on file\\\" or \\\"stored \\ncredentials\\\" reporting is required by some credit card provider \\nnetworks. These networks may impose fees for non-compliance \\nwith \\\"card on file\\\" reporting requirements.\\n\\nNote that integration partners are responsible for any and \\nall fees incurred, and must comply with all applicable law \\nand rules relevant to, \\\"card on file\\\" consent, storage, use \\nand reporting requirements in accordance with card brand \\nregulations and the integration partner agreement.\\n\"},\"encryptedCardData\":{\"type\":\"object\",\"description\":\"A base64-encoded version of the encrypted card data payload.\\nFor information about encrypting and encoding credit card\\ninformation, see the <cite>Toast API Developer's\\nGuide</cite>.\\n\"},\"amount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The check price that should be charged to the credit card,\\nnot including the tip. For example, the value `10.00`\\nrepresents ten USD and zero cents. The `amount` must not be\\nnegative. The total of the `amount` value and the `tipAmount`\\nvalue must be greater than zero.\\n\"},\"keyId\":{\"type\":\"string\",\"description\":\"The identifier of the encryption key and algorithm used \\nto encrypt the credit card data. Toast integration support \\nprovides this identifier along with the encryption key \\nitself. If you received an encryption key before June 2018,\\nyou may omit this field. For all API users, supplying a\\nkeyId value prevents downtime during key rotations.\\n\"},\"tipAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The tip that should be charged to the credit card. For\\nexample, the value `1.00` represents one USD and zero cents.\\nThe tip amount must not be negative. The total of the `amount`\\nvalue and the `tipAmount` value must be greater than zero.\\n\"},\"requestMetadata\":{\"$ref\":\"#/components/schemas/PaymentRequestMetadata\"}}},\"BillingAddress\":{\"description\":\"An international billing address including name and phone number.\\nA `BillingAddress` object for a `PaymentRequestMetadata` `billingAddress`\\nvalue must exactly match address information you provide in encrypted\\ncredit card data.\\n\",\"type\":\"object\",\"required\":[\"postalCode\",\"country\"],\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name attached to the billing address. This is not necessarily\\nthe same as the name on the card.\\n\"},\"phone\":{\"type\":\"string\",\"description\":\"The phone number associated with the account in [E.164 format](https://www.itu.int/rec/T-REC-E.164).\\n\"},\"address1\":{\"type\":\"string\",\"description\":\"Line 1 of the address\"},\"address2\":{\"type\":\"string\",\"description\":\"Line 2 of the address\"},\"city\":{\"type\":\"string\",\"description\":\"City of the address\"},\"region\":{\"type\":\"string\",\"description\":\"Region or state of the address\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal or ZIP code. If using a code with an extra four digits,\\nfor example a US ZIP+4 code, do not separate the extra digits.\\nFor example, `123451234`.\\n\"},\"country\":{\"type\":\"string\",\"description\":\"Country code using the ISO 3166-1 alpha-3 standard\"}}},\"DeliveryAddress\":{\"description\":\"A generic international delivery address including name and phone number.\\n\",\"type\":\"object\",\"required\":[\"address1\",\"city\",\"region\",\"postalCode\",\"country\"],\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name associated with the address.\\n\"},\"phone\":{\"type\":\"string\",\"description\":\"The phone number associated with the account in [E.164 format](https://www.itu.int/rec/T-REC-E.164).\\n\"},\"address1\":{\"type\":\"string\",\"description\":\"Line 1 of the address\"},\"address2\":{\"type\":\"string\",\"description\":\"Line 2 of the address\"},\"city\":{\"type\":\"string\",\"description\":\"City of the address\"},\"region\":{\"type\":\"string\",\"description\":\"Region or state of the address\"},\"postalCode\":{\"type\":\"string\",\"description\":\"Postal or ZIP code. If using a code with an extra four digits,\\nfor example a US ZIP+4 code, do not separate the extra digits.\\nFor example, `123451234`.\\n\"},\"country\":{\"type\":\"string\",\"description\":\"Country code using the ISO 3166-1 alpha-3 standard\"}}}}}}},\"options\":{\"hideTryItPanel\":true,\"pagination\":\"item\",\"generateCodeSamples\":{\"languages\":[{\"lang\":\"curl\"},{\"lang\":\"Java\"},{\"lang\":\"Python\"},{\"lang\":\"Node.js\"},{\"lang\":\"C#\"}]},\"showConsole\":false,\"hideHostname\":true,\"hideDownloadButton\":false,\"sortPropsAlphabetically\":true,\"schemaDefinitionsTagName\":\"Data definitions\",\"showAccessMode\":true,\"downloadDefinitionUrl\":\"https://doc.toasttab.com/toast-api-specifications/toast-ccpartner-api.yaml\",\"disableSearch\":true,\"ctrlFHijack\":false,\"disableSidebar\":true,\"theme\":{\"overrides\":{\"DownloadButton\":{\"custom\":\"\"},\"NextSectionButton\":{\"custom\":\"\"}},\"codeBlock\":{\"tokens\":{}},\"schema\":{\"constraints\":{},\"examples\":{}},\"rightPanel\":{\"textColor\":\"#eeeeee\"},\"typography\":{\"heading1\":{},\"heading2\":{},\"heading3\":{},\"rightPanelHeading\":{}}}}}","redocHasSecurityDefinitions":false,"redocInfoPageLink":"/creditcards/overview/","redocItemId":"tag/Data-definitions/schema/ToastError","redocHasInfoPage":false,"settings":{"generateCodeSamples":{"languages":[{"lang":"curl"},{"lang":"Java"},{"lang":"Python"},{"lang":"Node.js"},{"lang":"C#"}]},"showConsole":false,"hideHostname":true,"hideDownloadButton":false,"sortPropsAlphabetically":true,"schemaDefinitionsTagName":"Data definitions","hideTryItPanel":true,"showAccessMode":true,"downloadDefinitionUrl":"https://doc.toasttab.com/toast-api-specifications/toast-ccpartner-api.yaml"},"requestLogin":false,"lastModified":"2024-09-05T12:56:37.000Z"},"seo":{"title":"ToastError"}}},"pageContext":{"id":"509e1611-d1cf-5ec9-9c46-6bb752352549tag/Data-definitions/schema/ToastError/__redocly content/creditcards/tag/Data-definitions/schema/ToastError/","seo":{"title":"ToastError","description":"<SchemaDefinition showWriteOnly={true} schemaRef=\"#/components/schemas/ToastError\" />","image":"","keywords":null,"jsonLd":null,"lang":null},"pageId":"creditcards.reference.page.yaml#tag/Data-definitions/schema/ToastError/","pageBaseUrl":"/creditcards","type":"redoc-operation","toc":{"enable":true,"maxDepth":4,"headings":null},"data":{},"catalogInfo":null,"link":"/creditcards/tag/Data-definitions/schema/ToastError/","sidebarName":"api-reference","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":[{"definitionId":"creditCards","id":"creditCards","title":"creditCards","isDefault":true,"apiId":null}],"apiVersionId":null,"isDefaultApiVersion":true}},"staticQueryHashes":["1123603147","1180902673","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3743992808","561138138"]}