PageSourceSearch

https://atlos.io/assets/js/a26cf58e.3f674dc7.js

js atlos.io collected 2026-09-25 04:03:50 UTC 10,439 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkatlos_docs=self.webpackChunkatlos_docs||[]).push([[7449],{13020:(e,t,l)=>{l.r(t),l.d(t,{assets:()=>x,contentTitle:()=>c,default:()=>a,frontMatter:()=>d,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"api/invoice/create","title":"Create","description":"Creates a new invoice.","source":"@site/docs/api/invoice/create.md","sourceDirName":"api/invoice","slug":"/api/invoice/create","permalink":"/docs/api/invoice/create","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"docSidebar","previous":{"title":"Invoice","permalink":"/docs/category/invoice"},"next":{"title":"Cancel","permalink":"/docs/api/invoice/cancel"}}');var s=l(74848),i=l(28453),r=l(11765);const d={sidebar_position:1},c="Create",x={},h=[{value:"<ApiType>POST</ApiType> <code>Invoice/Create</code>",id:"post-invoicecreate",level:3},{value:"Input",id:"input",level:2},{value:"Output",id:"output",level:2},{value:"Example Input",id:"example-input",level:2},{value:"Example Output",id:"example-output",level:2}];function o(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"create",children:"Create"})}),"\n",(0,s.jsx)(t.p,{children:"Creates a new invoice."}),"\n",(0,s.jsxs)(t.h3,{id:"post-invoicecreate",children:[(0,s.jsx)(r.B,{color:"post",children:"POST"})," ",(0,s.jsx)(t.code,{children:"Invoice/Create"})]}),"\n",(0,s.jsx)(t.h2,{id:"input",children:"Input"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Parameter"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Required"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Default"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"MerchantId"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"yes"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"your merchant ID"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"\u2013"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"OrderId"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"any string generated by you used to track the order in your system"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"null"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"OrderAmount"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"number"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"yes"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["the order amount in ",(0,s.jsx)(t.code,{children:"orderCurrency"})]}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"\u2013"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"OrderCurrency"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"fiat order currency"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"'USD'"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"UserName"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"the user's name to use for sending the payment link"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"null"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"UserEmail"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"the user's email address to send the payment link"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"null"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"Subscription"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsxs)(t.td,{style:{textAlign:"left"},children:["contains a stringified ",(0,s.jsx)(t.code,{children:"SubscriptionItem[]"})," object (see ",(0,s.jsx)(t.a,{href:"/docs/subscriptions/advanced",children:"Advanced Subscriptions"}),")"]}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"null"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"ResetSubscription"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"boolean"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"whether or not to cancel all prior subscriptions of this user"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"true"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"Memo"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"a short description of the invoice to be displayed to the user"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"null"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"TimeExpire"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"time when to cancel invoice automatically if not paid"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"30 days from now"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"SendEmail"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"boolean"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"whether or not send the invoice and the payment link to the user by email"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"false"})})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"PostbackUrl"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"no"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"overrides the postback URL specified in settings in Merchant Panel (useful for custom plugins)"}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.code,{children:"null"})})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"output",children:"Output"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Parameter"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(t.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"Id"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"invoice ID"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.strong,{children:"PaymentLink"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:(0,s.jsx)(t.em,{children:"string"})}),(0,s.jsx)(t.td,{style:{textAlign:"left"},children:"URL of the payment link"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"example-input",children:"Example Input"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\r\n  "MerchantId": "8XOZ64KC9X",\r\n  "OrderId": "123465", \r\n  "OrderAmount": 19.95,\r\n  "OrderCurrency": "USD",\r\n  "UserName": "John Smith",\r\n  "UserEmail": "[email protected]",\r\n  "Subscription": "[{\\"amount\\":19.95,\\"unit\\":3,\\"paymentCount\\":24},{\\"amount\\":100.00,\\"unit\\":4}]",\r\n  "ResetSubscription": true,\r\n  "Memo": "This payment is for order 123465",\r\n  "TimeExpire": null,\r\n  "SendEmail": false,\r\n  "PostbackUrl": null\r\n}\n'})}),"\n",(0,s.jsx)(t.h2,{id:"example-output",children:"Example Output"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\r\n  "Id": "shE2LfDbUYlsgz",\r\n  "PaymentLink": "https://atlos.io/payment/shE2LfDbUYlsgz"\r\n}\n'})})]})}function a(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},11765:(e,t,l)=>{l.d(t,{B:()=>s});var n=l(74848);const s=e=>{let{children:t,type:l}=e;const s="get"===l?"#25c2a0":"#0060f0";return(0,n.jsx)("span",{style:{backgroundColor:s,borderRadius:"5px",color:"#fff",padding:"0.4rem 0.6rem",marginRight:"0.6rem"},children:t})}},28453:(e,t,l)=>{l.d(t,{R:()=>r,x:()=>d});var n=l(96540);const s={},i=n.createContext(s);function r(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]);

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.