{"info":{"_postman_id":"cb0b29ec-ad10-4b93-b174-cd890243f765","name":"PayCafe API Production","description":"<html><head></head><body><p>Welcome to the PayCafe API documentation.  If you have any questions about the API, please contact <a href=\"mailto:support@paycafe.com\">support@paycafe.com</a>.</p>\n<p>The PayCafe API is organized around REST.  Our API has resource-oriented endpoint URLs, accepts form-encoded requests, returns JSON-encoded responses, and uses standard HTTPS response codes and authentication.  </p>\n<p>Our API offers endpoints to create customers, request customer data, process payments, and process refunds. If you have a unique case or need additional API support, please contact <a href=\"mailto:support@paycafe.com\">support@paycafe.com</a> </p>\n<h1 id=\"authentication-security\">Authentication / Security</h1>\n<p>A PayCafe API token and SSL certificate are required for all requests.  Please contact PayCafe to request your API token. </p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Authentication / Security","slug":"authentication-security"}],"owner":"8822521","collectionId":"cb0b29ec-ad10-4b93-b174-cd890243f765","publishedId":"SzYbxcLX","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"0090FA"},"publishDate":"2020-04-07T21:18:26.000Z"},"item":[{"name":"Getting Started","item":[{"name":"Accepting Credit Card Data  (QuickStart)","item":[],"id":"8b8d3831-2b59-41ce-b99e-a6d8869c092a","description":"<h2 id=\"overview\">Overview:</h2>\n<p>This guide is meant to get you up and running with a working credit card field on your existing checkout in as few steps as possible. It is absolutely not intended to be a production implementation and may not be compatible with more complicated setups.  </p>\n<blockquote>\n<p>For a more detailed documentation, please <a href=\"https://paycafe.postman.co/collections/8822521-cb0b29ec-ad10-4b93-b174-cd890243f765?version=latest&amp;workspace=5e082e62-292e-409e-a807-104ac9843a99#02bf978f-18a1-4f96-b7e6-fae938ebef12\">click here</a></p>\n</blockquote>\n<p>The following is a high-level overview of this process:</p>\n<ol>\n<li>Customer details (name, address, etc.) are collected as part of your existing checkout form.</li>\n<li>Credit card details are collected through a PayCafe iframe integrated into your existing checkout form.</li>\n<li>Both customer details and credit card details are sent to PayCafe to be saved.</li>\n<li>Once saved, PayCafe returns a customer token and a credit card token to be used when calling the PayCafe API.</li>\n<li>Checkout form is submitted and  payment is processed by calling the PayCafe /charge API.</li>\n</ol>\n\n<h2 id=\"prerequisites\">Prerequisites</h2>\n<h4 id=\"api-tokens\">API tokens</h4>\n<ul>\n<li>merchantPublicToken (<strong>Do not confuse this with your <em>merchantToken</em>)</strong></li>\n</ul>\n<h4 id=\"existing-checkout-form\">Existing Checkout Form</h4>\n<p>This guide will assume that you have an existing checkout form into you wish to integrate PayCafe payment processing into.\nFor this example let's assume a typical  example checkout form :</p>\n<blockquote>\n<p><img src=\"https://paycafe-postman.s3-us-west-2.amazonaws.com/images/checkoutFormOnly2.png\" alt=\"Example Checkout\" /></p>\n</blockquote>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"iframe-integration\">iFrame Integration</h4>\n<p><br /><br /></p>\n<p>Step 1. Add the following JavaScript between the <code>&lt;head&gt;&lt;/head&gt;</code> tags of your checkout page:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>        &lt;script type=\"text/javascript\" src=\"js/jquery-3.4.1.min.js\"&gt;&lt;/script&gt;\n        &lt;script type=\"text/javascript\"&gt;\n              // Error handling for any errors reported by PayCafe\n              function parentError(params){\n                  console.log('parentError function called');\n                  console.log(params);\n                  if(params.error_code === 'invalid_card' || params.error_code === 'invalid_card_num'){\n                              alert('Invalid Card!');\n                  }\n                  if(params.error_code === 'invalid_customer'){\n                              if(params.emailAddress !== false){\n                                          $('#email_address').addClass('invalid');\n                              }\n                              if(params.firstName !== false){\n                                          $('#first_name').addClass('invalid');\n                              }\n                              if(params.lastName !== false){\n                                          $('#last_name').addClass('invalid');\n                              }\n                              if(params.billingAddress.line1 !== false){\n                                          $('#address1').addClass('invalid');\n                              }\n                              if(params.billingAddress.city !== false){\n                                          $('#city').addClass('invalid');\n                              }\n                              if(params.billingAddress.state !== false){\n                                          $('#state').addClass('invalid');\n                              }\n                              if(params.billingAddress.country !== false){\n                                          $('#country').addClass('invalid');\n                              }\n                              if(params.billingAddress.postal_code !== false){\n                                          $('#postal_code').addClass('invalid');\n                              }\n                              if(params.billingAddress.phone_number !== false){\n                                          $('#phone_number').addClass('invalid');\n                              }\n                  }\n                  if(params.error_code === 'invalid_address'){\n                              $('#email_address').addClass('invalid');\n                              $('#first_name').addClass('invalid');\n                              $('#last_name').addClass('invalid');\n                              $('#address1').addClass('invalid');\n                              $('#city').addClass('invalid');\n                              $('#state').addClass('invalid');\n                              $('#country').addClass('invalid');\n                              $('#postal_code').addClass('invalid');\n                              $('#phone_number').addClass('invalid');\n                  }\n              }\n              // Function to collect customer information from the checkout form, send it to the iFrame, and then send it to PayCafe for processing.\n              // UPDATE YOUR FORM VALUES HERE\n              $(document).ready(function(){\n                  $('#purchase').click(function(){\n                              var customerData = {\n                                          'emailAddress' : $('#email_address').val(),\n                                          'firstName' : $('#first_name').val(),\n                                          'lastName' : $('#last_name').val(),\n                                          'billingAddress' : {\n                                          'line1' : $('#address1').val(),\n                                          'line2' : $('#address2').val(),\n                                          'city' : $('#city').val(),\n                                          'state' : $('#state').val(),\n                                          'country' : $('#country').val(),\n                                          'postal_code' : $('#postal_code').val(),\n                                          'phone_number' : $('#phone_number').val()\n                                          }\n                              }\n                              PayCafe.saveData(\n                                          customerData,\n                                          function(tokens){\n                                                      submitForm(tokens);\n                                                      console.log(tokens);\n                                                      console.log('success callback called');\n                                          },\n                                          function(errors){\n                                                      parentError(errors);\n                                                      console.log('fail callback called');\n                                          }\n                              );\n                  });\n              });\n              // Success function - this function is executed when PayCafe returns a successful customer and credit card token.\n              // If you wish to use AJAX or similar method to store the customer and credit card tokens, you would add that function(s) within the \"submitForm\" function\n              function submitForm(params){\n                  //Store customer token function - optional\n                  //Store credit card token function - optional\n                  console.log('submitForm function');\n                  console.log(params);\n                  $('#customerToken').val(params.customerToken);\n                  $('#cardToken').val(params.cardToken);\n                  $('#purchaseForm').submit();\n              }\n              &lt;/script&gt;\n</code></pre><p><br /><br /></p>\n<p>Step 2: Add the following JavaScript where you would like the credit card fields to appear :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>        &lt;script type=\"text/javascript\" src=\"https://api.paycafe.com/static/js/PayCafeV1.js\"&gt;&lt;/script&gt;\n        &lt;script type=\"text/javascript\"&gt;var PayCafe = PayCafeInit('merchantPublicToken', 'api.paycafe.com'); &lt;/script&gt;\n\n    Be sure to replace ***merchantPublicToken*** with your token\n\n    You should now have a credit card field on your checkout page:\n    &gt;\n    &gt;![Example Checkout](https://paycafe-postman.s3-us-west-2.amazonaws.com/images/checkoutFormiframe2.png)\n</code></pre><p><br /><br /></p>\n<p>Step 3: Modify the values in the function immediately following '<strong>// UPDATE YOUR FORM VALUES HERE</strong>' to match the values of the 'id' of all required fields from your form:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>        // UPDATE YOUR FORM VALUES HERE\n        $(document).ready(function(){\n          $('#purchase').click(function(){\n            var customerData = {\n        'emailAddress' : $('#email_address').val(),\n        'firstName' : $('#first_name').val(),\n        'lastName' : $('#last_name').val(),\n        'billingAddress' : {\n          'line1' : $('#address1').val(),\n          'line2' : $('#address2').val(),\n          'city' : $('#city').val(),\n          'state' : $('#state').val(),\n          'country' : $('#country').val(),\n          'postal_code' : $('#postal_code').val(),\n          'phone_number' : $('#phone_number').val()\n        }\n        }\n</code></pre><p><br /><br /></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Ex. Lets say your email address field is\n\n\n    ```&lt;div class=\"input-field col s6\"&gt;\n      &lt;input placeholder=\"\" id=\"email\" name=\"email_address\" type=\"text\" class=\"validate\"&gt;\n     &lt;label for=\"email_address\"&gt;Email Address&lt;/label&gt;\n    &lt;/div&gt;```\n\n    You would change\n\n        ```'emailAddress': $('#email_address').val(),```\n\nto\n\n       ```'emailAddress': $('#email').val(),```\n\nDo this for all fields listed in that function\n</code></pre><p><br /><br /></p>\n<p>Step 4: Replace <code>#purchase</code> with the 'id' of your submit button.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Ex. Lets say your form begins with\n\n    &lt;form method=\"POST\" action=\"card.php\" id=\"myCheckout\"&gt;\n\nYou would change\n\n     $('#purchase').click(function(){\n\nto\n\n     $('#myCheckout').click(function(){\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h4 id=\"how-does-it-work\">How does it work?</h4>\n<p>The following function brings it all together:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PayCafe.saveData(\n  customerData,\n    function(tokens) {\n      submitForm(tokens);\n        console.log(tokens);\n        console.log('&lt; Success Callback Function&gt;');\n        },\n    function(errors) {\n      parentError(errors);\n      console.log(' &lt; Failure Callback Function &gt; ');\n      });\n</code></pre><p><br /><br />\n<code>submitForm</code> and <code>parentError</code> are the callback functions that will handle successful and failed responses respectively, in our example. You would replace these two with functions with your own custom logic to meet your needs.</p>\n<p><code>PayCafe.saveData</code>  will pass the customer information from your form to the iFrame, and along with the credit card\ndata, both are sent to PayCafe for processing. Once PayCafe processes the submitted data, a response\nwill be passed to the provided success  (<code> submitForm</code>) or failure (<code> parentError</code>) functions.</p>\n<p>If the processing of the data was successful, PayCafe will respond with an object containing a customer token and a credit card token:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>    {\n      error : false,\n      customerToken : ‘ads835hja9f00h35025dfa62346hjk’,\n      cardToken : ‘j0asdf8h4w5ig03h408hg0haw4’\n    }\n</code></pre><p>and assign it to the variable <code>tokens</code> and pass it to <code> submitForm</code>.</p>\n<p>You  will have access to the customer and credit card token within the <code>submitForm</code> function. You will need to  store these tokens within this function or  through a server-side function once the checkout form is submitted.</p>\n<blockquote>\n<p>PayCafe strongly advises storing the customer and credit card tokens  as they can be used not only for recurring payments, but for other API calls like  processing refunds.  </p>\n</blockquote>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"completing-salecharge-transaction\">Completing Sale/Charge Transaction</h4>\n<p>Once your checkout form is submitted, you will need to call the PayCafe API <code>/charge</code> endpoint\nwith the required variables.\nYou can find documentation on our <code>/charge</code> endpoint in our\n<a href=\"https://apidocs.paycafe.com\">PayCafe API reference</a>.</p>\n","event":[{"listen":"prerequest","script":{"id":"0c4fbabd-2de6-46ce-9b56-88d2d403d607","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4e55b55a-c7c3-47cb-b91d-3b023395fd55","type":"text/javascript","exec":[""]}}],"_postman_id":"8b8d3831-2b59-41ce-b99e-a6d8869c092a"},{"name":"Accepting Credit Card Data","item":[{"name":"Credit Card iFrame","item":[],"id":"b2766fd5-9e41-4f80-8e86-d3109a3b1bff","description":"<p>This guide will outline the first part of integrating PayCafe credit card processing into your checkout using the PCI-compliant iframe.  By allowing for the credit card details to be submitted within the PayCafe iframe instead of your checkout form, you will be able to integrate payment processing quickly while adhering to PCI compliance rules and regulations.</p>\n<h4 id=\"the-following-steps-are-required-in-a-successfully-integrated-checkout-form\">The following steps are required in a successfully integrated checkout form:</h4>\n<ol>\n<li>Customer details (name, address, etc.) are collected as part of your existing checkout form.</li>\n<li>Credit card details are collected through a PayCafe iframe integrated into your existing checkout form.</li>\n<li>Both customer details and credit card details are submitted to javascript, then submitted to PayCafe.</li>  \n<li>PayCafe will respond with a customer token and a credit card token to be used when executing the PayCafe API.</li>\n<li>Your checkout form is submitted and payment is processed by executing the PayCafe <code>/charge/create</code> endpoint.</li>\n</ol>\n\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"prerequisites\">Prerequisites</h2>\n<h4 id=\"existing-checkout-form\">Existing Checkout Form</h4>\n<p>This guide will assume that you have an existing checkout form into which you wish to integrate PayCafe payment processing. Your existing checkout form will need to collect the following customer details:</p>\n<ul>\n<li>First name</li>\n<li>Last name</li>\n<li>Address Line 1</li>\n<li>Address Line 2 (Optional)</li>\n<li>City</li>\n<li>Postal Code</li>\n<li>State</li>\n<li>Country</li>\n<li>Email address</li>\n</ul>\n\n\n<h4 id=\"example-checkout-form\">Example Checkout Form</h4>\n<blockquote>\n<p><img src=\"https://paycafe-postman.s3-us-west-2.amazonaws.com/images/checkoutFormOnly2.png\" alt=\"Example Checkout\" /></p>\n</blockquote>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"javascript-iframe-and-integration\">Javascript iframe and integration</h2>\n<p>In order to complete a credit card sale transaction, you will need a customer token and a credit card token.  To create a customer and credit card token, you will need to include our JavaScript on your checkout form which will create an iframe that accepts card number, expiration date, and CVV. You will then pass customer and credit card details to our JavaScript function, which will submit those details, to PayCafe. Once PayCafe receives the details, our API will process the request and respond with the customer token and credit card token. Those tokens must be saved and then used to process the payment using the <code>/charge/create</code> endpoint.</p>\n<h4 id=\"paycafe-credit-card-iframe\">PayCafe credit card iframe</h4>\n<p>Place the following JavaScript on your checkout form where you would like the credit card fields to appear. You may also choose to style the credit card iframe to match the styling of your checkout form.  For details and examples, please see <i>Styling credit card iframe</i> section.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">&lt;script type=\"text/javascript\" src=\"https://api.paycafe.com/static/js/PayCafeV1.js\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;var PayCafe = PayCafeInit('merchantPublicToken', 'api.paycafe.com'); &lt;/script&gt;\n</code></pre>\n<blockquote>\n<p>Make sure to replace <em><strong>merchantPublicToken</strong></em> with the token you received from PayCafe when your merchant account was setup.  If you are a PayCafe Authorized Partner, you would have received the <em><strong>merchantPublicToken</strong></em> during the Merchant Boarding process (<code>/merchant/create</code>).  If you are a PayCafe merchant and do not have this information, please contact support.  If you are a PayCafe Authorized Partner, you may choose to execute the <code>/merchant/status</code> method in order to get the proper tokens.</p>\n</blockquote>\n<p>Once added, the fields for credit card input will load in an iframe on your checkout:</p>\n<p><img src=\"https://paycafe-postman.s3-us-west-2.amazonaws.com/images/checkoutFormiframe2.png\" alt=\"Example Checkout\" /></p>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"processing-a-complete-credit-card-sale-transaction\">Processing a complete credit card sale transaction</h2>\n<p>The JavaScript loaded on your checkout form in the previous step will handle interaction with our API. </p>\n<p>On your end you will need to:</p>\n<h4 id=\"step-1-save-customer-data-on-paycafe\">Step 1. Save customer data on PayCafe</h4>\n<ul>\n<li>Create data object containing customer details from your existing checkout form.  It is important to validate the input fields prior to creating the object in order to minimize the chance of any validation errors on PayCafe's end.</li>\n<li>Make a request to the save data using <code>saveData</code> function. This is the step that will use the customer details, along with the credit card details in the credit card iframe and submit them to the PayCafe API.  The PayCafe API will respond with the customer and card tokens or errors (if any).</li>\n</ul>\n<h4 id=\"step-2-handle-response-from-the-paycafe-api\">Step 2. Handle response from the PayCafe API.</h4>\n<ul>\n<li><p>If PayCafe responds succesfully:</p>\n<ul>\n<li>The provided success function will execute.  It's important for this success function to save the customer and credit card token to your database to complete the credit card sale transaction and future payment transactions (e.g. refunds and/or renewals). </li>\n<li>Once you have saved the tokens, you may move onto Step 3.</li>\n</ul>\n</li>\n<li><p>If PayCafe responds with an error:</p>\n<ul>\n<li>The provided failure callback function will execute.  You will need to create a failure callback function that manages the error responses and reports them to the customer for them to be corrected.  For example, 'missing email address'.</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"step-3-complete-sale-transaction\">Step 3. Complete Sale Transaction</h4>\n<ul>\n<li>Use the <code>/charge/create</code> endpoint of the PayCafe API to complete the sale transaction. This function will need to be executed on the backend of your website/server to POST the proper details to the <code>/charge/create</code> endpoint. This endpoint will respond with either successful transaction details, decline message, or validation errors (e.g. invalid amount).</li>\n</ul>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"example-workflow\">Example Workflow</h2>\n<p>The following is an example of how to integrate these steps into a checkout form.</p>\n<blockquote>\n<p>To download this complete example including a sample checkout form, <a href=\"https://paycafe-postman.s3-us-west-2.amazonaws.com/downloads/PayCafeDemo.zip\">click here</a> </p>\n</blockquote>\n<h4 id=\"saving-customer-data\">Saving Customer Data</h4>\n<p>The following are examples for Step 1 in the previous section.</p>\n<h4 id=\"javascript-example\">JavaScript Example</h4>\n<p>To save the customer data, you will need to provide all the customer data to PayCafe in the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">var customerData = {\n  'emailAddress': &lt;string&gt;,\n  'firstName': &lt;string&gt;,\n  'lastName': &lt;string&gt;,\n  'billingAddress': {\n  'line1': &lt;string&gt;,\n  'line2': &lt;string&gt;,\n  'city': &lt;string&gt;,\n  'state': &lt;string&gt;,\n  'country': &lt;string&gt;,\n  'postal_code': &lt;string&gt;,\n  'phone_number': &lt;string&gt;\n  }\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"jquery-example\">JQuery Example</h4>\n<p>Here is an jQuery example for populating the variables using the fields in your checkout form:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-js\">  var customerData = {\n    'emailAddress': $('#email_address').val(),\n    'firstName': $('#first_name').val(),\n    'lastName': $('#last_name').val(),\n    'billingAddress': {\n    'line1': $('#address1').val(),\n    'line2': $('#address2').val(),\n    'city': $('#city').val(),\n    'state': $('#state').val(),\n    'country': $('#country').val(),\n    'postal_code': $('#postal_code').val(),\n    'phone_number': $('#phone_number').val()\n    }\n</code></pre>\n<blockquote>\n<p>Make sure the input name on your form matches the name in the function (ex. <code>#email_address</code>) for its respective field.<br />Replace <code>#purchase</code> with the 'id' of your checkout form submit button.</p>\n</blockquote>\n<h2 id=\"checkout-form-processing\">Checkout form processing</h2>\n<p>In order for these steps to occur seamlessly with your checkout, you will need to encapsulate this process in a function that is executed when your form is submitted:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-js\">    $(document).ready(function(){\n        $('#purchase').click(function() {\n          var customerData = {\n            'emailAddress': $('#email_address').val(),\n            'firstName': $('#first_name').val(),\n            'lastName': $('#last_name').val(),\n            'billingAddress': {\n            'line1': $('#address1').val(),\n            'line2': $('#address2').val(),\n            'city': $('#city').val(),\n            'state': $('#state').val(),\n            'country': $('#country').val(),\n            'postal_code': $('#postal_code').val(),\n            'phone_number': $('#phone_number').val()\n            }\n        }\n        PayCafe.saveData(\n            customerData,\n            function(tokens) {\n                submitForm(tokens);\n                console.log(tokens);\n                console.log('&lt; Success Callback Function&gt;');\n            },\n            function(errors) {\n                parentError(errors);\n                console.log(' &lt; Failure Callback Function &gt; ');\n            });\n        });\n    });\n</code></pre>\n<p>The JavaScript will have access to the customer and credit card token within the <code>submitForm</code> function. You can store these tokens within this function or  through a server-side function once the checkout form is submitted.</p>\n<p>PayCafe strongly advises storing the customer and credit card tokens  as they can be used not only for recurring payments, but for other API calls like  processing refunds.  </p>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"submitting-data-to-paycafe\">Submitting data to PayCafe</h2>\n<p>The following are a continuation of examples for Step 1 in the previous section.</p>\n<p>This step is an example of how to submit customer and credit card details to PayCafe.  Once PayCafe receives the data, it will respond with the customer and card token, or errors (if any).</p>\n<p>You can now execute the <code>PayCafe.saveData</code> function and pass it the form data.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-js\">PayCafe.saveData(\n  customerData,\n    function(tokens) {\n      submitForm(tokens); // Success Function\n        console.log(tokens);\n        console.log('&lt; Success Callback Function&gt;');\n    },\n    function(errors) {\n      parentError(errors); // Failure Function\n      console.log(' &lt; Failure Callback Function &gt; ');\n    });\n</code></pre>\n<blockquote>\n<p><code>submitForm</code> and <code>parentError</code> are the JavaScript callback functions that will handle successful and failed responses respectively, in our example. You would replace these two with functions with your own custom logic to meet your needs.</p>\n</blockquote>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"handle-response-from-paycafe-api\">Handle Response from PayCafe API</h2>\n<p>The following are examples for Step 2 in the previous section.</p>\n<p><code>PayCafe.saveData</code>  will pass the customer information from your form to the iframe, and along with the credit card data, both are sent to PayCafe for processing. Once PayCafe processes the submitted data, a response will be passed to the provided success  (<code>submitForm</code>) or failure (<code>parentError</code>) function.</p>\n<h4 id=\"success-response\">Success Response</h4>\n<p>If PayCafe responds with a successful result, it will include the customer and card tokens.  The success function will excute.  In the example, the success function is called <code>submitForm</code>.  You will need to modify this function to support saving the response tokens.</p>\n<p>Here is an example of a success callback function. This function will submit the checkout form\nwith the customer and credit card tokens.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-js\">    function submitForm(params){\n      console.log('submitForm function');\n          $('#customerToken').val(params.customerToken);\n          $('#cardToken').val(params.cardToken);\n          $('#purchaseForm').submit();\n        }\n</code></pre>\n<blockquote>\n<p>In this example <code>#purchaseForm</code> is the <code>id</code> of the checkout form. Make sure this matches the <code>id</code> of your checkout form.</p>\n</blockquote>\n<p>This is a successful response example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-python\">    {\n      error : false,\n      customerToken : ‘ads835hja9f00h35025dfa62346hjk’,\n      cardToken : ‘j0asdf8h4w5ig03h408hg0haw4’\n    }\n</code></pre>\n<p>This response will be assigned to the variable <code>tokens</code> and will be passed it to <code> submitForm</code> function.</p>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"failure-response\">Failure Response</h4>\n<p>If PayCafe responds with a failure result, it will include the applicable error message(s).  The failure function will execute.  In the example, the failure function is called <code>parentError</code>. You will need to create/modify the function to manage the errors appropriately.  </p>\n<p>Here is an example of a failure callback function. This function will accept the response errors\nand respond to the Internet browser with the details. Please consult your developer to integrate\nthe error responses with your checkout process.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-js\">function parentError(params){\n    console.log('parentError function called');\n    if(params.error_code === 'invalid_card' || params.error_code ===\n        'invalid_card_num'){\n        alert('Invalid Card!');\n        }\n    if(params.error_code === 'invalid_customer'){\n        if(params.emailAddress !== false){\n            $('#email_address').addClass('invalid');\n            }\n        if(params.firstName !== false){\n            $('#first_name').addClass('invalid');\n        }\n        if(params.lastName !== false){\n            $('#last_name').addClass('invalid');\n        }\n        if(params.billingAddress.line1 !== false){\n            $('#address1').addClass('invalid');\n        }\n        if(params.billingAddress.city !== false){\n            $('#city').addClass('invalid');\n        }\n        if(params.billingAddress.state !== false){\n            $('#state').addClass('invalid');\n        }\n        if(params.billingAddress.country !== false){\n            $('#country').addClass('invalid');\n        }\n        if(params.billingAddress.postal_code !== false){\n            $('#postal_code').addClass('invalid');\n        }\n        if(params.billingAddress.phone_number !== false){\n            $('#phone_number').addClass('invalid');\n        }\n    }\n    if(params.error_code === 'invalid_address'){\n        $('#email_address').addClass('invalid');\n        $('#first_name').addClass('invalid');\n        $('#last_name').addClass('invalid');\n        $('#address1').addClass('invalid');\n        $('#city').addClass('invalid');\n        $('#state').addClass('invalid');\n        $('#country').addClass('invalid');\n        $('#postal_code').addClass('invalid');\n        $('#phone_number').addClass('invalid');\n    }\n}\n</code></pre>\n<p>If validation failed, PayCafe will respond with an object containing more information regarding the failure.  This is a failure response example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-{\">        error : true,\n        error_code : 'invalid_customer',\n        emailAddress : true, // true = invalid email, false = valid email\n        firstName : true, // true = invalid first name, false = valid first\n        namelastName : true, // true = invalid first name, false = valid first name\n        billingAddress.line1 : true, // true = invalid billing address line 1\n        billingAddress.line2 : true, // true = invalid billing address line 2\n        billingAddress.city : true, // true = invalid city\n        billingAddress.state : true, // true = invalid state\n        billingAddress.postal_code : true, // true = invalid postal code\n        billingAddress.country : true, // true = invalid country\n        billingAddress.phone_number : true, // true = invalid phone number\n        shippingAddress.line1 : true, // true = invalid shipping address line 1\n        shippingAddress.line2 : true, // true = invalid shipping address line 2\n        shippingAddress.city : true, // true = invalid city\n        shippingAddress.state : true, // true = invalid state\n        shippingAddress.postal_code : true, // true = invalid postal code     \n        shippingAddress.country : true, // true = invalid country\n        shippingAddress.phone_number : true // true = invalid phone number\n    }\n</code></pre>\n<p>This response will be assigned to the variable <code>errors</code> and will be passed to the <code>parentError</code> function.</p>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"completing-credit-card-sale-transaction\">Completing credit card sale transaction</h4>\n<p>Once your checkout form is submitted and you have received the <code>customerToken</code> and <code>cardToken</code>, you will use the tokens to execute the PayCafe API <code>/charge/create</code> endpoint in order to attempt the credit card transaction.</p>\n<p>When you execute the <code>/charge/create</code> endpoint, PayCafe will respond with a success or failure message.  The success repsonse indicates that the transaction was processed successfully.  A failure response indicates that the transaction was declined.  In addition, the failure response provides the reason for the decline.  For example, a decline reason may be 'insufficent funds'.</p>\n<p>You can find documentation on our <code>/charge/create</code> endpoint.</p>\n<p><br /></p><hr /><br /><p></p>\n","event":[{"listen":"prerequest","script":{"id":"776f8b0b-8d61-40a2-9148-f4e00e371fd2","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8af6bfce-7ce3-4bbf-b8ae-e7363f8dc539","type":"text/javascript","exec":[""]}}],"_postman_id":"b2766fd5-9e41-4f80-8e86-d3109a3b1bff"},{"name":"Credit Card iFrame (Advanced)","item":[],"id":"ec2d21db-d41d-4b33-9e51-9feae33df332","description":"<p>If you wish to place the PayCafe Credit Card iFrame JavaScript within the <code>&lt;head&gt;</code> section and display the iframe in a different location, rather than having the JavaScript in-line with your HTML you will use the advanced features.</p>\n<h2 id=\"credit-card-iframe-advanced-integration\">Credit Card iFrame Advanced Integration</h2>\n<p>The following code section will be placed within the <code>&lt;head&gt;</code> section of your HTML page. You will need to make sure to populate the <code>merchantPublicToken</code> that is associated with your PayCafe merchatn account and assign a <code>div</code> name located within the <code>Card.Mount</code> call.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;script type=\"text/javascript\" src=\"https://api.paycafe.com/v1/js/PayCafe.js\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;\n    \n    var styles = {\n        cardNumberContainer : '',\n        cardNumber : '',\n        expMonthContainer : '',\n        expMonth : '',\n        expYearContainer : '',\n        expYear : '',\n        cvvContainer : '',\n        cvv : ''\n    }\n    \n    var Card = PayCafe('merchantPublicToken');\n    Card.mount('div-name-here', {styles: styles});\n&lt;/script&gt;\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h2 id=\"displaying-the-credit-card-iframe-advanced-version\">Displaying the credit card iframe (advanced version)</h2>\n<p>Once you have placed the proper javascript within the <code>&lt;head&gt;</code> section, you will need to place a <code>&lt;div&gt;</code> whereever you would like the iframe to be displayed. The name of the <code>&lt;div&gt;</code> must match the defined name within the javascript.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;div name='div-name-here'&gt;&lt;/div&gt;\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h2 id=\"credit-credit-iframe-advanced-example\">Credit credit iframe (advanced) example</h2>\n<p>Here is an exmaple of the advanced version of the credit card iframe.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;html&gt;\n&lt;head&gt;\n\n&lt;script type=\"text/javascript\" src=\"https://api.paycafe.com/v1/js/PayCafe.js\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;\nvar styles = {\n    cardNumberContainer : 'width: 30%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    cardNumber : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n    expMonthContainer : 'width: 15%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    expMonth : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n    expYearContainer : 'width: 15%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    expYear : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n    cvvContainer : 'width: 10%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    cvv : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;'\n  }\n\n  var Card = PayCafe('merchantPublicToken');\n  Card.mount('PayCafe-CardFrame', {styles: styles});\n&lt;/head&gt;\n\n&lt;body&gt;\n\n...\n\n&lt;div name=\"PayCafe-CardFrame\"&gt;&lt;/div&gt;\n\n...\n\n\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"1ffb39ad-8bf9-4fcd-b681-e81b720412c4","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"818c0093-3ca8-41d6-9440-d1459a4f561b","type":"text/javascript","exec":[""]}}],"_postman_id":"ec2d21db-d41d-4b33-9e51-9feae33df332"},{"name":"Credit Card iFrame Sandbox","item":[],"id":"74c0a7d8-03ec-448a-9c5d-885f1c871e63","description":"<p>During integration of the PayCafe API it is recommended to test everything thoroughly. The PayCafe API offers a sandbox mode.  The sandbox mode allows a developer to use the credit card iframe in a development environment without the requirement of SSL encryption. When using the sandbox mode, real credit card transactions will be blocked.</p>\n<p>In order to activate the sandbox mode, simply append <code>_test</code> to the <code>merchantPublicToken</code> when adding the credit card iframe to your checkout page.</p>\n<p><b>Example:</b>\nBelow is an example of the credit card iframe with the appended <code>_test</code> to the <code>merchantPublicToken</code>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;script type=\"text/javascript\" src=\"https://api.paycafe.com/static/js/PayCafeV1.js\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;var PayCafe = PayCafeInit('6plXSDF0sdfaSDfi234lG0fylVB2DtFhyiqTCbLQMCx1DhpgpaFMBFj81li_test', 'api.paycafe.com'); &lt;/script&gt;\n                \n</code></pre><h2 id=\"test-credit-card-numbers\">Test Credit Card Numbers</h2>\n<p>This is a list of test credit cards that will duplicate common scenarios.  </p>\n<h3 id=\"valid-test-transaction\">Valid test transaction</h3>\n<p>Use this card to simulate a real credit card transaction.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999912341234\nExpiration Month: 12\nExpiration Year: 2032\nSecurity Code / CVV:321\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h3 id=\"banned-credit-card\">Banned credit card</h3>\n<p>Use this card to simulate a response of a banned credit card.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999956781234\nExpiration Month: 12\nExpiration Year: 2032\nSecurity Code / CVV:456\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h3 id=\"processing-limit-reached\">Processing limit reached</h3>\n<p>Use this card to simulate a merchant that has reached their processing limit.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999912345678\nExpiration Month: 12\nExpiration Year: 2032\nSecurity Code / CVV: 789\n</code></pre><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999988888888\nSecurity Code / CVV: 999\nExpiration Month: 12\nExpiration Year: 2032\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h3 id=\"declined-sale-transaction\">Declined sale transaction</h3>\n<p>Use this card to simulate a general declined transaction.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999943218765\nExpiration Month: 12\nExpiration Year: 2032\nSecurity Code / CVV: 999\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h3 id=\"declined-sale-transaction-for-insufficient-funds\">Declined sale transaction for insufficient funds</h3>\n<p>Use this card to simulate a declined transaction due to insufficient funds</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999956781233\nSecurity Code / CVV: 999\nExpiration Month 12\nExpiration Year: 2032\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h3 id=\"declined-sale-transaction-for-address-verification-failure\">Declined sale transaction for address verification failure</h3>\n<p>Use this card to simulate a declined transaction due to \"AVS\".  This is caused by the customer address entered does not match the details of the credit card.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999987654321\nSecurity Code / CVV: 999\nExpiration Month: 12\nExpiration Year: 2032\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h3 id=\"merchant-inactive\">Merchant Inactive</h3>\n<p>Use this card to simulate a transaction to a merchant that is currently not active.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Card Number: 9999999977777777\nSecurity Code / CVV: 999\nExpiration Month: 12\nExpiration Year: 2032\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"d63b0aad-580a-40a5-8481-73960d78017e","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e9586082-bc9e-4585-9474-eea7b0a0b85e","type":"text/javascript","exec":[""]}}],"_postman_id":"74c0a7d8-03ec-448a-9c5d-885f1c871e63"},{"name":"Credit Card IFrame Styling","item":[],"id":"996802a3-5322-479b-9960-367137217fa4","description":"<h2 id=\"styling-credit-card-iframe\">Styling credit card iframe</h2>\n<p>The PayCafe Card Data iframe is designed to accept standard CSS3 styling.  We have defined named elements that can styled. The style variables must be placed within the <code>&lt;Script&gt;&lt;/Script&gt;</code> tags.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>var payCafeStyles = {\n    cardNumberContainer : '',\n    cardNumber : '',\n    expMonthContainer : '',\n    expMonth : '',\n    expYearContainer : '',\n    expYear : '',\n    cvvContainer : '',\n    cvv : '',\n    body : ''\n}\n</code></pre><p><br /></p><hr /><br /><p></p>\n<h4 id=\"example\">Example</h4>\n<p>Below is an example of the iFrame with styles applied.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;script type=\"text/javascript\" src=\"https://api.paycafe.com/static/js/PayCafeV1.js\"&gt;&lt;/script&gt;\n&lt;script type=\"text/javascript\"&gt;\n\nvar payCafeStyles = {\n    cardNumberContainer : 'width: 30%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    cardNumber : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n    expMonthContainer : 'width: 15%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    expMonth : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n    expYearContainer : 'width: 15%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    expYear : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n    cvvContainer : 'width: 10%; margin-left:auto; left:auto; right:auto; float:left; padding:.5em;',\n    cvv : 'background-color: transparent; border: none; border-bottom: 1px solid #9e9e9e; border-radius: 0; outline: none; height: 3rem; width: 100%; font-size: 16px; margin: 0 0 8px 0; padding: 0; -webkit-box-shadow: none; box-shadow: none; -webkit-box-sizing: content-box; box-sizing: content-box; -webkit-transition: border .3s, -webkit-box-shadow .3s; transition: border .3s, -webkit-box-shadow .3s; transition: box-shadow .3s, border .3s; transition: box-shadow .3s, border .3s, -webkit-box-shadow .3s;',\n      body: 'background-color:#000;'\n  }\n\nvar PayCafe = PayCafeInit('merchantPublicToken', 'api.paycafe.com');&lt;/script&gt;\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"6878c807-5053-4929-a7d1-24d8ea9db3d7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"cf75589b-8d6b-4ef4-8f4f-30a622eeaddb","type":"text/javascript","exec":[""]}}],"_postman_id":"996802a3-5322-479b-9960-367137217fa4"}],"id":"69d7d06b-4c63-4413-96ca-947b63804e91","description":"<p>The PayCafe API offers multiple ways to integrate credit card payments into your website.  </p>\n<ul>\n<li><b>Direct API</b> - This process accesses the API and submits customer details, credit card details, and other API requests directly. This option requires the merchant and their website/e-commerce service to be PCI-compliant.<br /><br /></li>\n<li><b>Credit Card iFrame</b> - This option allows for a merchant to integrate a PCI-compliant iframe to capture customer and credit card details. This option does not limit any functionality, but allows for the merchant to remain PCI-complaint by not accessing credit card details.</li>\n</ul>","event":[{"listen":"prerequest","script":{"id":"2220fc84-b03c-4cf7-a33d-cfdcd51fa2d9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4e738786-80b9-4711-a826-4ffac7a08bbd","type":"text/javascript","exec":[""]}}],"_postman_id":"69d7d06b-4c63-4413-96ca-947b63804e91"},{"name":"PayCafe Authorized Partners","item":[{"name":"Merchant Boarding","item":[],"id":"90b76db4-0bac-45ee-a6da-bc65f9886618","description":"<p>This guide will outline the boarding of merchants. This functionality is exclusive for PayCafe Authorized Partners.  If you are interested in becoming a PayCafe Authorized Partner, please contact <a href=\"mailto:sales@paycafe.com\">sales@paycafe.com</a>. </p>\n<h2 id=\"prerequisites\">Prerequisites</h2>\n<p>To successfully initiate boarding of a merchant using our API you will need:</p>\n<ul>\n<li>Partner API Token</li>\n<li>Referral ID</li>\n<li>Partner ID</li>\n</ul>\n<p>These details will be supplied to you by the PayCafe integration department.</p>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"overview\">Overview:</h2>\n<p>As a PayCafe Authorized Partner, you will have the ability to start the boarding process for new merchants using our merchant endpoint. </p>\n<p><strong>Please note that all merchants must still go through the normal underwriting and review process</strong></p>\n<p>The following steps describe the partner-initiated merchant boarding process:</p>\n<ol>\n<li>Provide partner client/user a \"button\" to start the PayCafe activation process.</li>\n<li>Initiate boarding process using the PayCafe API via the <b>/merchant/create</b> endpoint.</li>\n<li>PayCafe will respond with merchant tokens and the PayCafe activation URL.  The URL will be used as the source of an iframe hosted on the partner's service/website.</li>\n<li>The merchant will complete the activation process through the iframe.</li>\n<li>Once the merchant completes the activation process, PayCafe will begin the underwriting and review process.</li>\n<li>If approved, PayCafe will activate the merchant and they can begin processing payments.</li>\n<li>Strongly suggested, but optional: a partner can provide PayCafe with an endpoint where PayCafe will send merchant status updates.  The partner may choose to use the status updates to facilite additional functionality; for example, enabling partner-specific functionality for the merchant such as an online store or checkout form.</li>\n</ol>\n\n<p><br /></p><hr /><br /><p></p>\n<h3 id=\"api-request\">API Request</h3>\n<p>In order to start the merchant boarding process, the partner will make an API call to the <code>/merchant/create</code> endpoint. </p>\n<p>Below are the parameters that you will need to supply in the initial API request:</p>\n<ul>\n<li>partnerToken: partner token used to authenticate partner-specific API endpoints</li>\n<li>referralID - referral ID (PayCafe will supply this value)</li>\n<li>partnerID - partner ID (PayCafe will supply this value)</li>\n<li>emailAddress - Merchant email</li>\n<li>firstName - Merchant first-name</li>\n<li>lastName - Merchant last-name</li>\n</ul>\n\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"example-responses\">Example Responses</h2>\n<h4 id=\"new-merchant\">New Merchant</h4>\n<p>Below is an example of a typical response following a successful merchant creation API request. You will store the ‘merchantToken’ and 'merchantPublicToken' values to use later for activation and payment functions. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>    {\n        \"responseStatus\": \"success\",\n        \"merchantData\": {\n            \"status\": \"new\",\n            \"merchantToken\": \"Mm8gca0ugebR3rDMFZ4VbKXNvX0BjM8zIRWz69HybLqfA1g3ZVpwMc96jhTX\",\n            \"merchantPublicToken\": \"nyzHwdWnroVaGBByvJJmypweEKalrF4HIMDFKS04m39TkQk1h3vkx2J5o5gv\",\n            \"signupURL\": \"http://&lt; PayCafe URL &gt;/merchant/public/link_existing/C3c6Nkz0siCImYVwASdwEO8QyUYrA6V2qWzksx3igag1VmDm0PyD6A4nux2\"\n        }\n    }\n</code></pre><h4 id=\"existing-merchant\">Existing Merchant</h4>\n<p>An existing merchant is a merchant signed up with PayCafe directly and/or prior to the partner relationship. The merchant may wish to use their already-established PayCafe account with the partner.  In this case, the merchant will simply be linked to the partner account and the status of the merchant will be reflected by 'status'.</p>\n<p>If a merchant previously signed up for PayCafe outside of the partner signup process, you will receive the following response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>    {\n    \"responseStatus\": \"success\",\n        \"merchantData\": {\n            \"status\": \"demo\",\n            \"info\": \"existing merchant\",\n            \"merchantToken\": \"Mm8gca0ugebR3rDMFZ4VbKXNvX0BjM8zIRWz69HybLqfA1g3ZVpwMc96jhTX\",\n            \"merchantPublicToken\": \"nyzHwdWnroVaGBByvJJmypweEKalrF4HIMDFKS04m39TkQk1h3vkx2J5o5gv\",\n            \"signupURL\": \"http://&lt; PayCafe URL &gt;/merchant/public/link_existing/C3c6Nkz0siCImYVwASdwEO8QyUYrA6V2qWzksx3igag1VmDm0PyD6AF4nux2\"\n        }\n    }\n</code></pre><blockquote>\n<p>The Partner will receive the <code>merchantToken</code> and <code>merchantPublicToken</code> to be used for payment processing.</p>\n</blockquote>\n<p>The partner will need to store the following details:</p>\n<ul>\n<li>merchantToken - Used for the merchant to authenticate calls to the PayCafe API</li>\n<li>merchantPublicToken - Used for integration of credit card processing using our iFrame</li>\n<li>signupURL - Used to integrate the signup process into your dashboard</li>\n</ul>\n\n\n<h4 id=\"merchant-status\">Merchant status</h4>\n<p>This is a list of the different status values for merchants.  When new merchants start the activation process, they will be in 'demo' status.</p>\n<ul>\n<li>Demo - This is the status given to new merchants before they complete the activation process.</li>\n<li>Underwriting - The merchant has completed the activation process and the PayCafe staff is reviewing their details.</li>\n<li>Active - The merchant has been underwritten and is ready to accept payments.</li>\n<li>Declined - After underwriting review, PayCafe has determined that the merchant does not meet the criteria for our services.</li>\n<li>Terminated - The merchant is blocked from using PayCafe payment services.</li>\n<li>Hold - The merchant's account is under review.  During 'hold' status, they are unable to process credit card payments or receive settlements.  However, they are not terminated.</li>\n</ul>\n\n<p><br /></p><hr /><br /><p></p>\n<h3 id=\"partner-notification-optional\">Partner Notification (Optional)</h3>\n<p>To offer PayCafe Partners a seamless solution, we provide the ability to send merchant status updates to our partners.  By utilizing this feature, partners will enjoy a seamless merchant boarding process wherein merchants sign up, get activated, and start to use partners' services with minimal or no human interaction.</p>\n<p>A Partner can provide PayCafe with an endpoint to receive notification whenever a  merchant's account changes status. For example, PayCafe would make an API call to the partner notification endpoint after underwriting is completed and the merchant is activated.</p>\n<p>In order to provide a secure exchange of information we require the endpoint to be over SSL and to accept the following data :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>    {\n      \"action\": \"status_change\",\n      \"status\": \"active\",\n      \"merchantPublicToken\": \"nyzHwdWnroVaGBByvJJmypweEKalrF4HIMDFKS04m39TkQk1h3vkx2J5o5gv\"\n    } \n</code></pre><p>You can then use the appropriate API tokens to call the <code>/merchant/status</code> endpoint for merchant status details.</p>\n","event":[{"listen":"prerequest","script":{"id":"31378c38-ba87-49ec-93f4-e789177ced96","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5e347651-e9e9-41ca-93a0-02711c5820af","type":"text/javascript","exec":[""]}}],"_postman_id":"90b76db4-0bac-45ee-a6da-bc65f9886618"}],"id":"dd4a1d71-06c6-4ab0-984a-904630bbc01d","description":"<p>PayCafe offers a partner program to companies that are looking for a customized payment solution to fit online merchants.  If you are interested in finding out more, please contact <a href=\"mailto:sales@paycafe.com\">sales@paycafe.com</a>.</p>\n<p>This section documents API functionality exclusive to PayCafe Authorized Partners.   </p>\n","event":[{"listen":"prerequest","script":{"id":"f8b5df05-ea32-4211-870d-490b9203a568","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"3fa52039-f3f3-4222-a657-67dc6602df27","type":"text/javascript","exec":[""]}}],"_postman_id":"dd4a1d71-06c6-4ab0-984a-904630bbc01d"}],"id":"335277d8-5715-4356-95be-949ffa13717f","_postman_id":"335277d8-5715-4356-95be-949ffa13717f","description":""},{"name":"Customer","item":[{"name":"Create Customer Token","id":"c6dfb5d3-ed4c-4419-a4d9-624fd344559f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"firstName","value":"<string>","description":"<p>Required</p>\n"},{"key":"lastName","value":"<string>","description":"<p>Required</p>\n"},{"key":"emailAddress","value":"<string>","description":"<p>Required</p>\n"},{"key":"billingAddress","value":"{\"line1\":\"<string>\",\"line2\":\"<string>\",\"city\":\"<string>\",\"state\":\"<string>\",\"postal_code\":\"<string>\",\"country\":\"<string>\",\"phone_country_code\":\"<string>\",\"phone_number\":\"<number>\"}","description":"<p>Required<br />\nCustomer billing address in JSON format</p>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements\">ISO-3166 2-Letter Country Code standard</a></li>\n</ul>"},{"key":"company","value":"<string>"},{"key":"lang","value":"<string>","description":"<p>If no value specified, default value is 'en-US'</p>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/Language_localisation\">Language Code standard</a></li>\n</ul>"},{"key":"shippingAddress","value":"{\"line1\":\"<string>\",\"line2\":\"<string>\",\"city\":\"<string>\",\"state\":\"<string>\",\"postal_code\":\"<string>\",\"country\":\"<string>\",\"phone_country_code\":\"<string>\",\"phone_number\":\"<number>\"}","description":"<p>Optional<br />\nCustomer shipping address in JSON format</p>\n<ul>\n<li><a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements\">ISO-3166 2-Letter Country Code standard</a></li>\n</ul>"}]},"url":"https://api.paycafe.com/v1/customer/create","description":"<p>The <code>/customer/create</code> object allows you to create a new customer to be used for future billing functionality.</p>\n","urlObject":{"protocol":"https","path":["v1","customer","create"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"844d700f-0d78-4755-b134-a715f4d607bf","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"firstName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"lastName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"emailAddress","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"billingAddress","value":"{\"line1\":\"<string>\",\"line2\":\"<string>\",\"city\":\"<string>\",\"state\":\"<string>\",\"postal_code\":\"<string>\",\"country\":\"<string>\",\"phone_country_code\":\"<string>\",\"phone_number\":\"<number>\"}"},{"description":{"content":"","type":"text/plain"},"key":"company","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"lang","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"shippingAddress","value":"{\"line1\":\"<string>\",\"line2\":\"<string>\",\"city\":\"<string>\",\"state\":\"<string>\",\"postal_code\":\"<string>\",\"country\":\"<string>\",\"phone_country_code\":\"<string>\",\"phone_number\":\"<number>\"}"}]},"url":"https://api.paycafe.com/v1/customer/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"succsss\",\n \"customerToken\": \"qPPY0ekl8zTnAk6ZeBtrVypa7zG16MyN0hX89PtLon7lu6ZN2yj2PQgSpZVV\"\n}"},{"id":"e2a2b9bb-8910-4823-b2c8-6282a1262054","name":"Error Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"firstName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"lastName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"emailAddress","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"billingAddress","value":"{\"line1\":\"<string>\",\"line2\":\"<string>\",\"city\":\"<string>\",\"state\":\"<string>\",\"postal_code\":\"<string>\",\"country\":\"<string>\",\"countryCode\":\"<string>\",\"phone_number\":\"<number>\"}"},{"description":{"content":"","type":"text/plain"},"key":"company","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"lang","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"shippingAddress","value":"{\"line1\":\"<string>\",\"line2\":\"<string>\",\"city\":\"<string>\",\"state\":\"<string>\",\"postal_code\":\"<string>\",\"country\":\"<string>\",\"countryCode\":\"<string>\",\"phone_number\":\"<number>\"}"}]},"url":"https://api.paycafe.com/v1/customer/create"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"missing_field\",\n \"message\": \"Missing required field\",\n \"sub_code\": {\n  \"fieldName\": \"lastname\",\n  \"message\": \"The last name field is required.\"\n }\n}"}],"_postman_id":"c6dfb5d3-ed4c-4419-a4d9-624fd344559f"},{"name":"Get Customer Token","id":"1d2036fe-342a-4462-90c6-fa349566d0eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"emailAddress","value":"<string>","description":"<p>Required</p>\n"}]},"url":"https://api.paycafe.com/v1/customer/getToken","description":"<p>The <code>/customer/getToken</code> object allows you to retrieve the customer token from a customer account previously created using the <code>/customer/create</code> object.</p>\n","urlObject":{"protocol":"https","path":["v1","customer","getToken"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"3450adba-9254-4f54-b212-7bec8111022a","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"emailAddress","value":"<string>"}]},"url":"https://api.paycafe.com/v1/customer/getToken"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"successs\",\n \"customerToken\": \"qPPY0ekl8zTnAk6ZeBtrVypa7zG16MyN0hX89PtLon7lu6ZN2yj2PQgSpZVV\"\n}"},{"id":"e96d8dce-b73c-4203-bd2a-1d21ac7d7dc9","name":"Error Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"emailAddress","value":"<string>"}]},"url":"https://api.paycafe.com/v1/customer/getToken"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"missing_field\",\n \"message\": \"Missing required field\",\n \"sub_code\": {\n  \"fieldName\": \"emailAddress\",\n  \"message\": \"The email address field is required\"\n }\n}"}],"_postman_id":"1d2036fe-342a-4462-90c6-fa349566d0eb"},{"name":"Get Customer Details","id":"7151994b-9488-4817-ae90-417f76ee93bb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"customerToken","value":"<string>","description":"<p>Required</p>\n"}]},"url":"https://api.paycafe.com/v1/customer/getDetails","description":"<p>The <code>/customer/getDetails</code> object allows you to retrieve the customer details from a customer account previously created using the <code>/customer/create</code> object.</p>\n","urlObject":{"protocol":"https","path":["v1","customer","getDetails"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"1720104f-5ad9-44a6-baaf-acbfc4ba9bcc","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/customer/getDetails"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"success\",\n \"customerDetails\": {\n  \"customerData\": {\n   \"firstName\": \"John\",\n   \"lastName\": \"Smith\",\n   \"company\": \"PayCafe\",\n   \"emailAddress\": \"customer@paycafe.com\",\n   \"phone_country_code\": \"1-US\",\n   \"status\": \"active\"\n  },\n  \"billingAddress\": {\n   \"line1\": \"13254 Fake St ste 200\",\n   \"line2\": \"unit 200\",\n   \"city\": \"Sherman Oaks\",\n   \"state\": \"CA\",\n   \"postal_code\": \"91403\",\n   \"country\": \"US\",\n   \"phone_country_code\": \"1-US\",\n   \"phone_number\": 8185551212\n  },\n  \"shippingAddress\": {\n   \"line1\": \"13254 Fake St ste 200\",\n   \"line2\": \"unit 200\",\n   \"city\": \"Sherman Oaks\",\n   \"state\": \"CA\",\n   \"postal_code\": \"91403\",\n   \"country\": \"US\",\n   \"phone_country_code\": \"1-US\",\n   \"phone_number\": 8185551212\n  }\n }\n}"},{"id":"bf6e9dc6-522a-47d3-957d-45373c120a41","name":"Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/customer/getDetails"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"invalid_customer_token\",\n \"message\": \"Invalid Customer Token\"\n}"}],"_postman_id":"7151994b-9488-4817-ae90-417f76ee93bb"},{"name":"Save Card","id":"5da47098-84a2-4597-adfa-a64eb7689d3a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"cardNumber","value":"<long>","description":"<p>Required</p>\n"},{"key":"expMonth","value":"<integer>","description":"<p>Required</p>\n<ul>\n<li>2 Digit Month with leading zeros - For example: '04' for April</li>\n</ul>"},{"key":"expYear","value":"<integer>","description":"<ul>\n<li>4 Digit Year - For example: '2020'</li>\n</ul>"},{"key":"cvv","value":"<integer>","description":"<p>Required</p>\n"},{"key":"customerToken","value":"<string>","description":"<p>Required</p>\n"}]},"url":"https://api.paycafe.com/v1/customer/saveCard","description":"<p>The <code>/customer/saveCard</code> object allows you to save payment (credit card) details to a customer account previously created using the <code>/customer/create</code> object.  </p>\n<p>In order to use this action, you are required to be PCI-compliant.  For details, please visit the PCI Security Standards Council website at <a href=\"https://www.pcisecuritystandards.org/\">https://www.pcisecuritystandards.org/</a>.  If you would like to assess your own payment security, please take the PCI Self Assessment Test at <a href=\"https://www.pcisecuritystandards.org/pci_security/completing_self_assessment\">https://www.pcisecuritystandards.org/pci_security/completing_self_assessment</a>.</p>\n<p><b>If you prefer to have PayCafe manage your credit card compliance, you may choose to use our credit card iFrame.  For details, please contact PayCafe support at <a href=\"mailto:support@paycafe.com\">support@paycafe.com</a>.</b></p>\n","urlObject":{"protocol":"https","path":["v1","customer","saveCard"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"7ef20cad-85a9-4a69-8996-292c5aa321f6","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardNumber","value":"<long>"},{"description":{"content":"","type":"text/plain"},"key":"expMonth","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"expYear","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"cvv","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/customer/saveCard"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"successs\",\n \"cardToken\": \"4cdf5aa5d156796e9a98c738ddec69923738444f5384b27c7ece0221791a90c8\"\n}"},{"id":"e5765a98-5c31-4a0b-bc85-46b33b5b29b5","name":"Error Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardNumber","value":"<long>"},{"description":{"content":"","type":"text/plain"},"key":"expMonth","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"expYear","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"cvv","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/customer/saveCard"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"invalid_card_num\",\n \"message\": \"Invalid Card Number\"\n}"}],"_postman_id":"5da47098-84a2-4597-adfa-a64eb7689d3a"}],"id":"7b58b211-31ea-4058-890d-a46b44450f40","description":"<p>Customer objects allow you to perform customer related functions. The API allows you to create new customers, get customer token(s), get customer details, and save credit card details to your customers. You can retrieve individual customers as well.</p>\n","event":[{"listen":"prerequest","script":{"id":"eebd150d-321b-426a-8816-f314b1d803df","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a7587368-12cc-42ba-ba7e-b0dc81a76890","type":"text/javascript","exec":[""]}}],"_postman_id":"7b58b211-31ea-4058-890d-a46b44450f40"},{"name":"Charge","item":[{"name":"Create Charge","id":"65629efa-5c60-408a-b9a5-ad7501c6cfb4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"cardToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"customerToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"amount","value":"<float>","description":"<p>Required</p>\n<ul>\n<li>Amount being charged in USD without currency symbol. E.g. 100.50.</li>\n</ul>"},{"key":"description","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>Short description of the product or service being sold. E.g. \"Premium Widget\".</li></ul>"},{"key":"salesPageURL","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>Fully qualified URL to the page advertising or selling the product or service</li>\n</ul>"},{"key":"payoutAffiliateID","value":"<integer>","description":"<p>Optional</p>\n<ul>\n<li>This field allows for affiliate tracking and/or payments.  Contact PayCafe for additional details</li>\n</ul>\n"},{"key":"affiliatePayoutType","value":"<string>","description":"<p>Optional</p>\n<ul>\n<li>This field allows for affiliate tracking and/or payments.  Contact PayCafe for additional details</li>\n</ul>"},{"key":"affiliatePayoutAmount","value":"<number>","description":"<p>Optional</p>\n<ul>\n<li>This field allows for affiliate tracking and/or payments.  Contact PayCafe for additional details</li>\n</ul>"}]},"url":"https://api.paycafe.com/v1/charge/create","description":"<p>To charge a credit or a debit card, you create a <code>/charge/create</code> object. Charges are identified by a unique, random ID, named the <code>trans_id</code> parameter.</p>\n<p>If you plan to send credit card details in this action, you are required to be PCI-compliant.  For details, please visit the PCI Security Standards Council website at <a href=\"https://www.pcisecuritystandards.org/\">https://www.pcisecuritystandards.org/</a>.  If you would like to assess your own payment security, please take the PCI Self Assessment Test at <a href=\"https://www.pcisecuritystandards.org/pci_security/completing_self_assessment\">https://www.pcisecuritystandards.org/pci_security/completing_self_assessment</a>.</p>\n<p><b>If you prefer to have PayCafe manage your credit card compliance, you may choose to use our credit card iFrame.  For details, please contact PayCafe support at <a href=\"mailto:support@paycafe.com\">support@paycafe.com</a>.</b></p>\n","urlObject":{"protocol":"https","path":["v1","charge","create"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"12f4ebbd-6ffe-4569-9e48-916e5b09b929","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"amount","value":"<float>"},{"description":{"content":"","type":"text/plain"},"key":"description","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"salesPageURL","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"payoutAffiliateID","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"affiliatePayoutType","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"affiliatePayoutAmount","value":"<number>"}]},"url":"https://api.paycafe.com/v1/charge/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"success\",\n \"chargeData\": {\n  \"action\": \"approved\",\n  \"trans_id\": 100000208,\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customerToken\": \"oAgGRJHGdlVS9OrCPSRGDYLpyO00HkQgx5bzcUNtH5pSYM63UqTEHcW8VAJu\",\n  \"cardToken\": \"4cdf5aa5d156796e9a98c738ddec69923738444f5384b27c7ece0221791a90c8\",\n  \"date\": \"2020-03-26T01:59:04.000Z\"\n }\n}"},{"id":"68735ba3-8266-4e6c-9288-3f2cde97d2b5","name":"Error Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"amount","value":"<float>"},{"description":{"content":"","type":"text/plain"},"key":"description","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"salesPageURL","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"payoutAffiliateID","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"affiliatePayoutType","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"affiliatePayoutAmount","value":"<number>"}]},"url":"https://api.paycafe.com/v1/charge/create"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"invalid_customer_token\",\n \"message\": \"Invalid Customer Token\"\n}"}],"_postman_id":"65629efa-5c60-408a-b9a5-ad7501c6cfb4"},{"name":"Refund Charge","id":"90b49019-c416-4c17-91de-9c2d7bf3e7b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"cardToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"amount","value":"<float>","description":"<p>Required</p>\n<ul>\n<li>Amount being charged in USD without currency symbol. E.g. 100.50.</li>\n</ul>"},{"key":"customerToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"transactionID","value":"<integer>","description":"<p>Required</p>\n"}]},"url":"https://api.paycafe.com/v1/charge/refund","description":"<p>To submit a refund to a credit or a debit card, you create a <code>/charge/refund</code> object. Charges are identified by a unique, random ID, named the <code>trans_id</code> parameter. Partial refunds are optional.</p>\n","urlObject":{"protocol":"https","path":["v1","charge","refund"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"1dedb740-6e0b-4eb0-b3da-13902e20a50c","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"amount","value":1},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"transactionID","value":"<integer>"}]},"url":"https://api.paycafe.com/v1/charge/refund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"success\",\n \"data\": {\n  \"action\": \"refund\",\n  \"trans_id\": 2479,\n  \"amount\": 22.56,\n  \"customerToken\": \"t3rvbLFkxDSdeqySg2Vz6ACGzLHsvROnPuxOtJIeq6puLC22aK8JB3oo5khl\",\n  \"cardToken\": \"e9501d61c774e55d9e09a423e99d481289be69868383fd970f50fef1242cd04a\",\n  \"date\": \"2019-12-03T19:44:54.000Z\"\n }\n}"},{"id":"c48f27b2-ede9-467d-8ba0-242568dbc9a8","name":"Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"amount","value":1},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"transactionID","value":"<integer>"}]},"url":"https://api.paycafe.com/v1/charge/refund"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"refund_failed\",\n \"message\": \"Refund Failed to Process\"\n}"}],"_postman_id":"90b49019-c416-4c17-91de-9c2d7bf3e7b3"}],"id":"02bf978f-18a1-4f96-b7e6-fae938ebef12","description":"<p>To charge a credit or a debit card, you create a <code>Charge</code> object. You can retrieve and refund individual charges as well as list all charges. Charges are identified by a unique, random ID, named the <code>trans_id</code> parameter.</p>\n","event":[{"listen":"prerequest","script":{"id":"60b5ace3-502e-4dc3-9e19-23ecf614a391","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"3eb1fe37-def7-44dd-838f-ba10bf750d25","type":"text/javascript","exec":[""]}}],"_postman_id":"02bf978f-18a1-4f96-b7e6-fae938ebef12"},{"name":"Merchant","item":[{"name":"Create Merchant","id":"cc0b72c4-0310-4ed7-9372-b927d3ae03e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"partnerToken","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>partnerToken is assigned by PayCafe.</li>\n</ul>"},{"key":"firstName","value":"<string>","description":"<p>Required\nRequired</p>\n<ul>\n<li>First name of the new merchant</li>\n</ul>"},{"key":"lastName","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>Last name of the new merchant</li>\n</ul>"},{"key":"emailAddress","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>Email address of the new merchant</li>\n</ul>"},{"key":"partnerID","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>partnerID is assigned by PayCafe.</li>\n</ul>"},{"key":"referralID","value":"<string>","description":"<p>Required</p>\n<ul>\n<li>referralID is assigned by PayCafe.</li>\n</ul>"},{"key":"completeText","value":"<string>","description":"<p>Optional</p>\n","type":"text"},{"key":"completeURL","value":"<string>","description":"<p>Optional</p>\n","type":"text"}]},"url":"https://api.paycafe.com/v1/merchant/create","description":"<p>As a PayCafe authorized partner, you may use the <code>/merchant/create</code> to create new merchants. The new merchants will be stored with the reference to the partner which created them.</p>\n","urlObject":{"protocol":"https","path":["v1","merchant","create"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"0a4eef0b-b40f-4c63-91dd-840bc54c98d0","name":"Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"partnerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"firstName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"lastName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"emailAddress","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"partnerID","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"referralID","value":"<string>"}]},"url":"https://api.paycafe.com/v1/merchant/create"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"invalid_token\",\n \"message\": \"Invalid Token\"\n}"},{"id":"7b04844f-25aa-4d10-8392-e57ed8f4069e","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"partnerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"firstName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"lastName","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"emailAddress","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"partnerID","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"referralID","value":"<string>"}]},"url":"https://api.paycafe.com/v1/merchant/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"success\",\n \"status\": \"new\",\n \"merchantToken\": \"LPcvgvx7QDfaFLrARNbymogohWkh9Appm8iJ4OvCH3CtimnPzkzrHrnqRteH\",\n \"merchantPublicToken\": \"utAlCqxMPD90P9WMuSsOFaXxGRbvZbwj7KZmEgsb3HHfWvCjyy0nIww6saSW\",\n \"signupURL\": \"https://merchant.paycafe.com/signup/thpjeWFfg6uWUIyyPOg2Gus12IBLX2YSob5Uxa48Rgo83umQoR4ASyLHj5He\"\n}"}],"_postman_id":"cc0b72c4-0310-4ed7-9372-b927d3ae03e8"},{"name":"Merchant Status","id":"9ac9cc36-f90e-49a7-a57a-0ac87f3b9561","request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"partnerToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"merchantToken","value":"<string>","description":"<p>Optional</p>\n<ul>\n<li>You may supply the merchant email address used during /merchant/create object if you do not have the merchantToken</li>\n</ul>"}]},"url":"https://api.paycafe.com/v1/merchant/status","description":"<p>As a PayCafe authorized partner, you may use the <code>/merchant/status</code> to view the status of any merchant you created.</p>\n","urlObject":{"protocol":"https","path":["v1","merchant","status"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"3d38bed4-65ae-4672-8aee-07dcadb21185","name":"Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"partnerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/merchant/status"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"invalid_token\",\n \"message\": \"Invalid Token\"\n}"},{"id":"c25893f5-bff3-455b-9d52-41ce37350760","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"partnerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/merchant/status"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"success\",\n \"merchantToken\": \"LPcvgvx7QDfaFLrARNbymogohWkh9Appm8iJ4OvCH3CtimnPzkzrHrnqRteH\",\n \"merchantPublicToken\": \"utAlCqxMPD90P9WMuSsOFaXxGRbvZbwj7KZmEgsb3HHfWvCjyy0nIww6saSW\"\n}"}],"_postman_id":"9ac9cc36-f90e-49a7-a57a-0ac87f3b9561"}],"id":"7abf1536-9556-47e2-abeb-66794baa1e70","description":"<p>If you are an authorized PayCafe partner, you may use the <code>/merchant</code> objects to create new merchants and interact with existing merchants.  The new merchants will be stored with the reference to the partner which created them.</p>\n<p>If you are interested in becoming a PayCafe Authorized Partner, please contact <a href=\"mailto:sales@paycafe.com\">sales@paycafe.com</a>.</p>\n","event":[{"listen":"prerequest","script":{"id":"3eb147b3-0b66-4823-b929-537190569b4a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"169da011-f9bd-4185-8264-a80c821411ad","type":"text/javascript","exec":[""]}}],"_postman_id":"7abf1536-9556-47e2-abeb-66794baa1e70"},{"name":"Transactions","item":[{"name":"Get Transaction Details","id":"454dd76c-21a9-48d9-a228-7ca71abb400e","request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"merchantToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"transactionID","value":"<integer>","description":"<p>Required</p>\n"},{"key":"customerToken","value":"<string>","description":"<p>Required</p>\n"},{"key":"cardToken","value":"<string>","description":"<p>Required</p>\n"}]},"url":"https://api.paycafe.com/v1/transaction/getByID","description":"<p>The <code>/transaction/getByID</code> object will allow you to retrieve details on an existing transaction.</p>\n","urlObject":{"protocol":"https","path":["v1","transaction","getByID"],"host":["api","paycafe","com"],"query":[],"variable":[]}},"response":[{"id":"06d50659-f5f9-4b5a-aaec-f0502289abcb","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"transactionID","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/transaction/getByID"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"success\",\n \"data\": {\n  \"transactionID\": 123,\n  \"transType\": \"sale\",\n  \"transStatus\": \"approved\",\n  \"transResponseCodeID\": 0,\n  \"response\": \"Success\",\n  \"currency\": \"USD\",\n  \"amountIn\": 1,\n  \"amountOut\": 0,\n  \"transTs\": \"2020-02-08 00:24:52\",\n  \"transProcessingAmount\": 0.1,\n  \"transTransactionAmount\": 1,\n  \"transReserveAmount\": 0.1,\n  \"transSalesUrl\": \"https://google.com\",\n  \"transAffiliateID\": 12354123,\n  \"transAffiliatePayoutType\": \"fixed\",\n  \"transAffiliatePayoutAmount\": 0.1\n }\n}"},{"id":"0e1408b1-49d7-42a4-91d1-c1ca1a963bd4","name":"Error Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"description":{"content":"","type":"text/plain"},"key":"merchantToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"transactionID","value":"<integer>"},{"description":{"content":"","type":"text/plain"},"key":"customerToken","value":"<string>"},{"description":{"content":"","type":"text/plain"},"key":"cardToken","value":"<string>"}]},"url":"https://api.paycafe.com/v1/transaction/getByID"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n \"responseStatus\": \"error\",\n \"error_code\": \"invalid_customer_token\",\n \"message\": \"Invalid Customer Token\"\n}"}],"_postman_id":"454dd76c-21a9-48d9-a228-7ca71abb400e"}],"id":"07d590e7-55ed-4bc4-9edf-0377729257df","description":"<p>To interact or retrieve details on an existing transaction use the <code>/transaction</code> object.</p>\n","event":[{"listen":"prerequest","script":{"id":"7b4d79df-436c-4894-ba7e-48b23fd97ad4","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5648425d-f9d6-4f1f-891a-ae0eb1ddc9f8","type":"text/javascript","exec":[""]}}],"_postman_id":"07d590e7-55ed-4bc4-9edf-0377729257df"},{"name":"Errors / Error Responses","item":[{"name":"General Errors","item":[],"id":"3ae39293-d7fa-4867-b5ad-5a65cc3d28fe","description":"<p>Error responses that apply to all PayCafe API objects.  </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_merchant_token\",\n    \"message\": \"Invalid Merchant Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<br />\n<hr />\n<br />\n\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_customer_token\",\n    \"message\": \"Invalid Customer Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<br />\n<hr />\n<br />\n\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_partner_token\",\n    \"message\": \"Invalid Partner Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"df8d15d5-ecaa-4df2-900f-7dd44fd15503","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"110ee326-0206-463d-8a54-0766c30fc120","type":"text/javascript","exec":[""]}}],"_postman_id":"3ae39293-d7fa-4867-b5ad-5a65cc3d28fe"},{"name":"Customer Errors","item":[],"id":"b8944003-da5a-4b41-9879-a85a08ffa4a3","description":"<p>The error responses in this section are related to <code>/customer</code> object requests.</p>\n<h2 id=\"create-customer\">Create Customer</h2>\n<p>Possible error responses for <code>/customer/create</code> object requests.</p>\n<h4 id=\"missing-required-parameters\">Missing required parameters</h4>\n<p>This error response will indicate that one or more required parameters have not been supplied or are incomplete.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"missing_field\",\n    \"message\": \"Missing required field\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"emailAddress\",\n            \"message\": \"The email address field is required.\"\n        },\n        {\n            \"fieldName\": \"firstName\",\n            \"message\": \"The first name field is required.\"\n        },\n        {\n            \"fieldName\": \"lastName\",\n            \"message\": \"The last name field is required.\"\n        },\n        {\n            \"fieldName\": \"billingAddress\",\n            \"message\": \"The billing address field is required.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-details\">Invalid details</h4>\n<p>You will receive this reponse when the information provided is not valid.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_details\",\n    \"message\": \"Invalid Details\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"emailAddress\",\n            \"message\": \"The email address must be a valid email address.\"\n        },\n        {\n            \"fieldName\": \"firstName\",\n            \"message\": \"The first name format is invalid.\"\n        },\n        {\n            \"fieldName\": \"lastName\",\n            \"message\": \"The last name format is invalid.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-billing-andor-shipping-address\">Invalid billing and/or shipping address</h4>\n<p>You will use the <code>sub_code</code> JSON element to determine which address is invalid.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_address\",\n    \"message\": \"Invalid Address\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"billing_phone_number\",\n            \"message\": \"The phone number format is invalid.\"\n        },\n        {\n            \"fieldName\": \"billing_line1\",\n            \"message\": \"The line1 format is invalid.\"\n        },\n        {\n            \"fieldName\": \"billing_city\",\n            \"message\": \"The city format is invalid.\"\n        },\n        {\n            \"fieldName\": \"billing_country\",\n            \"message\": \"The country format is invalid.\"\n        },\n        {\n            \"fieldName\": \"billing_state\",\n            \"message\": \"The state format is invalid.\"\n        },\n        {\n            \"fieldName\": \"billing_postal_code\",\n            \"message\": \"The postal code format is invalid.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"supplied-customer-email-address-has-been-banned\">Supplied customer email address has been banned</h4>\n<p>This could have happened due to continued abuse or other violations. These customers are permanently banned from processing any transactions for any PayCafe merchant. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"email_banned\",\n    \"message\": \"Customer Email Has Been Banned\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"customer-is-banned-due-to-disputes\">Customer is banned due to disputes</h4>\n<p>The details provided are related to a customer that has submitted multiple credit card disputes that are considered by PayCafe as abuse of the chargeback system.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"email_has_chargeback\",\n    \"message\": \"Customer has Chargeback\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"get-customer-token\">Get Customer Token</h2>\n<p>Possible error responses for <code>/customer/getToken</code> object requests.</p>\n<h4 id=\"missing-required-parameters-1\">Missing required parameters</h4>\n<p>This error response will indicate that one or more required parameters have not been supplied or are incomplete.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"missing_field\",\n    \"message\": \"Missing required field\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"emailAddress\",\n            \"message\": \"The email address field is required.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"customer-not-found\">Customer not found</h4>\n<p>The supplied parameters resulted in no customer records found.  If if you feel this is an error, please contact PayCafe support.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"customer_not_found\",\n    \"message\": \"Customer Not Found\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"get-customer-details\">Get Customer Details</h2>\n<p>Possible error responses for <code>/customer/getDetails</code> object requests.</p>\n<h4 id=\"invalid-customer-token\">Invalid customer token</h4>\n<p>The supplied customer token is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_customer_token\",\n    \"message\": \"Invalid Customer Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"save-card\">Save Card</h2>\n<p>Possible error responses for <code>/customer/saveCard</code> object requests.</p>\n<h4 id=\"invalid-card-details\">Invalid card details</h4>\n<p>You will receive this error response if any required card details are missing.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_card_data\",\n    \"message\": \"Invalid Card Data\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"cardNumber\",\n            \"message\": \"The card number must be between 12 and 19 digits.\"\n        },\n        {\n            \"fieldName\": \"expYear\",\n            \"message\": \"The exp year must be 4 digits.\"\n        },\n        {\n            \"fieldName\": \"expMonth\",\n            \"message\": \"The exp month must be 2 digits.\"\n        },\n        {\n            \"fieldName\": \"cvv\",\n            \"message\": \"The cvv must be between 3 and 4 digits.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"missing-required-parameter\">Missing required parameter</h4>\n<p>This error response will indicate that one or more required parameters have not been supplied or are incomplete.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"missing_field\",\n    \"message\": \"Missing required field\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"cardNumber\",\n            \"message\": \"The card number field is required.\"\n        },\n        {\n            \"fieldName\": \"expYear\",\n            \"message\": \"The exp year field is required.\"\n        },\n        {\n            \"fieldName\": \"expMonth\",\n            \"message\": \"The exp month field is required.\"\n        },\n        {\n            \"fieldName\": \"cvv\",\n            \"message\": \"The cvv field is required.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-customer-token-1\">Invalid customer token</h4>\n<p>The supplied customer token is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_customer_token\",\n    \"message\": \"Invalid Customer Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"credit-card-banned\">Credit card banned</h4>\n<p>You will receive this response if the credit card being submitted has been permanently blocked by PayCafe.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"card_banned\",\n    \"message\": \"Card Has Been Banned\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"3f3fb970-9f85-42a6-b428-f21d7ad7cf13","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1b6a65f3-012d-4e6f-950c-0af63c8a1399","type":"text/javascript","exec":[""]}}],"_postman_id":"b8944003-da5a-4b41-9879-a85a08ffa4a3"},{"name":"Charge Errors","item":[],"id":"057ce902-00bc-4da8-9cf5-0daa5911a3bd","description":"<p>The error responses in this section are related to <code>/charge</code> object requests.</p>\n<h2 id=\"charge-card\">Charge Card</h2>\n<p>Possible error responses for <code>/charge/create</code> object requests.</p>\n<h4 id=\"invalid-card-token\">Invalid card token</h4>\n<p>The supplied card token supplied is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_card_token\",\n    \"message\": \"Invalid Card Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-amount\">Invalid amount</h4>\n<p>The supplied charge amount is either malformed, contains currency symbols, or is not numeric.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_amount\",\n    \"message\": \"Invalid Transaction Amount\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"blocked-credit-card\">Blocked credit card</h4>\n<p>The supplied credit card has been blocked by our system for previous activities.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"card_blocked\",\n    \"message\": \"Card Has Been Blocked\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"missing-required-parameters\">Missing required parameters</h4>\n<p>This error response will indicate that one or more required parameters have not been supplied or incomplete.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"missing_field\",\n    \"message\": \"Missing required field\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"description\",\n            \"message\": \"The description field is required.\"\n        },\n        {\n            \"fieldName\": \"salesPageURL\",\n            \"message\": \"The sales page URL is required.\"\n        }.\n        {\n            \"fieldName\": \"cardToken\",\n            \"message\": \"The cardToken is required.\"\n        }.\n        {\n            \"fieldName\": \"customerToken\",\n            \"message\": \"The customerToken is required.\"\n        }.\n        {\n            \"fieldName\": \"amount\",\n            \"message\": \"The amount is required.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-sales-page-url\">Invalid sales page URL</h4>\n<p>You will recieve this error if the sale page URL was not supplied, malformed, or not accessible.  This field requires a fully qualified URL that is accessible on the Internet.  The standard structure for the sales page URL is http[s]://[domain-name].[extention]/[additional path].  For example, <a href=\"https://www.paycafe.com\">https://www.paycafe.com</a></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_sales_page_url\",\n    \"message\": \"Sales Page URL required\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"customer-token-and-card-token-mismatch\">Customer Token and Card Token mismatch</h4>\n<p>The supplied customer token is not associated credit card token.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"client_mismatch\",\n    \"message\": \"Card Token Does Not Match Client\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"credit-card-expired\">Credit card expired</h4>\n<p>The supplied credit card token is associated with a credit card that has expired.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"card_expired\",\n    \"message\": \"Card Has Expired\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"credit-limit\">Credit Limit</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"card_limit\",\n    \"message\": \"Card Has Reached Limit\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"credit-card-blocked-or-banned\">Credit card blocked or banned</h4>\n<p>The supplied credit card has been permantly blocked by PayCafe.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"card_banned\",\n    \"message\": \"Card Has Been Banned\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"amount-greater-than-limit\">Amount greater than limit</h4>\n<p>The charge amount is greater than the maximum charge amount set for the merchant.  If you wish to increase this limit, please contact <a href=\"mailto:risk@paycafe.com\">risk@paycafe.com</a>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"max_ticket\",\n    \"message\": \"Total Amount Exeeds Max Ticket Amount\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"merchant-disabled\">Merchant disabled</h4>\n<p>The merchant token is related to a merchant which is not currently active or no longer allowed process credit card payments using PayCafe services. If this merchant was previously active, you may contact PayCafe for a status update at <a href=\"mailto:risk@paycafe.com\">risk@paycafe.com</a>. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"merchant_not_active\",\n    \"message\": \"Merchant Is not active\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"charge-was-declined\">Charge was declined</h4>\n<p>The charge attempt was declined.  You may use the sub_code <code>JSON</code> element to determine the specific reason for the decline. <b>Important:</b> The response below is showing a sample of what the response could be.  The <code>sub_code</code> will respond with the sepcific decline reason.  For example, a common decline reason is 'insufficent funds'.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"charge_failed\",\n    \"message\": \"Card Charge Failed\",\n    \"sub_code\": {\n        \"fieldName\": \"cvv\",\n        \"message\": \"CVV2 No Match\"\n    }\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"refund\">Refund</h2>\n<p>Possible error responses for <code>/charge/refund</code> object requests.</p>\n<h4 id=\"invalid-credit-card-token\">Invalid credit card token</h4>\n<p>The supplied credit card token is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_card_token\",\n    \"message\": \"Invalid Card Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-customer-token\">Invalid customer token</h4>\n<p>The supplied customer token is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_customer_token\",\n    \"message\": \"Invalid Customer Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-amount-1\">Invalid amount</h4>\n<p>The supplied refund amount is either malformed, contains currency symbols, or is not numeric.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_amount\",\n    \"message\": \"Invalid Transaction Amount\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-transaction-id\">Invalid transaction ID</h4>\n<p>The supplied transaction ID is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_transaction\",\n    \"message\": \"Could not find transaction\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-refund-amount\">Invalid refund amount</h4>\n<p>The supplied refund amount is greater than the amount of the original transaction or greater than the remaining refund amount (if there was a previous partial refund).</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"refund_failed_amount\",\n    \"message\": \"Refund Amount Can Not Be More Than The Purchase Amount\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"customer-token-mismatch\">Customer token mismatch</h4>\n<p>The supplied customer token does not match the customer token assoicated with the original transaction.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"client_mismatch\",\n    \"message\": \"Provided client does not match transaction\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"credit-card-token-mismatch\">Credit card token mismatch</h4>\n<p>The supplied credit card token does not match the credit card token associated with the original transaction.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"payment_mismatch\",\n    \"message\": \"Provided payment method does not match transaction\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"refund-declined-or-failed\">Refund declined or failed</h4>\n<p>The refund was declined due to existing refunds for the transaction, chargebacks associated with the original transaction, or merchant is disabled.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"refund_failed\",\n    \"message\": \"Refund Failed to Process\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"0a5fe399-a90d-4ada-9df6-6e557e138096","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"46e16ab1-41bf-4304-80f5-1534a8e36440","type":"text/javascript","exec":[""]}}],"_postman_id":"057ce902-00bc-4da8-9cf5-0daa5911a3bd"},{"name":"Transactions Errors","item":[],"id":"7be15b16-4cf4-4325-9571-5a1668ddaa65","description":"<p>The error responses in this section are related to <code>/transaction</code> object requests.</p>\n<h2 id=\"transaction-details\">Transaction details</h2>\n<p>Possible error responses for <code>/transaction/getByID</code> object requests.</p>\n<h4 id=\"missing-required-parameters\">Missing required parameters</h4>\n<p>This error response will indicate that one or more required parameters have not been supplied or are incomplete.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"missing_field\",\n    \"message\": \"Missing required field\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"customerToken\",\n            \"message\": \"The customer token field is required.\"\n        },\n        {\n            \"fieldName\": \"cardToken\",\n            \"message\": \"The card token field is required.\"\n        },\n        {\n            \"fieldName\": \"transactionID\",\n            \"message\": \"The transaction id field is required.\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-transaction-id\">Invalid transaction ID</h4>\n<p>The supplied transaction ID could not be found or is invalid.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_transaction\",\n    \"message\": \"Could not find transaction\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n","event":[{"listen":"prerequest","script":{"id":"c0b5c18e-a6ec-4ade-a7c4-4b8b8cbed809","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5fa04f0a-6d71-4749-b990-e37aa571bc7c","type":"text/javascript","exec":[""]}}],"_postman_id":"7be15b16-4cf4-4325-9571-5a1668ddaa65"},{"name":"Merchant Errors","item":[],"id":"db6102b4-eafb-44ad-916b-4392d9cedae8","description":"<p>The error responses in this section are related to <code>/merchant</code> object requests.</p>\n<h2 id=\"create-merchant\">Create Merchant</h2>\n<p>Possible error responses for <code>/merchant/create</code> object requests.</p>\n<h4 id=\"invalid-partner-token\">Invalid partner token</h4>\n<p>The supplied partner token is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_merchant_token\",\n    \"message\": \"Invalid Merchant Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-details\">Invalid Details</h4>\n<p>The details provided are invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_details\",\n    \"message\": \"Invalid Details\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"emailAddress\",\n            \"message\": \"Field: emailAddress is invalid\"\n        },\n        {\n            \"fieldName\": \"partnerID\",\n            \"message\": \"Field: partnerID is invalid\"\n        },\n        {\n            \"fieldName\": \"firstName\",\n            \"message\": \"Field: firstName is invalid\"\n        },\n        {\n            \"fieldName\": \"lastName\",\n            \"message\": \"Field: lastName is invalid\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"missing-required-parameters\">Missing required parameters</h4>\n<p>This error response will indicate that one or more required parameters have not been supplied or incomplete.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"missing_field\",\n    \"message\": \"Missing required field\",\n    \"sub_code\": [\n        {\n            \"fieldName\": \"emailAddress\",\n            \"message\": \"The email address field is required.\"\n        },\n        {\n            \"fieldName\": \"firstName\",\n            \"message\": \"The first name field is required.\"\n        },\n        {\n            \"fieldName\": \"lastName\",\n            \"message\": \"The last name field is required.\"\n        },\n        {\n            \"fieldName\": \"partnerID\",\n            \"message\": \"Field: partnerID is required\"\n        },\n        {\n            \"fieldName\": \"referralID\",\n            \"message\": \"Field: referralID is required\"\n        }\n    ]\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h2 id=\"merchant-status\">Merchant Status</h2>\n<p>Possible error responses for <code>/merchant/status</code> object requests.</p>\n<h4 id=\"invalid-partner-token-1\">Invalid partner token</h4>\n<p>This reponse will indicate that the supplied partnerToken is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_partner_token\",\n    \"message\": \"Invalid Partner Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-merchant-token\">Invalid merchant token</h4>\n<p>The supplied merchantToken is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_merchant_token\",\n    \"message\": \"Invalid Token\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"merchant-not-found\">Merchant not found</h4>\n<p>The supplied merchantToken is invalid or malformed.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"responseStatus\": \"error\",\n    \"error_code\": \"merchant_not_found\",\n    \"message\": \"Merchant not found\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-activation-complete-url\">Invalid activation complete URL</h4>\n<p>You will recieve this error if the URL supplied in the <code>completeURL</code> parameter is invalid, incomplete or missing (if the <code>completeText</code> parameter is supplied).</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_complete_url\",\n    \"message\": \"Invalid complete URL\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /></p><hr /><br /><p></p>\n<h4 id=\"invalid-activation-complete-button-text\">Invalid activation complete button text</h4>\n<p>You will recieve this error if the text supplied in the <code>completeText</code> parameter is invalid, too short, or missing (if the <code>completeURL</code> parameter is supplied).</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n   \"responseStatus\": \"error\",\n    \"error_code\": \"invalid_complete_text\",\n    \"message\": \"Invalid complete text\",\n    \"sub_code\": \"\"\n}\n</code></pre>\n<p><br /><br /><br /></p>\n","event":[{"listen":"prerequest","script":{"id":"71cbfb14-4f5e-43eb-986d-d5e2f0acf00f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7fa90671-d6af-459c-a506-91bd2e171a0f","type":"text/javascript","exec":[""]}}],"_postman_id":"db6102b4-eafb-44ad-916b-4392d9cedae8"}],"id":"2df6bda4-2910-4976-abda-299e2a533c7a","description":"<p>PayCafe uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with PayCafe's servers or an internal issue (which is quite rare).</p>\n<p>Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.</p>\n<p><b>HTTP Status Code Summary</b></p>\n<ul>\n<li>200 - OK: Everything worked correctly.</li>\n<li>400 - Bad Request: The request was unacceptable, often due to missing a required parameter.</li>\n<li>500 - Internal Error: Something went wrong on PayCafe's side.  Please try your request again or contact PayCafe support.</li>\n</ul>\n\n<p><b>Important Note:</b> Error responses listed in this section will have a HTTP Status Code 400.</p>\n","event":[{"listen":"prerequest","script":{"id":"2601e9b8-b542-4242-bc18-b209a4661637","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"510edaed-1bd8-4f4f-8565-e837fed948d9","type":"text/javascript","exec":[""]}}],"_postman_id":"2df6bda4-2910-4976-abda-299e2a533c7a"}],"event":[{"listen":"prerequest","script":{"id":"b2be0e88-5777-4f8f-a74c-b5cfc01fdcf1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"629e566e-79bb-43e3-8f73-9cc4ca53084e","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://api.paycafe.com/v1"}]}