[{"data":1,"prerenderedAt":1411},["ShallowReactive",2],{"header:help":3,"footer:default":67,"story:navigation\u002Fsearch:help":250,"story:help\u002Fcategories":288,"story:help\u002Farticles\u002Fcustomer-portal-api-reference":314,"no-guide:customer-portal-api-reference":59,"article:\u002Fhelp\u002Farticles\u002Fcustomer-portal-api-reference":1172,"story:contact":1194,"help:tree:13eb9523-1c84-4a80-81fc-5f2e4f11c7ed":1381,"_apollo:default":1410},{"name":4,"created_at":5,"published_at":6,"updated_at":7,"id":8,"uuid":9,"content":10,"slug":57,"full_slug":58,"sort_by_date":59,"position":60,"tag_list":61,"is_startpage":24,"parent_id":62,"meta_data":59,"group_id":63,"first_published_at":64,"release_id":59,"lang":65,"path":59,"alternates":66,"default_full_slug":59,"translated_slugs":59},"Help Center Header","2024-08-09T18:06:34.939Z","2024-10-21T21:58:39.217Z","2024-10-21T21:58:39.232Z",10082752,"3e9b88f7-c163-4657-a2f2-62532d600fad",{"_uid":11,"link":12,"badge":16,"items":17,"title":13,"buttons":50,"new_tab":24,"submenu":51,"alignment":13,"component":52,"badge_link":53,"top_menu_items":56},"e5645a1a-f991-40e8-8d67-e40ebc082b5a",{"id":13,"url":13,"linktype":14,"fieldtype":15,"cached_url":13},"","story","multilink","Help Center",[18,27,34,39,44],{"_uid":19,"link":20,"title":23,"new_tab":24,"submenu":25,"component":26},"5cbe2861-1f49-4166-97da-a4dddd8105e3",{"id":21,"url":13,"linktype":14,"fieldtype":15,"cached_url":22},"4c0a2d99-ec30-4579-8ef1-6bf5564d4839","help\u002Fcategories\u002F","Articles",false,[],"header___item",{"_uid":28,"link":29,"title":32,"new_tab":33,"component":26},"1c8edeb5-b9e9-4cb8-b1c6-c1f292f7d7cd",{"id":13,"url":30,"linktype":31,"fieldtype":15,"cached_url":30},"https:\u002F\u002Fwiki.foxycart.com\u002F","url","Documentation",true,{"_uid":35,"link":36,"title":38,"new_tab":33,"component":26},"8d7df70e-f087-4da0-b616-6f0e9a5af35c",{"id":13,"url":37,"linktype":31,"fieldtype":15,"cached_url":37},"https:\u002F\u002Fapi.foxycart.com\u002F","API Documentation",{"_uid":40,"link":41,"title":43,"new_tab":33,"component":26},"f76e7944-23d5-4652-87e4-cdae79272762",{"id":13,"url":42,"linktype":31,"fieldtype":15,"cached_url":42},"https:\u002F\u002Fstatus.foxy.io\u002F","System Status",{"_uid":45,"link":46,"title":49,"new_tab":24,"component":26},"0de16771-4c84-466c-a1da-d8568113c71f",{"id":47,"url":13,"linktype":14,"fieldtype":15,"cached_url":48},"01e4e370-f9b9-45af-8fa9-f15540699b0d","contact","Contact Us",[],[],"header",{"id":54,"url":13,"linktype":14,"fieldtype":15,"cached_url":55},"4a679eb7-662d-4ea4-a976-5a2acbf0b663","help\u002F",[],"help-header","navigation\u002Fhelp-header",null,20,[],10082747,"71b81c2e-5e09-48a1-a397-a3c72fcd344a","2022-09-21T14:50:25.655Z","default",[],{"name":68,"created_at":69,"published_at":70,"updated_at":71,"id":72,"uuid":73,"content":74,"slug":243,"full_slug":244,"sort_by_date":59,"position":245,"tag_list":246,"is_startpage":24,"parent_id":62,"meta_data":59,"group_id":247,"first_published_at":248,"release_id":59,"lang":65,"path":59,"alternates":249,"default_full_slug":59,"translated_slugs":59},"Default Footer","2024-08-09T18:06:59.024Z","2025-09-04T06:24:46.223Z","2025-09-04T06:24:46.241Z",10082753,"e59e67ac-248a-482f-84a1-53d4f318186a",{"_uid":75,"about":76,"logos":77,"socials":82,"sections":108,"component":225,"cta_title":226,"bottom_links":227,"cta_subtitle":241,"cta_button_link":242,"cta_button_text":183},"830983f5-c4c4-43c8-b150-86a5e3fa6dc8","Foxy’s hosted cart & payment page allow you to sell anything, using your existing website or platform.",[78],{"id":79,"alt":13,"name":13,"focus":13,"title":13,"filename":80,"copyright":13,"fieldtype":81},14760,"https:\u002F\u002Fa-us.storyblok.com\u002Ff\u002F1001040\u002Fx\u002F3b030847ec\u002Fb-corp.svg","asset",[83,90,96,102],{"_uid":84,"icon":85,"link":86,"name":88,"component":89},"faf0a618-ea94-42ea-9182-03be18c43216","fa-facebook",{"id":13,"url":87,"linktype":31,"fieldtype":15,"cached_url":87},"https:\u002F\u002Fwww.facebook.com\u002Ffoxycart","Facebook","footer___social",{"_uid":91,"icon":92,"link":93,"name":95,"component":89},"14309c18-7e79-423e-b375-34555bac0811","fa-instagram",{"id":13,"url":94,"linktype":31,"fieldtype":15,"cached_url":94},"https:\u002F\u002Fwww.instagram.com\u002Ffoxy_io","Instagram",{"_uid":97,"icon":98,"link":99,"name":101,"component":89},"8f7fe7cf-0dd3-4596-8334-226ea466716a","fa-linkedin",{"id":13,"url":100,"linktype":31,"fieldtype":15,"cached_url":100},"https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Ffoxycart.com","LinkedIn",{"_uid":103,"icon":104,"link":105,"name":107,"component":89},"90a675b4-dd97-40b5-be09-00a87223d4c5","fa-youtube",{"id":13,"url":106,"linktype":31,"fieldtype":15,"cached_url":106},"https:\u002F\u002Fwww.youtube.com\u002Fuser\u002Ffoxycart","Youtube",[109,139,184,206],{"_uid":110,"name":111,"items":112,"component":138},"82849945-282f-488c-b18d-a8d2252f514a","Company",[113,120,126,132],{"_uid":114,"link":115,"title":118,"new_tab":24,"component":119},"1f699ab1-938b-4d9d-9825-aabcbe6f57fe",{"id":116,"url":13,"linktype":14,"fieldtype":15,"cached_url":117},"63634293-a749-4226-9439-9f38ee6dcda0","about-us","About Us","footer___menu_items",{"_uid":121,"link":122,"title":125,"new_tab":24,"component":119},"b26b00f1-a0e7-4be2-8ab3-428b8cc841f8",{"id":123,"url":13,"linktype":14,"fieldtype":15,"cached_url":124},"26cb7c55-faed-4a77-a291-1552d4111b3e","how-foxy-works","How Foxy Works",{"_uid":127,"link":128,"title":131,"new_tab":24,"component":119},"b40c68a0-1ceb-4226-9515-6176534f61fe",{"id":129,"url":13,"linktype":14,"fieldtype":15,"cached_url":130},"dc6657d7-7f4f-4c0d-b781-e971b038ee26","for-good","Foxy For Good",{"_uid":133,"link":134,"title":137,"new_tab":24,"component":119},"3ad0c134-bef9-4fff-b891-e09f16109036",{"id":135,"url":13,"linktype":14,"fieldtype":15,"cached_url":136},"23cae210-baf4-4588-9862-d09f4f52ccd2","brand-assets","Brand Assets","footer___section",{"_uid":140,"name":141,"items":142,"component":138},"a6805fa8-ac60-47f1-b8f0-f27aded0afbe","Product",[143,149,155,161,167,173,179],{"_uid":144,"link":145,"title":148,"new_tab":24,"component":119},"b39c8a4e-2383-486f-b76a-11fbb15d8134",{"id":146,"url":13,"linktype":14,"fieldtype":15,"cached_url":147},"bb04690f-fe98-4ce6-80be-05b950f2364f","features\u002F","Features",{"_uid":150,"link":151,"title":154,"new_tab":24,"component":119},"64f8a41f-c181-433d-bc0a-fc94e71ecbf6",{"id":152,"url":13,"linktype":14,"fieldtype":15,"cached_url":153},"c450c58d-761d-48c0-a9af-0b064611689b","pricing","Pricing",{"_uid":156,"link":157,"title":160,"new_tab":24,"component":119},"6e0b287f-fd8c-4146-9e0e-0ab0b5c9ce3c",{"id":158,"url":13,"linktype":14,"fieldtype":15,"cached_url":159},"fab20ad9-e76a-4947-b709-3a6fdfa88028","blog\u002Fcategories\u002Fproduct-updates","Product Updates",{"_uid":162,"link":163,"title":166,"new_tab":24,"component":119},"47e5a074-a6b5-4f1c-8c2f-89a2ae9f83eb",{"id":164,"url":13,"linktype":14,"fieldtype":15,"cached_url":165},"d2c83612-d611-47f3-a3b4-ca7fe08540b8","changelogs\u002F","Changelogs",{"_uid":168,"link":169,"title":172,"new_tab":24,"component":119},"b5c08774-542f-4ffd-b357-c94d674488b9",{"id":170,"url":13,"linktype":14,"fieldtype":15,"cached_url":171},"08876121-0df3-4ed9-aa11-902b3e41cd02","whats-next","What's Next",{"_uid":174,"link":175,"title":178,"new_tab":24,"component":119},"9c2704ed-6d9f-43e1-9e67-c8d91c083288",{"id":176,"url":13,"linktype":14,"fieldtype":15,"cached_url":177},"056a7857-b18f-4025-8f97-91a38fc19bc8","compare\u002F","Compare",{"_uid":180,"link":181,"title":183,"new_tab":24,"component":119},"5f2db35b-674b-406a-8fa7-d246633af9fe",{"id":13,"url":182,"linktype":31,"fieldtype":15,"cached_url":182},"https:\u002F\u002Fadmin.foxy.io\u002Fsign-up","Try Foxy Free",{"_uid":185,"name":186,"items":187,"component":138},"63fa1f29-4252-4640-9922-fe310e69e54a","Security",[188,194,200],{"_uid":189,"link":190,"title":193,"new_tab":24,"component":119},"1158ddb6-9eb0-466f-8eb6-7ca2ae66c8b8",{"id":191,"url":13,"linktype":14,"fieldtype":15,"cached_url":192},"1f58fb2c-8681-4742-b6e8-09999beae9f6","security-contact","Security Contact",{"_uid":195,"link":196,"title":199,"new_tab":24,"component":119},"9a79c54a-6022-4dfd-854b-766f5e4703ba",{"id":197,"url":13,"linktype":14,"fieldtype":15,"cached_url":198},"55cbfcc3-425a-4261-8037-54e919851d2d","pci","PCI Compliance",{"_uid":201,"link":202,"title":205,"new_tab":24,"component":119},"0b85f5b6-9534-4071-b323-b39d053dd4d7",{"id":203,"url":13,"linktype":14,"fieldtype":15,"cached_url":204},"c3ac0fe3-83e2-4879-afbd-d4c83e1590df","help\u002Farticles\u002Four-official-domains-public-code","Domains & Codebases",{"_uid":207,"name":208,"items":209,"component":138},"998ded67-d107-49f4-8154-ca6be51671ec","Support",[210,213,216,219,222],{"_uid":211,"link":212,"title":16,"new_tab":24,"component":119},"594ffd35-3049-4004-bb08-0db568ebd819",{"id":54,"url":13,"linktype":14,"fieldtype":15,"cached_url":55},{"_uid":214,"link":215,"title":32,"new_tab":33,"component":119},"0a1a55ab-a985-4f9d-8b42-26da714d0c1c",{"id":13,"url":30,"linktype":31,"fieldtype":15,"cached_url":30},{"_uid":217,"link":218,"title":38,"new_tab":33,"component":119},"61e0b7c8-aadf-419b-a339-b3ccabc65bf4",{"id":13,"url":37,"linktype":31,"fieldtype":15,"cached_url":37},{"_uid":220,"link":221,"title":43,"new_tab":33,"component":119},"fd67a89e-1c54-4d31-94b5-64be999062d6",{"id":13,"url":42,"linktype":31,"fieldtype":15,"cached_url":42},{"_uid":223,"link":224,"title":49,"new_tab":24,"component":119},"231a6f71-e996-4ad4-b033-d4d5542f34f0",{"id":47,"url":13,"linktype":14,"fieldtype":15,"cached_url":48},"footer","Get started with our *unlimited free trial*.",[228,235],{"_uid":229,"link":230,"text":233,"component":234},"f0b77210-2632-45a2-8436-e57cad84d01a",{"id":231,"url":13,"linktype":14,"fieldtype":15,"cached_url":232},"60ba16a2-c1f4-485f-b978-8d2eeeafbf5a","terms-of-service","Terms of Service","footer___bottom_links",{"_uid":236,"link":237,"text":240,"component":234},"4bd497b0-993f-4b4d-a5b7-8a49c7c8fec9",{"id":238,"url":13,"linktype":14,"fieldtype":15,"cached_url":239},"332302b9-1d18-4016-b9c8-9b33c72d782b","privacy-policy","Privacy Policy","No credit card required.",{"id":13,"url":182,"linktype":31,"fieldtype":15,"cached_url":182},"default-footer","navigation\u002Fdefault-footer",50,[],"11006268-07f9-41e9-96f3-c51fb723399d","2022-09-21T20:39:02.357Z",[],{"name":251,"created_at":252,"published_at":253,"updated_at":254,"id":255,"uuid":256,"content":257,"slug":279,"full_slug":282,"sort_by_date":59,"position":283,"tag_list":284,"is_startpage":24,"parent_id":62,"meta_data":59,"group_id":285,"first_published_at":286,"release_id":59,"lang":65,"path":59,"alternates":287,"default_full_slug":59,"translated_slugs":59},"Search","2024-10-21T22:08:54.973Z","2025-05-26T09:17:25.790Z","2025-05-26T09:17:25.804Z",13592003,"14cbc359-9ac1-4a7a-a8de-ad4ac8ef26d4",{"_uid":258,"name":251,"indices":259,"summary":13,"component":279,"primary_image":280},"5e4a56e8-76f1-4790-b3a7-70f1be97d042",[260,265,269,274],{"key":261,"_uid":262,"icon":13,"name":263,"component":264},"all","c12a3210-7323-4273-8217-5215e52efe84","All","index",{"key":266,"_uid":267,"icon":268,"name":23,"component":264},"help_center_article","5acff080-95e4-44d3-8dcf-1b19720af382","fa-file-alt",{"key":270,"_uid":271,"icon":272,"name":273,"component":264},"help_center_guide","b8fbc206-c083-471e-a1f0-0ebeb90a669d","fa-book","Guides",{"key":275,"_uid":276,"icon":277,"name":278,"component":264},"blog_post","23419e83-2e56-4c4c-8a05-9fd1b3c9a9bd","fa-file-image","Blog Posts","search",{"id":59,"alt":59,"name":13,"focus":59,"title":59,"source":59,"filename":13,"copyright":59,"fieldtype":81,"meta_data":281},{},"navigation\u002Fsearch",60,[],"11e1fd31-95cd-4fc9-b736-8b8910663e6c","2024-10-21T23:17:05.904Z",[],{"name":23,"created_at":289,"published_at":290,"updated_at":291,"id":292,"uuid":21,"content":293,"slug":307,"full_slug":22,"sort_by_date":59,"position":308,"tag_list":309,"is_startpage":33,"parent_id":310,"meta_data":59,"group_id":311,"first_published_at":312,"release_id":59,"lang":65,"path":59,"alternates":313,"default_full_slug":59,"translated_slugs":59},"2022-09-19T14:42:29.685Z","2024-07-30T18:17:22.506Z","2024-07-30T18:17:22.525Z",2660,{"_uid":294,"icon":13,"name":23,"guides":295,"pinned":24,"summary":296,"category":13,"component":297,"blog_posts":298,"content_hub":24,"icon_custom":299,"case_studies":300,"faq_sections":301,"help_articles":302,"featured_guides":303,"mailbox_category":13,"featured_articles":304,"featured_blog_posts":305,"featured_case_studies":306},"d6dae89a-907a-4bf7-82de-fe2ba875ee6e",[],"Get your questions answered with our browsable knowledge base.","help_center_category",[],{"id":59,"alt":59,"name":13,"focus":59,"title":59,"filename":13,"copyright":59,"fieldtype":81},[],[],[],[],[],[],[],"categories",530,[],2658,"19ebcdd2-027f-47f5-9a5b-a8992c959578","2022-09-19T16:24:39.219Z",[],{"name":315,"created_at":316,"published_at":317,"updated_at":318,"id":319,"uuid":320,"content":321,"slug":1165,"full_slug":1166,"sort_by_date":59,"position":1167,"tag_list":1168,"is_startpage":24,"parent_id":1169,"meta_data":59,"group_id":1170,"first_published_at":317,"release_id":59,"lang":65,"path":59,"alternates":1171,"default_full_slug":59,"translated_slugs":59},"Customer portal API reference","2026-07-16T21:54:18.321Z","2026-07-16T21:56:24.274Z","2026-07-16T21:56:24.293Z",198857762135971,"13eb9523-1c84-4a80-81fc-5f2e4f11c7ed",{"_uid":322,"body":323,"name":315,"image":1160,"pinned":24,"summary":1162,"category":1163,"component":266,"related_articles":1164},"6152ec23-6bde-471e-a885-30def72f0922",{"type":324,"content":325},"doc",[326,355,362,481,487,492,499,516,521,526,531,585,590,597,602,653,736,741,748,753,831,841,846,853,857,914,929,934,941,945,998,1009,1016,1021,1099,1104,1109],{"type":327,"attrs":328,"content":329},"paragraph",{"textAlign":59},[330,333,338,340,344,346,353],{"text":331,"type":332},"This reference covers the ","text",{"text":334,"type":332,"marks":335},"\u002Fs\u002Fcustomer",[336],{"type":337},"code",{"text":339,"type":332}," endpoints, used if you’re building your own customer portal interface instead of using the ready-to-go ",{"text":341,"type":332,"marks":342},"\u003Cfoxy-customer-portal>",[343],{"type":337},{"text":345,"type":332}," element. If you’re not sure you need this, see ",{"text":347,"type":332,"marks":348},"Add the customer portal to your website",[349],{"type":350,"attrs":351},"link",{"href":352,"uuid":59,"anchor":59,"target":59,"linktype":31},"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fadd-the-customer-portal-to-your-website",{"text":354,"type":332}," instead.",{"type":356,"attrs":357,"content":359},"heading",{"level":358,"textAlign":59},2,[360],{"text":361,"type":332},"Conventions",{"type":363,"content":364},"bullet_list",[365,386,415,436,453,470],{"type":366,"content":367},"list_item",[368],{"type":327,"attrs":369,"content":370},{"textAlign":59},[371,376,378,384],{"text":372,"type":332,"marks":373},"CORS:",[374],{"type":375},"bold",{"text":377,"type":332}," You must specify the domains your portal will run on (see ",{"text":379,"type":332,"marks":380},"Enable the customer portal",[381],{"type":350,"attrs":382},{"href":383,"uuid":59,"anchor":59,"target":59,"linktype":31},"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fenable-the-customer-portal",{"text":385,"type":332},"). This blocks certain attacks and unauthorized access, and does prevent use in very old browsers.",{"type":366,"content":387},[388],{"type":327,"attrs":389,"content":390},{"textAlign":59},[391,395,397,401,403,407,409,413],{"text":392,"type":332,"marks":393},"REST:",[394],{"type":375},{"text":396,"type":332}," ",{"text":398,"type":332,"marks":399},"GET",[400],{"type":337},{"text":402,"type":332}," retrieves data and should have no body. ",{"text":404,"type":332,"marks":405},"POST",[406],{"type":337},{"text":408,"type":332}," creates something new. ",{"text":410,"type":332,"marks":411},"PATCH",[412],{"type":337},{"text":414,"type":332}," modifies an existing thing.",{"type":366,"content":416},[417],{"type":327,"attrs":418,"content":419},{"textAlign":59},[420,424,426,429,431,434],{"text":421,"type":332,"marks":422},"Request bodies:",[423],{"type":375},{"text":425,"type":332}," For ",{"text":404,"type":332,"marks":427},[428],{"type":337},{"text":430,"type":332}," and ",{"text":410,"type":332,"marks":432},[433],{"type":337},{"text":435,"type":332},", submit a JSON object as the body.",{"type":366,"content":437},[438],{"type":327,"attrs":439,"content":440},{"textAlign":59},[441,445,447,451],{"text":442,"type":332,"marks":443},"Version header:",[444],{"type":375},{"text":446,"type":332}," Pass ",{"text":448,"type":332,"marks":449},"FOXY-API-VERSION: 1",[450],{"type":337},{"text":452,"type":332}," with every request.",{"type":366,"content":454},[455],{"type":327,"attrs":456,"content":457},{"textAlign":59},[458,462,464,468],{"text":459,"type":332,"marks":460},"Successful requests:",[461],{"type":375},{"text":463,"type":332}," A ",{"text":465,"type":332,"marks":466},"200",[467],{"type":337},{"text":469,"type":332}," status code means success, with a JSON payload.",{"type":366,"content":471},[472],{"type":327,"attrs":473,"content":474},{"textAlign":59},[475,479],{"text":476,"type":332,"marks":477},"Errors:",[478],{"type":375},{"text":480,"type":332}," Non-2XX\u002F3XX status codes, with a JSON body like:",{"type":482,"attrs":483,"content":484},"code_block",{"class":59},[485],{"text":486,"type":332},"  {\n      \"type\": \"authentication\",\n      \"code\": \"422\",\n      \"message\": \"`password` not defined or invalid.\"\n  }\n",{"type":356,"attrs":488,"content":489},{"level":358,"textAlign":59},[490],{"text":491,"type":332},"Authenticating",{"type":327,"attrs":493,"content":494},{"textAlign":59},[495],{"text":496,"type":332,"marks":497},"POST \u002Fs\u002Fcustomer\u002Fauthenticate",[498],{"type":337},{"type":327,"attrs":500,"content":501},{"textAlign":59},[502,504,508,510,514],{"text":503,"type":332},"Required fields: ",{"text":505,"type":332,"marks":506},"email",[507],{"type":337},{"text":509,"type":332},", ",{"text":511,"type":332,"marks":512},"password",[513],{"type":337},{"text":515,"type":332},".",{"type":482,"attrs":517,"content":518},{"class":59},[519],{"text":520,"type":332},"fetch('https:\u002F\u002Ffoxy-demo.foxycart.com\u002Fs\u002Fcustomer\u002Fauthenticate', {\n    method: 'POST',\n    headers: {\n        'Content-Type': 'application\u002Fjson',\n        \"FOXY-API-VERSION\": \"1\"\n    },\n    body: JSON.stringify({\n        email: 'demo@example.com',\n        password: 'demo12345'\n    })\n})\n.then(response => response.json())\n.then(data => console.log(data));\n",{"type":327,"attrs":522,"content":523},{"textAlign":59},[524],{"text":525,"type":332},"Response:",{"type":482,"attrs":527,"content":528},{"class":59},[529],{"text":530,"type":332},"{\n    \"expires_in\": 172800,\n    \"session_token\": \"cf9a7097-bc93-4ff0-8e47-986fffb4c380\",\n    \"jwt\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\"\n}\n",{"type":363,"content":532},[533,544,563],{"type":366,"content":534},[535],{"type":327,"attrs":536,"content":537},{"textAlign":59},[538,542],{"text":539,"type":332,"marks":540},"expires_in",[541],{"type":337},{"text":543,"type":332}," is the session lifetime in seconds, as configured in Foxy.",{"type":366,"content":545},[546],{"type":327,"attrs":547,"content":548},{"textAlign":59},[549,553,555,561],{"text":550,"type":332,"marks":551},"jwt",[552],{"type":337},{"text":554,"type":332}," uses HS256 (shared secret) signing. This is optional — see ",{"text":556,"type":332,"marks":557},"JWT.io",[558],{"type":350,"attrs":559},{"href":560,"uuid":59,"anchor":59,"target":59,"linktype":31},"https:\u002F\u002Fjwt.io\u002F",{"text":562,"type":332}," for details. Contact Foxy if you need a public\u002Fprivate keypair instead.",{"type":366,"content":564},[565],{"type":327,"attrs":566,"content":567},{"textAlign":59},[568,572,574,578,580,584],{"text":569,"type":332,"marks":570},"session_token",[571],{"type":337},{"text":573,"type":332}," can be used to authenticate later requests as a ",{"text":575,"type":332,"marks":576},"Bearer",[577],{"type":337},{"text":579,"type":332}," token: ",{"text":581,"type":332,"marks":582},"Authorization: Bearer cf9a7097-bc93-4ff0-8e47-986fffb4c380",[583],{"type":337},{"text":515,"type":332},{"type":356,"attrs":586,"content":587},{"level":358,"textAlign":59},[588],{"text":589,"type":332},"Retrieving a customer",{"type":327,"attrs":591,"content":592},{"textAlign":59},[593],{"text":594,"type":332,"marks":595},"GET \u002Fs\u002Fcustomer",[596],{"type":337},{"type":327,"attrs":598,"content":599},{"textAlign":59},[600],{"text":601,"type":332},"Optional parameters:",{"type":363,"content":603},[604,629],{"type":366,"content":605},[606],{"type":327,"attrs":607,"content":608},{"textAlign":59},[609,613,615,619,620,624,625],{"text":610,"type":332,"marks":611},"zoom",[612],{"type":337},{"text":614,"type":332},": ",{"text":616,"type":332,"marks":617},"default_billing_address",[618],{"type":337},{"text":509,"type":332},{"text":621,"type":332,"marks":622},"default_shipping_address",[623],{"type":337},{"text":509,"type":332},{"text":626,"type":332,"marks":627},"default_payment_method",[628],{"type":337},{"type":366,"content":630},[631],{"type":327,"attrs":632,"content":633},{"textAlign":59},[634,638,640,644,646,652],{"text":635,"type":332,"marks":636},"sso",[637],{"type":337},{"text":639,"type":332},": returns an SSO URI as ",{"text":641,"type":332,"marks":642},"_links[\"fx:checkout\"]",[643],{"type":337},{"text":645,"type":332},". See ",{"text":647,"type":332,"marks":648},"Set up SSO between the customer portal and checkout",[649],{"type":350,"attrs":650},{"href":651,"uuid":59,"anchor":59,"target":59,"linktype":31},"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fset-up-sso-between-the-customer-portal-and-checkout",{"text":515,"type":332},{"type":327,"attrs":654,"content":655},{"textAlign":59},[656,658,661,662,666,667,671,672,676,677,681,682,686,687,691,693,697,699,703,705,709,710,714,715,719,720,724,725,729,730,734],{"text":657,"type":332},"Response fields include ",{"text":505,"type":332,"marks":659},[660],{"type":337},{"text":509,"type":332},{"text":663,"type":332,"marks":664},"first_name",[665],{"type":337},{"text":509,"type":332},{"text":668,"type":332,"marks":669},"last_name",[670],{"type":337},{"text":509,"type":332},{"text":673,"type":332,"marks":674},"tax_id",[675],{"type":337},{"text":509,"type":332},{"text":678,"type":332,"marks":679},"id",[680],{"type":337},{"text":509,"type":332},{"text":683,"type":332,"marks":684},"is_anonymous",[685],{"type":337},{"text":509,"type":332},{"text":688,"type":332,"marks":689},"last_login_date",[690],{"type":337},{"text":692,"type":332},", and ",{"text":694,"type":332,"marks":695},"date_created",[696],{"type":337},{"text":698,"type":332},"\u002F",{"text":700,"type":332,"marks":701},"date_modified",[702],{"type":337},{"text":704,"type":332},", plus embedded resources like ",{"text":706,"type":332,"marks":707},"fx:attributes",[708],{"type":337},{"text":509,"type":332},{"text":711,"type":332,"marks":712},"fx:default_billing_address",[713],{"type":337},{"text":509,"type":332},{"text":716,"type":332,"marks":717},"fx:default_shipping_address",[718],{"type":337},{"text":509,"type":332},{"text":721,"type":332,"marks":722},"fx:default_payment_method",[723],{"type":337},{"text":509,"type":332},{"text":726,"type":332,"marks":727},"fx:transactions",[728],{"type":337},{"text":692,"type":332},{"text":731,"type":332,"marks":732},"fx:subscriptions",[733],{"type":337},{"text":735,"type":332}," (when zoomed).",{"type":356,"attrs":737,"content":738},{"level":358,"textAlign":59},[739],{"text":740,"type":332},"Modifying a customer",{"type":327,"attrs":742,"content":743},{"textAlign":59},[744],{"text":745,"type":332,"marks":746},"PATCH \u002Fs\u002Fcustomer",[747],{"type":337},{"type":327,"attrs":749,"content":750},{"textAlign":59},[751],{"text":752,"type":332},"Accepted values in the JSON body:",{"type":363,"content":754},[755,775,785,801],{"type":366,"content":756},[757],{"type":327,"attrs":758,"content":759},{"textAlign":59},[760,763,764,767,768,771,772],{"text":663,"type":332,"marks":761},[762],{"type":337},{"text":509,"type":332},{"text":668,"type":332,"marks":765},[766],{"type":337},{"text":509,"type":332},{"text":505,"type":332,"marks":769},[770],{"type":337},{"text":509,"type":332},{"text":673,"type":332,"marks":773},[774],{"type":337},{"type":366,"content":776},[777],{"type":327,"attrs":778,"content":779},{"textAlign":59},[780,783],{"text":511,"type":332,"marks":781},[782],{"type":337},{"text":784,"type":332},": a new password (minimum 8 characters). Enforce any complexity requirements in your own UI.",{"type":366,"content":786},[787],{"type":327,"attrs":788,"content":789},{"textAlign":59},[790,794,796,799],{"text":791,"type":332,"marks":792},"password_old",[793],{"type":337},{"text":795,"type":332},": required if ",{"text":511,"type":332,"marks":797},[798],{"type":337},{"text":800,"type":332}," is passed. Must match the current password, or a temporary password from a reset request.",{"type":366,"content":802},[803],{"type":327,"attrs":804,"content":805},{"textAlign":59},[806,810,812,815,816,819,820,823,825,829],{"text":807,"type":332,"marks":808},"_embedded",[809],{"type":337},{"text":811,"type":332},": can contain ",{"text":711,"type":332,"marks":813},[814],{"type":337},{"text":509,"type":332},{"text":716,"type":332,"marks":817},[818],{"type":337},{"text":509,"type":332},{"text":721,"type":332,"marks":821},[822],{"type":337},{"text":824,"type":332}," (must be zoomed to appear in the response). Note that ",{"text":826,"type":332,"marks":827},"cc_number",[828],{"type":337},{"text":830,"type":332}," is not updatable via the customer portal.",{"type":327,"attrs":832,"content":833},{"textAlign":59},[834,836,839],{"text":835,"type":332},"Response: matches a ",{"text":594,"type":332,"marks":837},[838],{"type":337},{"text":840,"type":332}," response.",{"type":356,"attrs":842,"content":843},{"level":358,"textAlign":59},[844],{"text":845,"type":332},"Retrieving transactions",{"type":327,"attrs":847,"content":848},{"textAlign":59},[849],{"text":850,"type":332,"marks":851},"GET \u002Fs\u002Fcustomer\u002Ftransactions",[852],{"type":337},{"type":327,"attrs":854,"content":855},{"textAlign":59},[856],{"text":601,"type":332},{"type":363,"content":858},[859,877],{"type":366,"content":860},[861],{"type":327,"attrs":862,"content":863},{"textAlign":59},[864,867,868,872,873],{"text":610,"type":332,"marks":865},[866],{"type":337},{"text":614,"type":332},{"text":869,"type":332,"marks":870},"items",[871],{"type":337},{"text":509,"type":332},{"text":874,"type":332,"marks":875},"items:item_options",[876],{"type":337},{"type":366,"content":878},[879],{"type":327,"attrs":880,"content":881},{"textAlign":59},[882,886,888,892,894,898,900,904,906,912],{"text":883,"type":332,"marks":884},"limit",[885],{"type":337},{"text":887,"type":332}," (default 10), ",{"text":889,"type":332,"marks":890},"offset",[891],{"type":337},{"text":893,"type":332}," (default 0), ",{"text":895,"type":332,"marks":896},"order",[897],{"type":337},{"text":899,"type":332}," (default ",{"text":901,"type":332,"marks":902},"transaction_date desc",[903],{"type":337},{"text":905,"type":332},") — see the ",{"text":907,"type":332,"marks":908},"API docs",[909],{"type":350,"attrs":910},{"href":911,"uuid":59,"anchor":59,"target":59,"linktype":31},"https:\u002F\u002Fapi.foxycart.com\u002Fdocs\u002Fcheat-sheet",{"text":913,"type":332}," for details",{"type":327,"attrs":915,"content":916},{"textAlign":59},[917,919,923,925,928],{"text":918,"type":332},"Returns a paginated collection of transactions, each with a ",{"text":920,"type":332,"marks":921},"fx:receipt",[922],{"type":337},{"text":924,"type":332}," link and embedded ",{"text":706,"type":332,"marks":926},[927],{"type":337},{"text":515,"type":332},{"type":356,"attrs":930,"content":931},{"level":358,"textAlign":59},[932],{"text":933,"type":332},"Retrieving & modifying subscriptions",{"type":327,"attrs":935,"content":936},{"textAlign":59},[937],{"text":938,"type":332,"marks":939},"GET \u002Fs\u002Fcustomer\u002Fsubscriptions",[940],{"type":337},{"type":327,"attrs":942,"content":943},{"textAlign":59},[944],{"text":601,"type":332},{"type":363,"content":946},[947,960],{"type":366,"content":948},[949],{"type":327,"attrs":950,"content":951},{"textAlign":59},[952,955,956],{"text":610,"type":332,"marks":953},[954],{"type":337},{"text":614,"type":332},{"text":957,"type":332,"marks":958},"transactions",[959],{"type":337},{"type":366,"content":961},[962],{"type":327,"attrs":963,"content":964},{"textAlign":59},[965,968,969,972,973,976,977,981,983,987,988,992,993,997],{"text":883,"type":332,"marks":966},[967],{"type":337},{"text":887,"type":332},{"text":889,"type":332,"marks":970},[971],{"type":337},{"text":893,"type":332},{"text":895,"type":332,"marks":974},[975],{"type":337},{"text":899,"type":332},{"text":978,"type":332,"marks":979},"next_transaction_date asc",[980],{"type":337},{"text":982,"type":332},"), ",{"text":984,"type":332,"marks":985},"is_active",[986],{"type":337},{"text":899,"type":332},{"text":989,"type":332,"marks":990},"true",[991],{"type":337},{"text":905,"type":332},{"text":907,"type":332,"marks":994},[995],{"type":350,"attrs":996},{"href":911,"uuid":59,"anchor":59,"target":59,"linktype":31},{"text":913,"type":332},{"type":327,"attrs":999,"content":1000},{"textAlign":59},[1001,1003,1007],{"text":1002,"type":332},"Each subscription includes ",{"text":1004,"type":332,"marks":1005},"_embedded.template_config.allow_next_date_modification",[1006],{"type":337},{"text":1008,"type":332},", a boolean indicating whether the customer can change the next charge date. This is returned per-subscription, though the underlying setting is store-wide.",{"type":327,"attrs":1010,"content":1011},{"textAlign":59},[1012],{"text":1013,"type":332,"marks":1014},"PATCH \u002Fs\u002Fcustomer\u002Fsubscriptions\u002FSUBSCRIPTION_ID",[1015],{"type":337},{"type":327,"attrs":1017,"content":1018},{"textAlign":59},[1019],{"text":1020,"type":332},"Pre-requisites:",{"type":363,"content":1022},[1023,1039,1086],{"type":366,"content":1024},[1025],{"type":327,"attrs":1026,"content":1027},{"textAlign":59},[1028,1032,1034,1038],{"text":1029,"type":332,"marks":1030},"Allow Next Date Modification",[1031],{"type":375},{"text":1033,"type":332}," must be enabled in the customer portal settings to modify ",{"text":1035,"type":332,"marks":1036},"next_transaction_date",[1037],{"type":337},{"text":515,"type":332},{"type":366,"content":1040},[1041],{"type":327,"attrs":1042,"content":1043},{"textAlign":59},[1044,1048,1050,1056,1058,1062,1064,1068,1070,1074,1076,1079,1080,1084],{"text":1045,"type":332,"marks":1046},"Allow Frequency Modification",[1047],{"type":375},{"text":1049,"type":332}," must be configured as a ",{"text":1051,"type":332,"marks":1052},"JSONata query",[1053],{"type":350,"attrs":1054},{"href":1055,"uuid":59,"anchor":59,"target":59,"linktype":31},"http:\u002F\u002Fdocs.jsonata.org\u002Foverview",{"text":1057,"type":332}," returning an array of allowed frequency values — for example, ",{"text":1059,"type":332,"marks":1060},"$contains(frequency, \"m\")",[1061],{"type":337},{"text":1063,"type":332}," allows ",{"text":1065,"type":332,"marks":1066},"[\"1m\",\"2m\",\"3m\",\"6m\",\"1y\"]",[1067],{"type":337},{"text":1069,"type":332},". Only frequencies in the returned array can be patched. The subscription’s ",{"text":1071,"type":332,"marks":1072},"transaction_template",[1073],{"type":337},{"text":1075,"type":332}," (with ",{"text":869,"type":332,"marks":1077},[1078],{"type":337},{"text":430,"type":332},{"text":1081,"type":332,"marks":1082},"item_options",[1083],{"type":337},{"text":1085,"type":332}," zoomed) is available to your JSONata query.",{"type":366,"content":1087},[1088],{"type":327,"attrs":1089,"content":1090},{"textAlign":59},[1091,1093,1097],{"text":1092,"type":332},"The URI is returned in ",{"text":1094,"type":332,"marks":1095},"_links.self",[1096],{"type":337},{"text":1098,"type":332}," on the subscription object.",{"type":327,"attrs":1100,"content":1101},{"textAlign":59},[1102],{"text":1103,"type":332},"Response: the updated subscription object.",{"type":356,"attrs":1105,"content":1106},{"level":358,"textAlign":59},[1107],{"text":1108,"type":332},"Notes",{"type":363,"content":1110},[1111],{"type":366,"content":1112},[1113],{"type":327,"attrs":1114,"content":1115},{"textAlign":59},[1116,1120,1122,1126,1128,1132,1134,1138,1140,1144,1146,1150,1152,1158],{"text":1117,"type":332,"marks":1118},"Loyalty points example:",[1119],{"type":375},{"text":1121,"type":332}," This API can support a homegrown loyalty points system. Roughly: process the transaction webhook to calculate points earned (for example, based on the product total minus coupons), check the transaction’s ",{"text":1123,"type":332,"marks":1124},"attributes",[1125],{"type":337},{"text":1127,"type":332}," for a ",{"text":1129,"type":332,"marks":1130},"Loyalty_Points_Applied_On",[1131],{"type":337},{"text":1133,"type":332}," flag to avoid double-counting, then update a ",{"text":1135,"type":332,"marks":1136},"Loyalty_Points",[1137],{"type":337},{"text":1139,"type":332}," customer attribute (set ",{"text":1141,"type":332,"marks":1142},"visibility",[1143],{"type":337},{"text":1145,"type":332}," to ",{"text":1147,"type":332,"marks":1148},"public",[1149],{"type":337},{"text":1151,"type":332}," so it’s readable from the portal). To let customers redeem points, have your portal front-end call your own backend, which validates the request via the session JWT, creates a coupon code for a pre-existing coupon via the ",{"text":1153,"type":332,"marks":1154},"coupon codes API",[1155],{"type":350,"attrs":1156},{"href":1157,"uuid":59,"anchor":59,"target":59,"linktype":31},"https:\u002F\u002Fapi.foxycart.com\u002Frels\u002Fcoupon_codes",{"text":1159,"type":332},", and returns it to the customer to apply. This isn’t a built-in Foxy feature — it requires custom backend code.",{"id":59,"alt":59,"name":13,"focus":59,"title":59,"source":59,"filename":13,"copyright":59,"fieldtype":81,"meta_data":1161},{},"Reference for the \u002Fs\u002Fcustomer API endpoints used to build a custom customer portal.","b4ff4108-a4b3-41f7-96cf-7df60b55fff0",[],"customer-portal-api-reference","help\u002Farticles\u002Fcustomer-portal-api-reference",-3510,[],2659,"5969f7a0-8b5d-4f3c-b6a6-bf70436ce72c",[],{"html":1173,"sections":1174,"segments":1190},"\u003Cp>This reference covers the \u003Ccode class=\"badge bg-soft-danger text-danger\">\u002Fs\u002Fcustomer\u003C\u002Fcode> endpoints, used if you’re building your own customer portal interface instead of using the ready-to-go \u003Ccode class=\"badge bg-soft-danger text-danger\">&lt;foxy-customer-portal&gt;\u003C\u002Fcode> element. If you’re not sure you need this, see \u003Ca href=\"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fadd-the-customer-portal-to-your-website\" class=\"\">Add the customer portal to your website\u003C\u002Fa> instead.\u003C\u002Fp>\u003Csection id=\"conventions\" data-title=\"Conventions\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"conventions\">Conventions\u003C\u002Fh2>\u003Cul>\u003Cli>\u003Cp>\u003Cstrong>CORS:\u003C\u002Fstrong> You must specify the domains your portal will run on (see \u003Ca href=\"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fenable-the-customer-portal\" class=\"\">Enable the customer portal\u003C\u002Fa>). This blocks certain attacks and unauthorized access, and does prevent use in very old browsers.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>REST:\u003C\u002Fstrong> \u003Ccode class=\"badge bg-soft-danger text-danger\">GET\u003C\u002Fcode> retrieves data and should have no body. \u003Ccode class=\"badge bg-soft-danger text-danger\">POST\u003C\u002Fcode> creates something new. \u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH\u003C\u002Fcode> modifies an existing thing.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Request bodies:\u003C\u002Fstrong> For \u003Ccode class=\"badge bg-soft-danger text-danger\">POST\u003C\u002Fcode> and \u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH\u003C\u002Fcode>, submit a JSON object as the body.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Version header:\u003C\u002Fstrong> Pass \u003Ccode class=\"badge bg-soft-danger text-danger\">FOXY-API-VERSION: 1\u003C\u002Fcode> with every request.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Successful requests:\u003C\u002Fstrong> A \u003Ccode class=\"badge bg-soft-danger text-danger\">200\u003C\u002Fcode> status code means success, with a JSON payload.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Errors:\u003C\u002Fstrong> Non-2XX\u002F3XX status codes, with a JSON body like:\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cdiv class=\"position-relative w-100 overflow-hidden rounded-2\" data-code-block>\u003Cdiv class=\"d-flex justify-content-end border-bottom\" style=\"background:#2b2c3b;\">\u003Cbutton type=\"button\" class=\"btn btn-link btn-sm text-light\" title=\"Copy\" data-code-button>\u003Cspan data-code-default style=\"\">\u003Ci class=\"fal fa-copy me-2\">\u003C\u002Fi> Copy \u003C\u002Fspan>\u003Cspan class=\"text-success\" data-code-success style=\"display:none;\">\u003Ci class=\"fal fa-check ms-2\">\u003C\u002Fi> Copied \u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"small\">\u003Cpre class=\"hljs p-2\" data-code-content>  {\n      &quot;type&quot;: &quot;authentication&quot;,\n      &quot;code&quot;: &quot;422&quot;,\n      &quot;message&quot;: &quot;`password` not defined or invalid.&quot;\n  }\n\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003C\u002Fsection>\u003Csection id=\"authenticating\" data-title=\"Authenticating\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"authenticating\">Authenticating\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">POST \u002Fs\u002Fcustomer\u002Fauthenticate\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Required fields: \u003Ccode class=\"badge bg-soft-danger text-danger\">email\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">password\u003C\u002Fcode>.\u003C\u002Fp>\u003Cdiv class=\"position-relative w-100 overflow-hidden rounded-2\" data-code-block>\u003Cdiv class=\"d-flex justify-content-end border-bottom\" style=\"background:#2b2c3b;\">\u003Cbutton type=\"button\" class=\"btn btn-link btn-sm text-light\" title=\"Copy\" data-code-button>\u003Cspan data-code-default style=\"\">\u003Ci class=\"fal fa-copy me-2\">\u003C\u002Fi> Copy \u003C\u002Fspan>\u003Cspan class=\"text-success\" data-code-success style=\"display:none;\">\u003Ci class=\"fal fa-check ms-2\">\u003C\u002Fi> Copied \u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"small\">\u003Cpre class=\"hljs p-2\" data-code-content>fetch(&#x27;https:\u002F\u002Ffoxy-demo.foxycart.com\u002Fs\u002Fcustomer\u002Fauthenticate&#x27;, {\n    method: &#x27;POST&#x27;,\n    headers: {\n        &#x27;Content-Type&#x27;: &#x27;application\u002Fjson&#x27;,\n        &quot;FOXY-API-VERSION&quot;: &quot;1&quot;\n    },\n    body: JSON.stringify({\n        email: &#x27;demo@example.com&#x27;,\n        password: &#x27;demo12345&#x27;\n    })\n})\n.then(response =&gt; response.json())\n.then(data =&gt; console.log(data));\n\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cp>Response:\u003C\u002Fp>\u003Cdiv class=\"position-relative w-100 overflow-hidden rounded-2\" data-code-block>\u003Cdiv class=\"d-flex justify-content-end border-bottom\" style=\"background:#2b2c3b;\">\u003Cbutton type=\"button\" class=\"btn btn-link btn-sm text-light\" title=\"Copy\" data-code-button>\u003Cspan data-code-default style=\"\">\u003Ci class=\"fal fa-copy me-2\">\u003C\u002Fi> Copy \u003C\u002Fspan>\u003Cspan class=\"text-success\" data-code-success style=\"display:none;\">\u003Ci class=\"fal fa-check ms-2\">\u003C\u002Fi> Copied \u003C\u002Fspan>\u003C\u002Fbutton>\u003C\u002Fdiv>\u003Cdiv class=\"small\">\u003Cpre class=\"hljs p-2\" data-code-content>{\n    &quot;expires_in&quot;: 172800,\n    &quot;session_token&quot;: &quot;cf9a7097-bc93-4ff0-8e47-986fffb4c380&quot;,\n    &quot;jwt&quot;: &quot;eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...&quot;\n}\n\u003C\u002Fpre>\u003C\u002Fdiv>\u003C\u002Fdiv>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">expires_in\u003C\u002Fcode> is the session lifetime in seconds, as configured in Foxy.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">jwt\u003C\u002Fcode> uses HS256 (shared secret) signing. This is optional — see \u003Ca href=\"https:\u002F\u002Fjwt.io\u002F\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">JWT.io\u003C\u002Fa> for details. Contact Foxy if you need a public\u002Fprivate keypair instead.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">session_token\u003C\u002Fcode> can be used to authenticate later requests as a \u003Ccode class=\"badge bg-soft-danger text-danger\">Bearer\u003C\u002Fcode> token: \u003Ccode class=\"badge bg-soft-danger text-danger\">Authorization: Bearer cf9a7097-bc93-4ff0-8e47-986fffb4c380\u003C\u002Fcode>.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003C\u002Fsection>\u003Csection id=\"retrieving-a-customer\" data-title=\"Retrieving a customer\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"retrieving-a-customer\">Retrieving a customer\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Optional parameters:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">zoom\u003C\u002Fcode>: \u003Ccode class=\"badge bg-soft-danger text-danger\">default_billing_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">default_shipping_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">default_payment_method\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">sso\u003C\u002Fcode>: returns an SSO URI as \u003Ccode class=\"badge bg-soft-danger text-danger\">_links[&quot;fx:checkout&quot;]\u003C\u002Fcode>. See \u003Ca href=\"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fset-up-sso-between-the-customer-portal-and-checkout\" class=\"\">Set up SSO between the customer portal and checkout\u003C\u002Fa>.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Response fields include \u003Ccode class=\"badge bg-soft-danger text-danger\">email\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">first_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">last_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">tax_id\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">id\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">is_anonymous\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">last_login_date\u003C\u002Fcode>, and \u003Ccode class=\"badge bg-soft-danger text-danger\">date_created\u003C\u002Fcode>\u002F\u003Ccode class=\"badge bg-soft-danger text-danger\">date_modified\u003C\u002Fcode>, plus embedded resources like \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:attributes\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_billing_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_shipping_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_payment_method\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:transactions\u003C\u002Fcode>, and \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:subscriptions\u003C\u002Fcode> (when zoomed).\u003C\u002Fp>\u003C\u002Fsection>\u003Csection id=\"modifying-a-customer\" data-title=\"Modifying a customer\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"modifying-a-customer\">Modifying a customer\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH \u002Fs\u002Fcustomer\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Accepted values in the JSON body:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">first_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">last_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">email\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">tax_id\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">password\u003C\u002Fcode>: a new password (minimum 8 characters). Enforce any complexity requirements in your own UI.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">password_old\u003C\u002Fcode>: required if \u003Ccode class=\"badge bg-soft-danger text-danger\">password\u003C\u002Fcode> is passed. Must match the current password, or a temporary password from a reset request.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">_embedded\u003C\u002Fcode>: can contain \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_billing_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_shipping_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_payment_method\u003C\u002Fcode> (must be zoomed to appear in the response). Note that \u003Ccode class=\"badge bg-soft-danger text-danger\">cc_number\u003C\u002Fcode> is not updatable via the customer portal.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Response: matches a \u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u003C\u002Fcode> response.\u003C\u002Fp>\u003C\u002Fsection>\u003Csection id=\"retrieving-transactions\" data-title=\"Retrieving transactions\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"retrieving-transactions\">Retrieving transactions\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u002Ftransactions\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Optional parameters:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">zoom\u003C\u002Fcode>: \u003Ccode class=\"badge bg-soft-danger text-danger\">items\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">items:item_options\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">limit\u003C\u002Fcode> (default 10), \u003Ccode class=\"badge bg-soft-danger text-danger\">offset\u003C\u002Fcode> (default 0), \u003Ccode class=\"badge bg-soft-danger text-danger\">order\u003C\u002Fcode> (default \u003Ccode class=\"badge bg-soft-danger text-danger\">transaction_date desc\u003C\u002Fcode>) — see the \u003Ca href=\"https:\u002F\u002Fapi.foxycart.com\u002Fdocs\u002Fcheat-sheet\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">API docs\u003C\u002Fa> for details\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Returns a paginated collection of transactions, each with a \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:receipt\u003C\u002Fcode> link and embedded \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:attributes\u003C\u002Fcode>.\u003C\u002Fp>\u003C\u002Fsection>\u003Csection id=\"retrieving-amp-modifying-subscriptions\" data-title=\"Retrieving &amp; modifying subscriptions\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"retrieving-amp-modifying-subscriptions\">Retrieving &amp; modifying subscriptions\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u002Fsubscriptions\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Optional parameters:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">zoom\u003C\u002Fcode>: \u003Ccode class=\"badge bg-soft-danger text-danger\">transactions\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">limit\u003C\u002Fcode> (default 10), \u003Ccode class=\"badge bg-soft-danger text-danger\">offset\u003C\u002Fcode> (default 0), \u003Ccode class=\"badge bg-soft-danger text-danger\">order\u003C\u002Fcode> (default \u003Ccode class=\"badge bg-soft-danger text-danger\">next_transaction_date asc\u003C\u002Fcode>), \u003Ccode class=\"badge bg-soft-danger text-danger\">is_active\u003C\u002Fcode> (default \u003Ccode class=\"badge bg-soft-danger text-danger\">true\u003C\u002Fcode>) — see the \u003Ca href=\"https:\u002F\u002Fapi.foxycart.com\u002Fdocs\u002Fcheat-sheet\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">API docs\u003C\u002Fa> for details\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Each subscription includes \u003Ccode class=\"badge bg-soft-danger text-danger\">_embedded.template_config.allow_next_date_modification\u003C\u002Fcode>, a boolean indicating whether the customer can change the next charge date. This is returned per-subscription, though the underlying setting is store-wide.\u003C\u002Fp>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH \u002Fs\u002Fcustomer\u002Fsubscriptions\u002FSUBSCRIPTION_ID\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Pre-requisites:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Cstrong>Allow Next Date Modification\u003C\u002Fstrong> must be enabled in the customer portal settings to modify \u003Ccode class=\"badge bg-soft-danger text-danger\">next_transaction_date\u003C\u002Fcode>.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Allow Frequency Modification\u003C\u002Fstrong> must be configured as a \u003Ca href=\"http:\u002F\u002Fdocs.jsonata.org\u002Foverview\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">JSONata query\u003C\u002Fa> returning an array of allowed frequency values — for example, \u003Ccode class=\"badge bg-soft-danger text-danger\">$contains(frequency, &quot;m&quot;)\u003C\u002Fcode> allows \u003Ccode class=\"badge bg-soft-danger text-danger\">[&quot;1m&quot;,&quot;2m&quot;,&quot;3m&quot;,&quot;6m&quot;,&quot;1y&quot;]\u003C\u002Fcode>. Only frequencies in the returned array can be patched. The subscription’s \u003Ccode class=\"badge bg-soft-danger text-danger\">transaction_template\u003C\u002Fcode> (with \u003Ccode class=\"badge bg-soft-danger text-danger\">items\u003C\u002Fcode> and \u003Ccode class=\"badge bg-soft-danger text-danger\">item_options\u003C\u002Fcode> zoomed) is available to your JSONata query.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>The URI is returned in \u003Ccode class=\"badge bg-soft-danger text-danger\">_links.self\u003C\u002Fcode> on the subscription object.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Response: the updated subscription object.\u003C\u002Fp>\u003C\u002Fsection>\u003Csection id=\"notes\" data-title=\"Notes\" data-title-node=\"H2\">\u003Chr class=\"my-8\" style=\"margin-left: -48px; margin-right: -40vw\">\u003Ch2 data-anchor-id=\"notes\">Notes\u003C\u002Fh2>\u003Cul>\u003Cli>\u003Cp>\u003Cstrong>Loyalty points example:\u003C\u002Fstrong> This API can support a homegrown loyalty points system. Roughly: process the transaction webhook to calculate points earned (for example, based on the product total minus coupons), check the transaction’s \u003Ccode class=\"badge bg-soft-danger text-danger\">attributes\u003C\u002Fcode> for a \u003Ccode class=\"badge bg-soft-danger text-danger\">Loyalty_Points_Applied_On\u003C\u002Fcode> flag to avoid double-counting, then update a \u003Ccode class=\"badge bg-soft-danger text-danger\">Loyalty_Points\u003C\u002Fcode> customer attribute (set \u003Ccode class=\"badge bg-soft-danger text-danger\">visibility\u003C\u002Fcode> to \u003Ccode class=\"badge bg-soft-danger text-danger\">public\u003C\u002Fcode> so it’s readable from the portal). To let customers redeem points, have your portal front-end call your own backend, which validates the request via the session JWT, creates a coupon code for a pre-existing coupon via the \u003Ca href=\"https:\u002F\u002Fapi.foxycart.com\u002Frels\u002Fcoupon_codes\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">coupon codes API\u003C\u002Fa>, and returns it to the customer to apply. This isn’t a built-in Foxy feature — it requires custom backend code.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003C\u002Fsection>",[1175,1178,1180,1182,1184,1186,1188],{"id":1176,"title":361,"level":1177},"conventions","H2",{"id":1179,"title":491,"level":1177},"authenticating",{"id":1181,"title":589,"level":1177},"retrieving-a-customer",{"id":1183,"title":740,"level":1177},"modifying-a-customer",{"id":1185,"title":845,"level":1177},"retrieving-transactions",{"id":1187,"title":933,"level":1177},"retrieving-amp-modifying-subscriptions",{"id":1189,"title":1108,"level":1177},"notes",[1191],{"type":1192,"content":1193},"html","\u003Cp>This reference covers the \u003Ccode class=\"badge bg-soft-danger text-danger\">\u002Fs\u002Fcustomer\u003C\u002Fcode> endpoints, used if you’re building your own customer portal interface instead of using the ready-to-go \u003Ccode class=\"badge bg-soft-danger text-danger\">&lt;foxy-customer-portal&gt;\u003C\u002Fcode> element. If you’re not sure you need this, see \u003Ca href=\"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fadd-the-customer-portal-to-your-website\" class=\"\">Add the customer portal to your website\u003C\u002Fa> instead.\u003C\u002Fp>\u003Ch2>Conventions\u003C\u002Fh2>\u003Cul>\u003Cli>\u003Cp>\u003Cstrong>CORS:\u003C\u002Fstrong> You must specify the domains your portal will run on (see \u003Ca href=\"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fenable-the-customer-portal\" class=\"\">Enable the customer portal\u003C\u002Fa>). This blocks certain attacks and unauthorized access, and does prevent use in very old browsers.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>REST:\u003C\u002Fstrong> \u003Ccode class=\"badge bg-soft-danger text-danger\">GET\u003C\u002Fcode> retrieves data and should have no body. \u003Ccode class=\"badge bg-soft-danger text-danger\">POST\u003C\u002Fcode> creates something new. \u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH\u003C\u002Fcode> modifies an existing thing.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Request bodies:\u003C\u002Fstrong> For \u003Ccode class=\"badge bg-soft-danger text-danger\">POST\u003C\u002Fcode> and \u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH\u003C\u002Fcode>, submit a JSON object as the body.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Version header:\u003C\u002Fstrong> Pass \u003Ccode class=\"badge bg-soft-danger text-danger\">FOXY-API-VERSION: 1\u003C\u002Fcode> with every request.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Successful requests:\u003C\u002Fstrong> A \u003Ccode class=\"badge bg-soft-danger text-danger\">200\u003C\u002Fcode> status code means success, with a JSON payload.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Errors:\u003C\u002Fstrong> Non-2XX\u002F3XX status codes, with a JSON body like:\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cpre>\u003Ccode>  {\n      &quot;type&quot;: &quot;authentication&quot;,\n      &quot;code&quot;: &quot;422&quot;,\n      &quot;message&quot;: &quot;`password` not defined or invalid.&quot;\n  }\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Ch2>Authenticating\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">POST \u002Fs\u002Fcustomer\u002Fauthenticate\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Required fields: \u003Ccode class=\"badge bg-soft-danger text-danger\">email\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">password\u003C\u002Fcode>.\u003C\u002Fp>\u003Cpre>\u003Ccode>fetch(&#039;https:\u002F\u002Ffoxy-demo.foxycart.com\u002Fs\u002Fcustomer\u002Fauthenticate&#039;, {\n    method: &#039;POST&#039;,\n    headers: {\n        &#039;Content-Type&#039;: &#039;application\u002Fjson&#039;,\n        &quot;FOXY-API-VERSION&quot;: &quot;1&quot;\n    },\n    body: JSON.stringify({\n        email: &#039;demo@example.com&#039;,\n        password: &#039;demo12345&#039;\n    })\n})\n.then(response =&gt; response.json())\n.then(data =&gt; console.log(data));\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>Response:\u003C\u002Fp>\u003Cpre>\u003Ccode>{\n    &quot;expires_in&quot;: 172800,\n    &quot;session_token&quot;: &quot;cf9a7097-bc93-4ff0-8e47-986fffb4c380&quot;,\n    &quot;jwt&quot;: &quot;eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...&quot;\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">expires_in\u003C\u002Fcode> is the session lifetime in seconds, as configured in Foxy.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">jwt\u003C\u002Fcode> uses HS256 (shared secret) signing. This is optional — see \u003Ca href=\"https:\u002F\u002Fjwt.io\u002F\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">JWT.io\u003C\u002Fa> for details. Contact Foxy if you need a public\u002Fprivate keypair instead.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">session_token\u003C\u002Fcode> can be used to authenticate later requests as a \u003Ccode class=\"badge bg-soft-danger text-danger\">Bearer\u003C\u002Fcode> token: \u003Ccode class=\"badge bg-soft-danger text-danger\">Authorization: Bearer cf9a7097-bc93-4ff0-8e47-986fffb4c380\u003C\u002Fcode>.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>Retrieving a customer\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Optional parameters:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">zoom\u003C\u002Fcode>: \u003Ccode class=\"badge bg-soft-danger text-danger\">default_billing_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">default_shipping_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">default_payment_method\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">sso\u003C\u002Fcode>: returns an SSO URI as \u003Ccode class=\"badge bg-soft-danger text-danger\">_links[&quot;fx:checkout&quot;]\u003C\u002Fcode>. See \u003Ca href=\"https:\u002F\u002Ffoxy.io\u002Fhelp\u002Farticles\u002Fset-up-sso-between-the-customer-portal-and-checkout\" class=\"\">Set up SSO between the customer portal and checkout\u003C\u002Fa>.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Response fields include \u003Ccode class=\"badge bg-soft-danger text-danger\">email\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">first_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">last_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">tax_id\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">id\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">is_anonymous\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">last_login_date\u003C\u002Fcode>, and \u003Ccode class=\"badge bg-soft-danger text-danger\">date_created\u003C\u002Fcode>\u002F\u003Ccode class=\"badge bg-soft-danger text-danger\">date_modified\u003C\u002Fcode>, plus embedded resources like \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:attributes\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_billing_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_shipping_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_payment_method\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:transactions\u003C\u002Fcode>, and \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:subscriptions\u003C\u002Fcode> (when zoomed).\u003C\u002Fp>\u003Ch2>Modifying a customer\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH \u002Fs\u002Fcustomer\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Accepted values in the JSON body:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">first_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">last_name\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">email\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">tax_id\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">password\u003C\u002Fcode>: a new password (minimum 8 characters). Enforce any complexity requirements in your own UI.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">password_old\u003C\u002Fcode>: required if \u003Ccode class=\"badge bg-soft-danger text-danger\">password\u003C\u002Fcode> is passed. Must match the current password, or a temporary password from a reset request.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">_embedded\u003C\u002Fcode>: can contain \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_billing_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_shipping_address\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:default_payment_method\u003C\u002Fcode> (must be zoomed to appear in the response). Note that \u003Ccode class=\"badge bg-soft-danger text-danger\">cc_number\u003C\u002Fcode> is not updatable via the customer portal.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Response: matches a \u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u003C\u002Fcode> response.\u003C\u002Fp>\u003Ch2>Retrieving transactions\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u002Ftransactions\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Optional parameters:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">zoom\u003C\u002Fcode>: \u003Ccode class=\"badge bg-soft-danger text-danger\">items\u003C\u002Fcode>, \u003Ccode class=\"badge bg-soft-danger text-danger\">items:item_options\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">limit\u003C\u002Fcode> (default 10), \u003Ccode class=\"badge bg-soft-danger text-danger\">offset\u003C\u002Fcode> (default 0), \u003Ccode class=\"badge bg-soft-danger text-danger\">order\u003C\u002Fcode> (default \u003Ccode class=\"badge bg-soft-danger text-danger\">transaction_date desc\u003C\u002Fcode>) — see the \u003Ca href=\"https:\u002F\u002Fapi.foxycart.com\u002Fdocs\u002Fcheat-sheet\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">API docs\u003C\u002Fa> for details\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Returns a paginated collection of transactions, each with a \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:receipt\u003C\u002Fcode> link and embedded \u003Ccode class=\"badge bg-soft-danger text-danger\">fx:attributes\u003C\u002Fcode>.\u003C\u002Fp>\u003Ch2>Retrieving &amp; modifying subscriptions\u003C\u002Fh2>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">GET \u002Fs\u002Fcustomer\u002Fsubscriptions\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Optional parameters:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">zoom\u003C\u002Fcode>: \u003Ccode class=\"badge bg-soft-danger text-danger\">transactions\u003C\u002Fcode>\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">limit\u003C\u002Fcode> (default 10), \u003Ccode class=\"badge bg-soft-danger text-danger\">offset\u003C\u002Fcode> (default 0), \u003Ccode class=\"badge bg-soft-danger text-danger\">order\u003C\u002Fcode> (default \u003Ccode class=\"badge bg-soft-danger text-danger\">next_transaction_date asc\u003C\u002Fcode>), \u003Ccode class=\"badge bg-soft-danger text-danger\">is_active\u003C\u002Fcode> (default \u003Ccode class=\"badge bg-soft-danger text-danger\">true\u003C\u002Fcode>) — see the \u003Ca href=\"https:\u002F\u002Fapi.foxycart.com\u002Fdocs\u002Fcheat-sheet\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">API docs\u003C\u002Fa> for details\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Each subscription includes \u003Ccode class=\"badge bg-soft-danger text-danger\">_embedded.template_config.allow_next_date_modification\u003C\u002Fcode>, a boolean indicating whether the customer can change the next charge date. This is returned per-subscription, though the underlying setting is store-wide.\u003C\u002Fp>\u003Cp>\u003Ccode class=\"badge bg-soft-danger text-danger\">PATCH \u002Fs\u002Fcustomer\u002Fsubscriptions\u002FSUBSCRIPTION_ID\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>Pre-requisites:\u003C\u002Fp>\u003Cul>\u003Cli>\u003Cp>\u003Cstrong>Allow Next Date Modification\u003C\u002Fstrong> must be enabled in the customer portal settings to modify \u003Ccode class=\"badge bg-soft-danger text-danger\">next_transaction_date\u003C\u002Fcode>.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>\u003Cstrong>Allow Frequency Modification\u003C\u002Fstrong> must be configured as a \u003Ca href=\"http:\u002F\u002Fdocs.jsonata.org\u002Foverview\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">JSONata query\u003C\u002Fa> returning an array of allowed frequency values — for example, \u003Ccode class=\"badge bg-soft-danger text-danger\">$contains(frequency, &quot;m&quot;)\u003C\u002Fcode> allows \u003Ccode class=\"badge bg-soft-danger text-danger\">[&quot;1m&quot;,&quot;2m&quot;,&quot;3m&quot;,&quot;6m&quot;,&quot;1y&quot;]\u003C\u002Fcode>. Only frequencies in the returned array can be patched. The subscription’s \u003Ccode class=\"badge bg-soft-danger text-danger\">transaction_template\u003C\u002Fcode> (with \u003Ccode class=\"badge bg-soft-danger text-danger\">items\u003C\u002Fcode> and \u003Ccode class=\"badge bg-soft-danger text-danger\">item_options\u003C\u002Fcode> zoomed) is available to your JSONata query.\u003C\u002Fp>\u003C\u002Fli>\u003Cli>\u003Cp>The URI is returned in \u003Ccode class=\"badge bg-soft-danger text-danger\">_links.self\u003C\u002Fcode> on the subscription object.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>Response: the updated subscription object.\u003C\u002Fp>\u003Ch2>Notes\u003C\u002Fh2>\u003Cul>\u003Cli>\u003Cp>\u003Cstrong>Loyalty points example:\u003C\u002Fstrong> This API can support a homegrown loyalty points system. Roughly: process the transaction webhook to calculate points earned (for example, based on the product total minus coupons), check the transaction’s \u003Ccode class=\"badge bg-soft-danger text-danger\">attributes\u003C\u002Fcode> for a \u003Ccode class=\"badge bg-soft-danger text-danger\">Loyalty_Points_Applied_On\u003C\u002Fcode> flag to avoid double-counting, then update a \u003Ccode class=\"badge bg-soft-danger text-danger\">Loyalty_Points\u003C\u002Fcode> customer attribute (set \u003Ccode class=\"badge bg-soft-danger text-danger\">visibility\u003C\u002Fcode> to \u003Ccode class=\"badge bg-soft-danger text-danger\">public\u003C\u002Fcode> so it’s readable from the portal). To let customers redeem points, have your portal front-end call your own backend, which validates the request via the session JWT, creates a coupon code for a pre-existing coupon via the \u003Ca href=\"https:\u002F\u002Fapi.foxycart.com\u002Frels\u002Fcoupon_codes\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">coupon codes API\u003C\u002Fa>, and returns it to the customer to apply. This isn’t a built-in Foxy feature — it requires custom backend code.\u003C\u002Fp>\u003C\u002Fli>\u003C\u002Ful>",{"name":1195,"created_at":1196,"published_at":1197,"updated_at":1198,"id":1199,"uuid":47,"content":1200,"slug":48,"full_slug":48,"sort_by_date":59,"position":1376,"tag_list":1377,"is_startpage":24,"parent_id":59,"meta_data":59,"group_id":1378,"first_published_at":1379,"release_id":59,"lang":65,"path":59,"alternates":1380,"default_full_slug":59,"translated_slugs":59},"Contact","2022-09-23T19:56:58.957Z","2025-05-08T18:24:40.382Z","2025-05-08T18:24:40.392Z",3138,{"seo":1201,"_uid":1204,"title":1205,"action":1206,"fields":1207,"method":404,"columns":1353,"subtitle":1367,"component":48,"button_text":1373,"submit_title":1374,"submit_subtitle":1375},{"_uid":1202,"title":1195,"plugin":1203,"description":13},"24ff7574-3bcc-48d2-85b5-e529dfea1cc4","meta-fields","8f54f1da-9d8f-49b2-89e7-840e886491cb","We're here to help.","https:\u002F\u002Fusebasin.com\u002Ff\u002F029f48d65402",[1208,1213,1216,1324,1327,1332,1347],{"_uid":1209,"name":1210,"type":332,"label":1211,"options":13,"required":33,"component":1212,"placeholder":13},"9a70b226-2036-4f90-a052-b3efa61c5896","name","Name","form___field",{"_uid":1214,"name":505,"type":505,"label":1215,"options":13,"required":33,"component":1212,"placeholder":13},"86ba35be-ff43-4a28-8633-14052a8f6622","Email Address",{"_uid":1217,"name":1218,"type":1219,"label":1220,"options":1221,"required":33,"component":1212,"conditions":1222,"placeholder":13},"3f827475-492c-4f97-aa1e-2386ac263b6c","topic","select","Topic","Presales, Support, Billing, Partnerships, Order Enquiry, Other",[1223,1278,1288,1295,1303,1311,1317],{"_uid":1224,"equals":1225,"fields":1226,"component":1277},"e21d97dd-e68e-4fa6-ba97-bc40f3041dde","Order Enquiry",[1227],{"_uid":1228,"body":1229,"type":1275,"title":13,"component":1276},"b64992bc-6d53-48b8-b7a0-d81e5a062e50",{"type":324,"content":1230},[1231],{"type":327,"content":1232},[1233,1235,1242,1244,1246,1247,1251,1253,1258,1266,1268,1273],{"text":1234,"type":332},"We are ",{"text":1236,"type":332,"marks":1237},"Foxy.io",[1238],{"type":350,"attrs":1239},{"href":1240,"uuid":59,"anchor":59,"custom":1241,"target":59,"linktype":31},"http:\u002F\u002FFoxy.io",{},{"text":1243,"type":332},", an ecommerce platform powering ecommerce for other merchants. We do not sell products, and are unable to assist with questions about order statuses or refunds for any merchants using our platform. Please contact the merchant you ordered from for assistance. If you’d like to report a store using Foxy for fraudulent practices, please select ‘other’ in the subject.",{"type":1245},"hard_break",{"type":1245},{"text":1248,"type":332,"marks":1249},"NOTE:",[1250],{"type":375},{"text":1252,"type":332}," We are ",{"text":1254,"type":332,"marks":1255},"not ",[1256],{"type":1257},"italic",{"text":1259,"type":332,"marks":1260},"Foxy.in",[1261,1265],{"type":350,"attrs":1262},{"href":1263,"uuid":59,"anchor":59,"custom":1264,"target":59,"linktype":31},"http:\u002F\u002FFoxy.in",{},{"type":1257},{"text":1267,"type":332},". We are not in any way affiliated with ",{"text":1259,"type":332,"marks":1269},[1270],{"type":350,"attrs":1271},{"href":1263,"uuid":59,"anchor":59,"custom":1272,"target":59,"linktype":31},{},{"text":1274,"type":332},", and cannot help in any way with your order from that website.","danger","global___alert","form___condition",{"_uid":1279,"equals":1280,"fields":1281,"component":1277},"8765c3e1-25cf-44aa-b8ea-fc6094acf9c3","Presales",[1282],{"_uid":1283,"name":1284,"type":1285,"label":13,"options":13,"required":24,"component":1212,"conditions":1286,"placeholder":13,"default_value":1287},"cf464f8e-d643-4f6e-af29-d3abffaf7380","department_email_address","hidden",[],"hello@foxy.io",{"_uid":1289,"equals":208,"fields":1290,"component":1277},"4007b6d8-77e5-421d-bd1e-6f336dd853fb",[1291],{"_uid":1292,"name":1284,"type":1285,"label":13,"options":13,"required":24,"component":1212,"conditions":1293,"placeholder":13,"default_value":1294},"7b4c6aa5-a68c-45e0-9ce1-0a36af10c0c2",[],"help@foxy.io",{"_uid":1296,"equals":1297,"fields":1298,"component":1277},"1dbb8f11-613d-43cd-9e09-1b94f6e19219","Billing",[1299],{"_uid":1300,"name":1284,"type":1285,"label":13,"options":13,"required":24,"component":1212,"conditions":1301,"placeholder":13,"default_value":1302},"a0ac0d1b-bc4f-4a6c-a682-581d450b0b73",[],"help+billing@foxy.io",{"_uid":1304,"equals":1305,"fields":1306,"component":1277},"a0a53a50-7172-4a29-ba58-181e38874e12","Partnerships",[1307],{"_uid":1308,"name":1284,"type":1285,"label":13,"options":13,"required":24,"component":1212,"conditions":1309,"placeholder":13,"default_value":1310},"7aa011d9-f374-4aed-b5a5-929b54aaf152",[],"partners@foxy.io",{"_uid":1312,"equals":1225,"fields":1313,"component":1277},"a4cd431f-25d5-41c7-bfdc-02c908c8fb47",[1314],{"_uid":1315,"name":1284,"type":1285,"label":13,"options":13,"required":24,"component":1212,"conditions":1316,"placeholder":13,"default_value":1287},"f5d52168-d6ae-451b-94ee-2ced1cbd28ad",[],{"_uid":1318,"equals":1319,"fields":1320,"component":1277},"25aba1ed-eb41-4bbc-aa89-f7a7167ea86e","Other",[1321],{"_uid":1322,"name":1284,"type":1285,"label":13,"options":13,"required":24,"component":1212,"conditions":1323,"placeholder":13,"default_value":1287},"f40dfaef-c203-4b71-bf4e-e1b43cef192b",[],{"_uid":1325,"component":1326},"e9c53a05-f40a-4510-aaf8-bc072a235a0c","form___subject",{"_uid":1328,"name":1329,"type":1330,"label":1331,"options":13,"required":33,"component":1212,"placeholder":13},"a4c4d385-fff4-4978-99fb-b68cfea623d6","message","textarea","Message",{"_uid":1333,"name":1334,"type":1219,"label":1335,"options":1336,"required":33,"component":1212,"conditions":1337,"placeholder":13},"8a3c9f85-f438-427d-9c7a-d7b295a14b5b","existing_user","Are you an existing user?","No, Yes",[1338],{"_uid":1339,"equals":1340,"fields":1341,"component":1277},"115933d6-262a-4b59-8fa8-579c5ad73de1","Yes",[1342],{"_uid":1343,"name":1344,"type":332,"label":1345,"options":13,"required":33,"component":1212,"conditions":1346,"placeholder":13},"44b6ff23-98f0-4e95-b7f5-c23e06415c2d","subdomain","Store Subdomain",[],{"_uid":1348,"name":1349,"type":1219,"label":1350,"options":1351,"required":33,"component":1212,"conditions":1352,"placeholder":13},"922a5cef-3af2-4113-8855-36c7910e3ee3","user_type","What type of user are you?","Developer, Designer, Merchant",[],[1354],{"_uid":1355,"text":1356,"title":1365,"component":1366},"7323b90d-a93a-4bf1-baa9-20d0b7ead61b",{"type":324,"content":1357},[1358],{"type":327,"content":1359},[1360,1362,1363],{"text":1361,"type":332},"855.369.9227",{"type":1245},{"text":1364,"type":332},"9:30am-6pm Central M-F","Pre-sales, Sales, & Partnerships","contact___footer_column",{"type":324,"content":1368},[1369],{"type":327,"content":1370},[1371],{"text":1372,"type":332},"Get in touch to get help from our friendly support team.","Submit","Success!","Your email has been received. We'll get back to you as soon as we can, but it might take a business day. If you don't hear back from us in a timely manner, please check your spam folder to ensure our reply didn't go there.",-80,[],"2fd9fb7d-a48a-4184-acfd-30022d8d6f08","2022-09-23T20:10:45.360Z",[],[288,1382],{"name":1383,"created_at":1384,"published_at":1385,"updated_at":1386,"id":1387,"uuid":1163,"content":1388,"slug":1403,"full_slug":1404,"sort_by_date":59,"position":1405,"tag_list":1406,"is_startpage":24,"parent_id":310,"meta_data":59,"group_id":1407,"first_published_at":1408,"release_id":59,"lang":65,"path":59,"alternates":1409,"default_full_slug":59,"translated_slugs":59},"Customer Portal","2023-01-19T16:18:57.721Z","2026-07-16T21:56:28.934Z","2026-07-16T21:56:28.952Z",28234,{"_uid":1389,"icon":1390,"name":1383,"type":1391,"guides":1392,"pinned":24,"summary":1393,"category":13,"component":297,"blog_posts":1394,"content_hub":24,"icon_custom":1395,"case_studies":1396,"faq_sections":1397,"help_articles":1398,"featured_guides":1399,"mailbox_category":13,"featured_articles":1400,"featured_blog_posts":1401,"featured_case_studies":1402},"6a0c718d-ad6f-47c6-bf8e-3405228bbdfa","fa-sign-in-alt","simple",[],"Allow customers to login, view order history, manage subscriptions, and more.",[],{"id":59,"alt":59,"name":13,"focus":59,"title":59,"filename":13,"copyright":59,"fieldtype":81},[],[],[],[],[],[],[],"customer-portal","help\u002Fcategories\u002Fcustomer-portal",160,[],"abeef712-f641-45ad-938e-c0d7943f4047","2023-01-24T10:16:50.938Z",[],{},1784239563731]