Orders
CREATE Order
important notes in order to allow for patients to pay with saved credit cards and/or payment plans, we need to be able to tie to a patient there are 2 ways of accomplishing this provide the patientid which is the icorepay internal patient ulid provide your patient id (` externalpatientid `) and patient date of birth ` customerdob `) externalpmspatientid this is the pms's patient identifier externalpatientid this is your identifier for the patient (can be the same as the pms's patient identifer) customerdob in yyyy mm dd format savepatient set to true to save patient info as a featherpay patient if externalpatientid exists, but is not in our db from pms, it will throw an error { "tab" "examples", "url" "https //test api featherpay io/v1/stores/{storeid}/orders", "name" "create order", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "c0f7bjpcqhajikyibqef0", "code" "{\n \\"id\\" \\"01fdtfxzz25gxzfwzzzys1tjgt\\", //need order id\n \\"deleted\\" false,\n \\"ordertype\\" \\"quote\\",\n \\"posorderid\\" \\"invoice reference id via api\\",\n \\"storeid\\" \\"01e8f3zzdj186bzfzen3v8z44w\\",\n \\"orderkey\\" \\"162hgy4r5h9rfbhmr1vz2zhw30\\", //need order key\n \\"status\\" \\"incomplete\\",\n \\"totalauthorized\\" 0,\n \\"totalcanceled\\" 0,\n \\"totalinvoiced\\" 20000,\n \\"totalpaid\\" 0,\n \\"totalrefunded\\" 0,\n \\"totaldue\\" 20000,\n \\"patientid\\" \\"01f79xzzzzc2wkbzj3xq7z1r64\\", //featherpay internal patient identifier\n \\"customeremail\\" \\"test\@gogreenfeather com\\",\n \\"customerfirstname\\" \\"terrence\\",\n \\"customerlastname\\" \\"clarke\\",\n \\"onbehalfof\\" \\"jane doe\@merchant com\\",\n \\"currencycode\\" \\"usd\\",\n \\"multipay\\" false,\n \\"enablepaymentplanforpatient\\" true, \n \\"shippingaddress\\" {\n \\"id\\" \\"01fdtezvw6qsc9zdxbsc02efy7\\",\n \\"orderid\\" \\"01fdtfxzz25gxzfwzzzys1tjgt\\",\n \\"firstname\\" \\"terrence\\",\n \\"lastname\\" \\"clarke\\",\n \\"line1\\" \\"6110 wilmer rd\\",\n \\"city\\" \\"cincinnati\\",\n \\"stateprovince\\" \\"oh\\",\n \\"postcode\\" \\"45247 5934\\",\n \\"countrycode\\" \\"us\\",\n \\"email\\" \\"test\@gogreenfeather com\\",\n \\"telephone\\" \\"(513) 385 5591\\",\n \\"sameasbilling\\" false,\n \\"shipping\\" true,\n \\"billing\\" false\n },\n \\"billingaddress\\" {\n \\"id\\" \\"01fdtfdstkffzhzw6tj7a882za\\",\n \\"orderid\\" \\"01fdtfxzz25gxzfwzzzys1tjgt\\",\n \\"firstname\\" \\"terrence\\",\n \\"lastname\\" \\"clarke\\",\n \\"line1\\" \\"6110 wilmer rd\\",\n \\"city\\" \\"cincinnati\\",\n \\"stateprovince\\" \\"oh\\",\n \\"postcode\\" \\"45247 5934\\",\n \\"countrycode\\" \\"us\\",\n \\"email\\" \\"test\@gogreenfeather com\\",\n \\"telephone\\" \\"(513) 385 5591\\",\n \\"sameasbilling\\" false,\n \\"shipping\\" false,\n \\"billing\\" true\n },\n \\"orderitems\\" \[\n {\n \\"id\\" \\"01fdtbfxwz3k1vxsfzjdz45jf5\\",\n \\"orderid\\" \\"01fdtfxzz25gxzfwzzzys1tjgt\\",\n \\"quantity\\" 1,\n \\"unitprice\\" 10000,\n \\"name\\" \\"dental procedure\\",\n \\"sku\\" \\"34587549834\\",\n \\"hidden\\" true,\n \\"friendlyname\\" \\"dental fee\\",\n \\"bundleid\\" \\"1\\",\n \\"externalpmsid\\" \\"10002347\\",\n \\"pmsid\\" \\"23\\"\n },\n {\n \\"id\\" \\"01fdtedxhpwfjndbzqs8w743a4\\",\n \\"orderid\\" \\"01fdtfxzz25gxzfwzzzys1tjgt\\",\n \\"quantity\\" 1,\n \\"unitprice\\" 10000,\n \\"name\\" \\"cavityfilling\\",\n \\"sku\\" \\"cavityfillingsku1\\",\n \\"hidden\\" false,\n \\"friendlyname\\" \\"cavity filling\\",\n \\"externalpmsid\\" \\"10002348\\",\n \\"pmsid\\" \\"24\\"\n }\n ],\n \\"invoicetype\\" \\"payment\\"\n }\n", "language" "200", "customlabel" "" }, { "id" "i b0cw nfocrwxx5wesz", "code" "{\n \\"suberrors\\" \[],\n \\"status\\" \\"invalid external patient\\",\n \\"message\\" \\"cannot find patient with external id of abc123 and dob 1959 10 22\\"\n}\t", "language" "400", "customlabel" "" } ], "selectedlanguageid" "c0f7bjpcqhajikyibqef0" }, "examples" { "languages" \[ { "id" "tsjh4baruelrazdnupv8e", "code" "curl x post \\\\\n url 'https //test api featherpay io/api/v1/stores/\ storeid/orders' \\\\\n header 'content type application/json;charset=utf 8' \\\\\n header 'accept application/json' \\\\\n header 'x api key {secret api key}' \\\\\n header 'x store id {store ulid}' \\\\\n data '{\n \\"posorderid\\" \\"invoice reference id via api\\", //your reference id for this invoice\n \\"storeid\\" {store ulid}, //store id we give you with keys for a given store\n \\"totalinvoiced\\" 20000, // $200 00 \n \\"patientid\\" \\"01f79xzzzzc2wkbzj3xq7z1r64\\", // optional featherpay patient identifier\n \\"externalpatientid\\" \\"abc123\\", // optional pms patient identifier\n \\"savepatient\\" false, // set to true to save patient info using externalpatientid featherpay will reply with the patientid to be used in future transactions\n \\"customerdob\\" \\"1959 10 22\\", // required if using externalpatientid in format of `yyyy mm dd`\n \\"customeremail\\" \\"test\@featherpay io\\",\n \\"customerfirstname\\" \\"terrence\\",\n \\"customerlastname\\" \\"clarke\\",\n \\"onbehalfof\\" \\"jane doe\@merchant com\\", //identifier of merchant generating invoice user readable format recommended, eg name or email\n \\"enablepaymentplanforpatient\\" true, // optional default to store level if not specified\n \\"shippingaddress\\" { // optional\n \\"firstname\\" \\"terrence\\",\n \\"lastname\\" \\"clarke\\",\n \\"line1\\" \\"6110 wilmer rd\\",\n \\"city\\" \\"cincinnati\\",\n \\"stateprovince\\" \\"oh\\",\n \\"postcode\\" \\"45247 5934\\",\n \\"countrycode\\" \\"us\\",\n \\"email\\" \\"test\@gogreenfeather com\\",\n \\"telephone\\" \\"(513) 385 5591\\",\n \\"sameasbilling\\" false\n },\n \\"billingaddress\\" {\n \\"firstname\\" \\"terrence\\",\n \\"lastname\\" \\"clarke\\",\n \\"line1\\" \\"6110 wilmer rd\\",\n \\"city\\" \\"cincinnati\\",\n \\"stateprovince\\" \\"oh\\",\n \\"postcode\\" \\"45247 5934\\",\n \\"countrycode\\" \\"us\\",\n \\"email\\" \\"test\@gogreenfeather com\\",\n \\"telephone\\" \\"(513) 385 5591\\"\n },\n \\"orderitems\\" \[\n {\n \\"quantity\\" 1,\n \\"unitprice\\" 10000, //$100 00\n \\"name\\" \\"dental procedure\\",\n \\"sku\\" \\"d2740\\", // code or unique identifier for product/service/procedure \n \\"hidden\\" false, // optional if true, this will not be displayed to the patient \n \\"friendlyname\\" \\"dental fee\\", //optional if this field exists, it will be the display we show the customer at payment time \n \\"bundleid\\" \\"1\\", //optional if this field exists, it will group all items with the same bundle id together otherwise, the item will be treated as an individual line item\n \\"externalpmsid\\" \\"10002347\\", //optional this is s a 3rd party's identifer for a procedure\n \\"pmsid\\" \\"23\\" //optional this is the pms (opendental, eaglesoft, etc) identifier for a procedure\n },\n {\n \\"quantity\\" 1,\n \\"unitprice\\" 10000,\n \\"name\\" \\"cavityfilling\\",\n \\"sku\\" \\"cavityfillingsku1\\",\n \\"hidden\\" false, \n \\"friendlyname\\" \\"cavity filling\\",\n \\"externalpmsid\\" \\"10002348\\",\n \\"pmsid\\" \\"24\\"\n \n }\n ],\n \\"invoicetype\\" \\"{textvalue}\\" // payment, statement, or unset used to trigger default payment reminders\n}'", "language" "json", "customlabel" "" } ], "selectedlanguageid" "tsjh4baruelrazdnupv8e" }, "description" "from your backend code, create the order with your store id and private key ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }