PageSourceSearch

https://pollen-api-delta.vercel.app/_next/static/chunks/app/docs/a…?dpl=dpl_12tKqUAwypW6Y4Amzv6YycQQ7MPQ

js pollen-api-delta.vercel.app collected 2026-10-03 07:30:44 UTC 26,989 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[51],{2668:(e,r,t)=>{"use strict";t.d(r,{CodeBlock:()=>d});var s=t(9747),n=t(3619),i=t(6812),a=t(7276),o=t(7029);function d(e){let{language:r,code:t}=e,[d,c]=(0,n.useState)(!1),l=async()=>{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),2e3)};return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("div",{className:"bg-muted flex items-center justify-between rounded-t-lg border border-b-0 px-4 py-2",children:[(0,s.jsx)("span",{className:"text-muted-foreground text-sm font-medium",children:r}),(0,s.jsx)(i.$,{variant:"ghost",size:"sm",onClick:l,className:"h-8 px-2",children:d?(0,s.jsx)(a.A,{className:"h-4 w-4"}):(0,s.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,s.jsx)("pre",{className:"bg-muted/50 overflow-x-auto rounded-b-lg border p-4",children:(0,s.jsx)("code",{className:"font-mono text-sm",children:t})})]})}},2670:(e,r,t)=>{"use strict";t.d(r,{BT:()=>c,Wu:()=>l,ZB:()=>d,Zp:()=>a,aR:()=>o});var s=t(9747),n=t(3619),i=t(7451);let a=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("bg-card text-card-foreground rounded-lg border shadow-sm",t),...n})});a.displayName="Card";let o=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",t),...n})});o.displayName="CardHeader";let d=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",t),...n})});d.displayName="CardTitle";let c=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",t),...n})});c.displayName="CardDescription";let l=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("p-6 pt-0",t),...n})});l.displayName="CardContent",n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)("div",{ref:r,className:(0,i.cn)("flex items-center p-6 pt-0",t),...n})}).displayName="CardFooter"},3699:(e,r,t)=>{Promise.resolve().then(t.bind(t,9154))},6812:(e,r,t)=>{"use strict";t.d(r,{$:()=>c});var s=t(9747),n=t(3619),i=t(6870),a=t(3707),o=t(7451);let d=(0,a.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,r)=>{let{className:t,variant:n,size:a,asChild:c=!1,...l}=e,u=c?i.DX:"button";return(0,s.jsx)(u,{className:(0,o.cn)(d({variant:n,size:a,className:t})),ref:r,...l})});c.displayName="Button"},6954:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(9944).A)("Clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]])},7029:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(9944).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},7109:(e,r,t)=>{"use strict";t.d(r,{E:()=>o});var s=t(9747);t(3619);var n=t(3707),i=t(7451);let a=(0,n.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:r,variant:t,...n}=e;return(0,s.jsx)("div",{className:(0,i.cn)(a({variant:t}),r),...n})}},7252:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(9944).A)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},7451:(e,r,t)=>{"use strict";t.d(r,{cn:()=>i});var s=t(2131),n=t(4682);function i(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return(0,n.QP)((0,s.$)(r))}},8047:(e,r,t)=>{"use strict";t.d(r,{Tabs:()=>O,TabsContent:()=>C,TabsList:()=>R,TabsTrigger:()=>A});var s=t(9747),n=t(3619),i=t(994),a=t(5774),o=t(5554),d=t(3175),c=t(6282),l=t(5987),u=t(1697),p=t(7397),m="Tabs",[f,h]=(0,a.A)(m,[o.RG]),g=(0,o.RG)(),[y,b]=f(m),x=n.forwardRef((e,r)=>{let{__scopeTabs:t,value:n,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:d,activationMode:m="automatic",...f}=e,h=(0,l.jH)(d),[g,b]=(0,u.i)({prop:n,onChange:i,defaultProp:a});return(0,s.jsx)(y,{scope:t,baseId:(0,p.B)(),value:g,onValueChange:b,orientation:o,dir:h,activationMode:m,children:(0,s.jsx)(c.sG.div,{dir:h,"data-orientation":o,...f,ref:r})})});x.displayName=m;var v="TabsList",j=n.forwardRef((e,r)=>{let{__scopeTabs:t,loop:n=!0,...i}=e,a=b(v,t),d=g(t);return(0,s.jsx)(o.bL,{asChild:!0,...d,orientation:a.orientation,dir:a.dir,loop:n,children:(0,s.jsx)(c.sG.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:r})})});j.displayName=v;var N="TabsTrigger",I=n.forwardRef((e,r)=>{let{__scopeTabs:t,value:n,disabled:a=!1,...d}=e,l=b(N,t),u=g(t),p=T(l.baseId,n),m=k(l.baseId,n),f=n===l.value;return(0,s.jsx)(o.q7,{asChild:!0,...u,focusable:!a,active:f,children:(0,s.jsx)(c.sG.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":m,"data-state":f?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:p,...d,ref:r,onMouseDown:(0,i.m)(e.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(n)}),onKeyDown:(0,i.m)(e.onKeyDown,e=>
1{[" ","Enter"].includes(e.key)&&l.onValueChange(n)}),onFocus:(0,i.m)(e.onFocus,()=>{let e="manual"!==l.activationMode;f||a||!e||l.onValueChange(n)})})})});I.displayName=N;var q="TabsContent",w=n.forwardRef((e,r)=>{let{__scopeTabs:t,value:i,forceMount:a,children:o,...l}=e,u=b(q,t),p=T(u.baseId,i),m=k(u.baseId,i),f=i===u.value,h=n.useRef(f);return n.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,s.jsx)(d.C,{present:a||f,children:t=>{let{present:n}=t;return(0,s.jsx)(c.sG.div,{"data-state":f?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!n,id:m,tabIndex:0,...l,ref:r,style:{...e.style,animationDuration:h.current?"0s":void 0},children:n&&o})}})});function T(e,r){return"".concat(e,"-trigger-").concat(r)}function k(e,r){return"".concat(e,"-content-").concat(r)}w.displayName=q;var S=t(7451);let O=x,R=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)(j,{ref:r,className:(0,S.cn)("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",t),...n})});R.displayName=j.displayName;let A=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)(I,{ref:r,className:(0,S.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",t),...n})});A.displayName=I.displayName;let C=n.forwardRef((e,r)=>{let{className:t,...n}=e;return(0,s.jsx)(w,{ref:r,className:(0,S.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",t),...n})});C.displayName=w.displayName},9154:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>m});var s=t(9747),n=t(7109),i=t(2670),a=t(8047),o=t(2668),d=t(3619),c=t(7252),l=t(6954);let u=[{method:"POST",path:"/v1/sessions",title:"Initiate a new financing session",description:"This endpoint is called by the merchant's backend using their secret API key to initiate a financing session. It creates a basket and returns a session ID for redirection.",parameters:[{name:"totalAmount",type:"number",format:"integer",required:!1,description:"Total amount to be billed the customer provided as integer in the minor currency unit (pence, cents, etc). If ommited will be automatically calcualated based on he basket."},{name:"basket",type:"array",required:!0,description:"Details of the customer's basket.",items:[{name:"name",type:"string",required:!0,description:"Name of the product."},{name:"referenceId",type:"string",required:!1,description:"ID or reference of the product used internally."},{name:"price",type:"number",format:"integer",required:!0,description:"Integer price of the product in the minor currency unit (pence, cents, etc)."},{name:"currency",type:"string",required:!0,description:"Currency of the price (e.g., 'GBP', 'USD')."},{name:"vat",type:"number",format:"float",required:!1,description:"Value Added Tax percentage."},{name:"qty",type:"integer",required:!0,description:"Quantity of the product."},{name:"discount",type:"number",format:"float",required:!1,description:"Discount applied to the product, percentage value (e.g., '10' for 10%)."}]},{name:"otherBilledItems",type:"array",required:!1,description:"Details of non product-related cost items, like shipping, discounts, fees, etc.",items:[{name:"type",type:"string",required:!0,description:"Type of additional billable item: 'tax', 'discount', or 'fee'."},{name:"name",type:"string",required:!0,description:"Name of the item."},{name:"price",type:"number",format:"integer",required:!0,description:"Integer price of the product in the minor currency unit (pence, cents, etc)."},{name:"currency",type:"string",required:!0,description:"Currency of the price (e.g., 'GBP', 'USD')."}]},{name:"customerInfo",type:"object",required:!1,description:"Optional basic customer information.",items:[{name:"referenceId",type:"string",required:!1,description:"Customer's ID or reference used internally."},{name:"email",type:"string",format:"email",required:!1,description:"Customer's email address."},{name:"phone",type:"string",required:!1,description:"Customer's phone number."},{name:"name",type:"string",required:!1,description:"Customer's full name."}]},{name:"redirectSuccessUrl",type:"string",format:"uri",required:!1,description:"The URL on the merchant's site to redirect to upon successful financing."},{name:"redirectFailureUrl",type:"string",format:"uri",required:!1,description:"The URL on the merchant's site to redirect to upon financing failure or cancellation."}],responses:{201:{description:"Session created successfully. Returns the session ID and the initial status.",example:JSON.stringify({sessionId:"a1b2c3d4-e5f6-7890-1234-567890abcdef",basketId:"b1c2d3e4-f5a6-7890-1234-567890abcdef",status:"initiated",redirectSuccessUrl:"https://merchant.com/order-success",redirectFailureUrl:"https://merchant.com/order-fail",orderId:null},null,2)},400:{description:"Invalid input provided.",example:JSON.stringify({error:{type:"invalid_request_error",message:"Missing required fields or invalid data format."}},null,2)},401:{description:"Unauthorized - invalid or missing API key.",example:JSON.stringify({error:{type:"authentication_error",message:"Invalid or expired API key."}},null,2)}},requestExample:JSON.stringify({basket:[{referenceId:"a1b2c3d4-e5f6-7890-1234-567890abcdef",name:"Fancy Shoes",price:7500,currency:"GBP",qty:1,vat:20}],otherBilledItems:[{type:"fee",name:"Shipping",price:999,currency:"GBP"}],customerInfo:{email:"[email protected]",phone:"+447123456789"},redirectSuccessUrl:"https://merchant.com/order-success",redirectFailureUrl:"https://merchant.com/order-fail"},null,2),public:!1,pubKey:!1,secretKey:!0},{method:"GET",path:"/v1/sessions/{sessionId}/status",title:"Get the status of a financing session",description:"This endpoint can be called by the merchant's frontend by session ID (can be called using publishable key) to check the real-time status of a financing session.",parameters:[{name:"sessionId",type:"string",format:"uuid",required:!0,description:"The ID of the financing session."}],responses:{200:{description:"Returns the current status of the session.",example:JSON.stringify({sessionId:"a1b2c3d4-e5f6-7890-1234-567890abcdef",basketId:"b1c2d3e4-f5a6-7890-1234-567890abcdef",status:"customer_actions_pen
1ding",redirectSuccessUrl:"https://merchant.com/order-success",redirectFailureUrl:"https://merchant.com/order-fail",orderId:"o1r2d3e4-f5g6-7890-1234-567890abcdef"},null,2)},404:{description:"Session not found.",example:JSON.stringify({error:{type:"not_found_error",message:"Session with provided ID not found."}},null,2)},401:{description:"Unauthorized - invalid or missing API key/token.",example:JSON.stringify({error:{type:"authentication_error",message:"Invalid or expired API key/token."}},null,2)}},public:!1,pubKey:!0,secretKey:!0},{method:"POST",path:"/v1/sessions/{sessionId}/settle",title:"Settle a financing session",description:"After the customer is redirected back from PollenPay UI following payment authorisation, the merchant's backend calls this endpoint to finalise the transaction. This step allows the merchant to perform final validations (such as stock checks or fraud analysis) before confirming the order. Based on the outcome, the merchant can either confirm the order as successful or mark it as failed.",public:!1,pubKey:!1,secretKey:!0,parameters:[{name:"sessionId",type:"string",format:"uuid",required:!0,description:"The ID of the financing session to settle."},{name:"status",type:"string",required:!0,description:"The final status of the order from the merchant's perspective. 'approved' will create the order, 'rejected' will terminate the session.",enum:["approved","rejected"]},{name:"reason",type:"string",required:!1,description:"A reason for the rejection. Required if the status is 'rejected'."},{name:"withOrder",type:"boolean",required:!1,description:"If true, the response will include the full order object."}],responses:{200:{description:"The settlement was processed successfully. Returns the final order details if successful, or a confirmation of failure. If withOrder is true, the full order object is returned.",example:JSON.stringify({orderId:"o1r2d3e4-f5g6-7890-1234-567890abcdef",status:"completed",message:"Order successfully created.",order:{id:"o1r2d3e4-f5g6-7890-1234-567890abcdef",shortReference:"ABCDEF12",buyer:{referenceId:"eb56e3c4-08c8-45b1-819a-eb0b5ebed50c",email:"[email protected]",phone:"+447123456789"},receipt:{basket:[{referenceId:"a1b2c3d4-e5f6-7890-1234-567890abcdef",name:"Fancy Shoes",price:7500,currency:"GBP",qty:1,vat:20}],otherBilledItems:[{type:"fee",name:"Shipping",price:999,currency:"GBP"}]},total:8500,outstanding:6375,paid:2125,currency:"GBP",purchaseDate:0x6411c600,paymentMethod:{type:"visa",last4:"4242"}}},null,2)},400:{description:"Invalid input provided, e.g., missing 'status' or missing 'reason' for failure.",example:JSON.stringify({error:{type:"invalid_request_error",message:"Missing required 'reason' field for a failed settlement."}},null,2)},401:{description:"Unauthorized - invalid or missing API key.",example:JSON.stringify({error:{type:"authentication_error",message:"Invalid or expired API key."}},null,2)},404:{description:"Session not found.",example:JSON.stringify({error:{type:"not_found_error",message:"Session with provided ID not found."}},null,2)},409:{description:"The session has already been settled and cannot be processed again.",example:JSON.stringify({error:{type:"invalid_request_error",message:"This session has already been settled."}},null,2)}},requestExample:JSON.stringify({status:"approved"},null,2)},{method:"GET",path:"/v1/events",title:"Get order events",description:"Query the latest order events for the authenticated merchant. Returns up to 3 most recent events. Optionally filter by a specific orderId using the 'order' query parameter.",parameters:[{name:"order",type:"string",format:"uuid",required:!1,description:"Optional order ID to filter events for a specific order."}],responses:{200:{description:"Returns the latest order events.",example:JSON.stringify([{orderId:"o1r2d3e4-f5g6-7890-1234-567890abcdef",iteration:2,createdAt:0x64131780,type:"payment_success",outstanding:"6375",paymentId:"p1a2y3m4-e5n6-7890-1234-567890abcdef",extras:{}},{orderId:"o1r2d3e4-f5g6-7890-1234-567890abcdef",iteration:1,createdAt:0x6411c600,type:"order_creation",outstanding:"8500",paymentId:null,extras:{}}],null,2)},401:{description:"Unauthorized - invalid or missing API key.",example:JSON.stringify({error:{type:"authentication_error",message:"Invalid or expired API key."}},null,2)},404:{description:"Order not found (when orderId is provided but doesn't belong to merchant).",example:JSON.stringify({error:{type:"not_found_error",message:"Order not found or does not belong to this merchant."}},null,2)}},public:!1,pubKey:!1,secretKey:!0},{method:"GET",path:"/v1/orders",title:"Get all orders",description:"Retrieves a list of all finalised orders.",parameters:[],responses:{200:{description:"A list of orders.",example:JSON.stringify([{id:"o1r2d3e4-f5g6-7890-1234-567890abcdef",shortReference:"ABCDEF12",buyer:{referenceId:"eb56e3c4-08c8-45b1-819a-eb0b5ebed50c",email:"[email protected]",phone:"+447123456789"},receipt:{basket:[{referenceId:"a1b2c3d4-e5f6-7890-1234-567890abcdef",name:"Fancy Shoes",price:7500,currency:"GBP",qty:1,vat:20}],otherBilledItems:[{type:"fee",name:"Shipping",price:999,currency:"GBP"}]},total:8500,outstanding:6375,paid:2125,currency:"GBP",purchaseDate:0x6411c600,paymentMethod:{type:"visa",last4:"4242"}}],null,2)}},public:!1,pubKey:!1,secretKey:!0},{method:"GET",path:"/v1/orders/{orderId}",title:"Get an order by ID",description:"Retrieves a single order by its unique identifier.",parameters:[{name:"orderId",type:"string",format:"uuid",required:!0,description:"ID of the order to retrieve."}],responses:{200:{description:"A single order.",example:JSON.stringify({id:"o1r2d3e4-f5g6-7890-1234-567890abcdef",shortReference:"ABCDEF12",buyer:{referenceId:"eb56e3c4-08c8-45b1-819a-eb0b5ebed50c",email:"[email protected]",phone:"+447123456789"},receipt:{basket:[{referenceId:"a1b2c3d4-e5f6-7890-1234-567890abcdef",name:"Fancy Shoes",price:7500,currency:"GBP",qty:1,vat:20}],otherBilledItems:[{type:"fee",name:"Shipping",price:999,currency:"GBP"}]},total:8500,outstanding:6375,paid:2125,currency:"GBP",purchaseDate:0x6411c600,paymentMethod:{type:"visa",last4:"4242"}},null,2)},404:{description:"Order not found.",example:JSON.stringify({error:{type:"not_found_error",message:"Order with provided ID not found."}},null,2)}},public:!1,pubKey:!1,secretKey:!0},{method:"POST",path:"/v1/orders/{orderId}/refund",title:"Initiate a refund for an order",description:"This endpoint allows a merchant to request a refund for specific items or the entire order. It will trigger a 'refund' order event and potentially adjust outstanding amounts.",parameters:[{name:"orderId",type:"string",format:"uuid",required:!0,description:"The ID of the order to refund."},{name:"refundItems",type:"array",required:!1,description:"List of items to be refunded.",items:[{name:"productId",type:"string",required:!1,description:"The ID of the product being refunded (if applicable)."},{name:"name",type:"string",required:!0,description:"The name of the product being refunded."},{name:"qty",type:"integer",required:!0,description:"The quantity to refund."},{name:"amount",type:"integer",required:!0,description:"The amount to refund for this item in pence."}]},{name:"totalRefundAmount",type:"integer",required:!0,description:"The total amount to be refunded for the order in pence."},{name:"reason",type:"string",required:!0,description:"Reason for the refund."}],responses:{200:{description:"Refund initiated successfully. Returns the created order event.",example:JSON.stringify({orderId:"e1f2g3h4-i5j6-7890-1234-567890abcdef",iteration:2,createdAt:0x64131780,type:"refund",outstanding:"5000",paymentId:null,revisedReceipt:{},supportTicketId:null},null,2)},400:{description:"Invalid input or refund amount exceeds order total/outstanding.",example:JSON.stringify({error:{type:"invalid_request_error",message:"Refund amount exceeds current outstanding balance."}},null,2)},404:{description:"Order not found.",example:JSON.stringify({error:{type:"not_found_error",message:"Order with provided ID not found."}},null,2)},401:{description:"Unauthorized.",example:JSON.stringify({error:{type:"authentication_error",message:"Unauthorized to perform this action."}},null,2)}},requestExample:JSON.stringify({refundItems:[{name:"Fancy Shoes",qty:1,amount:7500}],totalRefundAmount:7500,reason:"Customer returned one item."},null,2),public:!1,pubKey:!1,secretKey:!0}
1],p=e=>e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"");function m(){let[e,r]=(0,d.useState)({}),t=(0,d.useRef)({});(0,d.useEffect)(()=>{let e=window.location.hash.substring(1);if(e&&t.current[e]){var r;null===(r=t.current[e])||void 0===r||r.scrollIntoView({behavior:"smooth"})}},[]);let m=(e,t)=>{navigator.clipboard.writeText(e).then(()=>{r({[t]:!0}),setTimeout(()=>r({[t]:!1}),2e3)})};return(0,s.jsxs)("div",{className:"mx-auto max-w-7xl px-6 py-8",children:[(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h1",{className:"mb-4 text-4xl font-bold",children:"API Reference"}),(0,s.jsx)("p",{className:"text-muted-foreground text-xl",children:"Complete reference for PollenPay REST API. All requests require authentication."})]}),(0,s.jsx)("div",{className:"space-y-12",children:u.map((r,d)=>{let u=p(r.title);return(0,s.jsxs)(i.Zp,{id:u,ref:e=>t.current[u]=e,className:"scroll-mt-20 border-l-4 border-l-blue-500",children:[(0,s.jsxs)(i.aR,{children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-3",children:[(0,s.jsx)(n.E,{variant:"GET"===r.method?"secondary":"POST"===r.method?"default":"destructive",className:"font-mono ".concat("GET"===r.method?"bg-green-100 text-green-800 hover:bg-green-100":"POST"===r.method?"bg-blue-100 text-blue-800 hover:bg-blue-100":"bg-orange-100 text-orange-800 hover:bg-orange-100"),children:r.method}),(0,s.jsx)("code",{className:"font-mono text-lg",children:r.path}),r.public&&(0,s.jsx)(n.E,{variant:"outline",className:"text-xs",children:"Public"}),r.pubKey&&(0,s.jsx)(n.E,{variant:"outline",className:"text-xs",children:"Publishable Key Auth"}),r.secretKey&&(0,s.jsx)(n.E,{variant:"outline",className:"text-xs",children:"Secret Key Auth"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(i.ZB,{className:"text-2xl",children:r.title}),(0,s.jsx)("button",{onClick:()=>m("".concat(window.location.origin).concat(window.location.pathname,"#").concat(u),u),className:"rounded-md p-1.5 hover:bg-gray-100",children:e[u]?(0,s.jsx)(l.A,{className:"h-5 w-5 text-green-500"}):(0,s.jsx)(c.A,{className:"h-5 w-5 text-gray-500"})})]}),(0,s.jsx)(i.BT,{className:"text-base",children:r.description})]}),(0,s.jsx)(i.Wu,{children:(0,s.jsxs)("div",{className:"grid gap-8 lg:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-6",children:[r.parameters&&r.parameters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Parameters"}),(0,s.jsx)("div",{className:"space-y-3",children:r.parameters.map((e,r)=>(0,s.jsxs)("div",{className:"rounded-lg border p-4",children:[(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)("code",{className:"bg-muted rounded px-2 py-1 font-mono text-sm",children:e.name}),(0,s.jsx)(n.E,{variant:"outline",className:"text-xs",children:e.type}),e.required&&(0,s.jsx)(n.E,{variant:"destructive",className:"text-xs",children:"required"})]}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),e.items&&(0,s.jsxs)("div",{className:"ml-6 mt-3 space-y-2",children:[(0,s.jsx)("p",{className:"text-muted-foreground text-sm font-medium",children:"array"===e.type?"Array items contain:":"Object properties:"}),e.items.map((r,t)=>(0,s.jsxs)("div",{className:"border-muted border-l-2 py-2 pl-4",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,s.jsx)("code",{className:"bg-muted rounded px-2 py-1 font-mono text-xs",children:"array"===e.type?"".concat(e.name,"[].").concat(r.name):"".concat(e.name,".").concat(r.name)}),(0,s.jsx)(n.E,{variant:"outline",className:"text-xs",children:r.type}),r.required&&(0,s.jsx)(n.E,{variant:"destructive",className:"text-xs",children:"required"})]}),(0,s.jsx)("p",{className:"text-muted-foreground text-xs",children:r.description})]},t))]})]},r))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Responses"}),(0,s.jsxs)(a.Tabs,{defaultValue:"200",className:"w-full",children:[(0,s.jsx)(a.TabsList,{className:"grid w-full",style:{gridTemplateColumns:"repeat(".concat(Object.keys(r.responses).length,", minmax(0, 1fr))")},children:Object.keys(r.responses).map(e=>(0,s.jsx)(a.TabsTrigger,{value:e,children:e},e))}),Object.entries(r.responses).map(e=>{let[r,t]=e;return(0,s.jsx)(a.TabsContent,{value:r,children:(0,s.jsx)("div",{className:"space-y-2",children:(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:t.description})})},r)})]})]})]}),(0,s.jsxs)("div",{className:"space-y-6",children:[r.requestExample&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Request"}),(0,s.jsx)(o.CodeBlock,{language:"json",code:r.requestExample})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Response Examples"}),(0,s.jsxs)(a.Tabs,{defaultValue:"200",className:"w-full",children:[(0,s.jsx)(a.TabsList,{className:"grid w-full",style:{gridTemplateColumns:"repeat(".concat(Object.keys(r.responses).length,", minmax(0, 1fr))")},children:Object.keys(r.responses).map(e=>(0,s.jsx)(a.TabsTrigger,{value:e,children:e},e))}),Object.entries(r.responses).map(e=>{let[r,t]=e;return(0,s.jsx)(a.TabsContent,{value:r,children:t.example?(0,s.jsx)(o.CodeBlock,{language:"json",code:t.example}):(0,s.jsx)(s.Fragment,{})},r)})]})]})]})]})})]},d)})})]})}}},e=>{var r=r=>e(e.s=r);e.O(0,[888,580,148,464,358],()=>r(3699)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.