{"id":125338,"date":"2024-05-23T14:00:27","date_gmt":"2024-05-23T05:00:27","guid":{"rendered":"https:\/\/support.questetra.com\/?p=125338"},"modified":"2024-05-23T14:13:41","modified_gmt":"2024-05-23T05:13:41","slug":"service-task-stripe-invoice-create","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-stripe-invoice-create\/","title":{"rendered":"Stripe: Create Draft Invoice"},"content":{"rendered":"\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"58\" data-attachment-id=\"113160\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/how-to-use-timer-start-event\/attachment\/advanced-banner-new-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"advanced-banner-new-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en-1024x58.png?resize=1024%2C58&#038;ssl=1\" alt=\"\" class=\"wp-image-113160\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=768%2C44&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading has-border-color has-product-main-border-color has-white-color has-product-main-background-color has-text-color has-background has-link-color\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--20)\"><strong>Stripe: Create Draft Invoice<\/strong><\/h4>\n\n\n\n<p class=\"has-text-align-right has-border-color has-product-main-border-color has-white-color has-product-main-background-color has-text-color has-background has-link-color has-small-font-size mt-0 pt-0 wp-block-paragraph\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--20);padding-bottom:0;padding-left:var(--wp--preset--spacing--20)\"><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-stripe-invoice-create\/\">Stripe: \u8acb\u6c42\u66f8\u30c9\u30e9\u30d5\u30c8\u4f5c\u6210<\/a><\/p>\n\n\n\n<p class=\"has-border-color has-product-main-border-color has-text-color has-white-background-color has-background has-link-color mt-0 pt-0 wp-block-paragraph\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">This item creates a draft invoice on Stripe. The created invoice remains a draft until you finalize it, which allows you to send the invoice or charge the customer.<\/p>\n\n\n\n<figure class=\"wp-block-image alignright has-custom-border is-style-default\"><img decoding=\"async\" src=\"data:image;base64,\n        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAvJJREFUWEfF\n        l19I01EUxz\/XKZqWNbVS6cH+UfSUGQlCD0EQRCkoFDkDUzENi6IgkB4sKEgjDStFnVlzalC9+BBR\n        IEFBEeVbFP3R\/lhRpLRpKHO78dtv021u+pszfnv87Zzv+dxzzj33XoHOP6E1fvleGe9KJF\/CDiSZ\n        CDIAo8d\/BMkggn4BfVE27rX0ir9atOcEKC6WqdEOTkuoAOK0iALjAponY7jY0SF+zOYzK0CJSVYI\n        uAQkaAwcaDYm4VS7VTSH8g8JUFokryOpnGdgfzdBk7lTHAmmFRSgxCS7BBxYkOAeEQnd7VZRGKg5\n        A2BBVz4z2oxM+AF4at60kCsP1JJQ6dsTUwBKtxscvI+g4bRyjzljWOfdHVMAZSZZL+G4VpVI7AQ0\n        tFnFCUXDDaAMGWciv8PY55HEV3zHDTaSlWHlBigzySIJlvmoxsbBxHj4ngIOtllFpxug1CTNQMls\n        MjnbIS0d7t6etmpshe9DcKEmfACg3WwVpSpAoXyFIDNQZuMm2J2rfk1Ng6XL4NlTSE4Blwt6LOB0\n        QtEhkBKGvsCdHli9FnLzoe8h9L8MASfpN3eJLd4MDPscLFMeTTcgOhocDjXNi5fAr5+wYqUa+NOA\n        ClF9FiYnVdtHD2DnLpiYgNhYqKmGr5+DQoyYrSLJCyCDmdQ1gtEIdpv6r7LKbgscroKr9ZC\/Dzpa\n        VIBr9VBeBYYoiDKotkLA\/V7\/svnGMVuFYuLugaAAx05C+ipIWa4KShe8eA7ZOdB4GQr2TwMMfoSM\n        NfDuLazfALY\/YLdD9y148zp4GXwBgpag9goYk2BkGJ48hj15MDoK8QnQUAtZ26DrJrRaVMBRO9Sd\n        h7wC2JylAp87A9+G5ipBiCbU0ttbs6HiqFqCkA0XTCigCefchqFgFsWrO2TggxZcP5vpbRjJIAo7\n        rMfBbxDpPoo941i\/w0gB0P04ViB0vZB4m0nXK5kXQtdL6X\/JRLjXcp9M6Pcw8ULo+jTznXK6PU7n\n        O2q1+v0D2nRCMMki7aoAAAAASUVORK5CYII=\n    \" alt=\"Auto Step icon\" class=\"has-border-color has-ast-global-color-6-border-color\" style=\"border-width:0.5em\"\/><\/figure>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Basic Configs<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"0 0 -0.7em 0\">\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #C3C3C3;\"><\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Step Name<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #C3C3C3;\"><\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Note<\/dd>\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Configs for this Auto Step<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"0 0 -0.7em 0\">\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Auth<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C1: Authorization Setting in which API Secret Key is set<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_CustomerId<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C2-deprecated: Customer ID<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_CustomerId_V2<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C2: Customer ID<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Description<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C3: Description (Displayed in the invoice as &#8216;memo&#8217;)<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Currency<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C4: Currency (If not selected, defaults to that of the customer)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_LineItems<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C5: List of item names, unit amounts, and quantities<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_InvoiceId<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C6: Data item to save ID of the invoice<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_InvoiceUrl<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C7: Data item to save URL of the invoice detail page<\/dd>\n\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-lightbulb-exclamation\"><\/i> Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If C2-deprecated is set, you must set C2: Customer ID<\/li>\n\n\n\n<li>To get Stripe\u2019s API Secret Key, visit&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/dashboard.stripe.com\/apikeys\" target=\"_blank\">https:\/\/dashboard.stripe.com\/apikeys<\/a> (Stripe login required)<\/li>\n\n\n\n<li>The currency of the invoice is determined by the customer&#8217;s setting or the Stripe account setting<ul><li>For more details, see the <a rel=\"noreferrer noopener\" href=\"https:\/\/support.stripe.com\/questions\/set-or-change-currency-for-an-invoice-or-customer-in-stripe-billing\" target=\"_blank\">Stripe Support Page<\/a><\/li><\/ul><\/li>\n\n\n\n<li>Unit amounts must be provided in the currency&#8217;s smallest unit<ul><li>For example, to charge 10 USD, provide 1000 (that is, 1000 cents)<\/li><li>For more details, see the <a rel=\"noreferrer noopener\" href=\"https:\/\/stripe.com\/docs\/currencies\" target=\"_blank\">Stripe Documentation<\/a><\/li><\/ul><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-images\"><\/i> Capture<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"84005\" data-permalink=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/onedrive-file-upload\/attachment\/setting-service-task-pdf-generation-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/setting-service-task-pdf-generation-en.png?fit=959%2C833&amp;ssl=1\" data-orig-size=\"959,833\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"setting-service-task-pdf-generation-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/01\/setting-service-task-pdf-generation-en.png?fit=725%2C630&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/11\/stripe-invoice_create_capture_en.png?ssl=1\" alt=\"\" class=\"wp-image-84005\" style=\"border:10px solid #aaaaaa; padding:5px; margin:5px;\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><i class=\"fal fa-balance-scale\"><\/i> See also<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-stripe-invoice-finalize\/\" target=\"_blank\" rel=\"noreferrer noopener\">Stripe: Finalize Draft Invoice<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/intermediate-error-catch-event-boundary-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Intermediate Error Catch Event (Boundary Type)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/stripe-invoicing\/\" target=\"_blank\" rel=\"noreferrer noopener\">Tutorial: Sending Invoices with Stripe<\/a><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">Script (click to open)<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<ul class=\"wp-block-list\">\n<li>An XML file that contains the code below is available to download\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/raw.githubusercontent.com\/Questetra\/Addon-XML\/release-2024-04-30\/stripe-invoice-create.xml\" target=\"_blank\" rel=\"noreferrer noopener\">stripe-invoice-create.xml<\/a> (C) Questetra, Inc. (MIT License)<\/li>\n\n\n\n<li>If you are using Professional, you can modify the contents of this file and use it as your own add-on auto step<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n\nconst STRIPE_API_VERSION = &apos;2022-08-01&apos;;\n\nfunction main(){\n    \/\/\/\/ == Config Retrieving \/ \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u306e\u53c2\u7167 ==\n    const auth = configs.getObject(&apos;conf_Auth&apos;);\n    const customerId = retrieveCustomerId();\n    const description = configs.get(&apos;conf_Description&apos;);\n    const currency = configs.get(&apos;conf_Currency&apos;);\n    const items = retrieveItems();\n    const invoiceIdDef = configs.getObject(&apos;conf_InvoiceId&apos;);\n    const invoiceUrlDef = configs.getObject(&apos;conf_InvoiceUrl&apos;);\n\n    \/\/\/\/ == Calculating \/ \u6f14\u7b97 ==\n    const invoiceId = createInvoice(auth, customerId, description, currency);\n    items.forEach(item =&gt; {\n        attachInvoiceItem(auth, customerId, invoiceId, item);\n    });\n\n    \/\/\/\/ == Data Updating \/ \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 ==\n    if (invoiceIdDef !== null) { \/\/ STRING\n        engine.setData(invoiceIdDef, invoiceId);\n    }\n    if (invoiceUrlDef !== null) { \/\/ STRING\n        engine.setData(invoiceUrlDef, `https:\/\/dashboard.stripe.com\/invoices\/${invoiceId}`);\n    }\n}\n\n\/**\n  * config \u304b\u3089\u9867\u5ba2 ID \u3092\u8aad\u307f\u51fa\u3059\u3002\u7a7a\u6587\u5b57\u5217\u306e\u5834\u5408\u306f\u30a8\u30e9\u30fc\n  * @return {String} customerId \u9867\u5ba2 ID\n  *\/\nfunction retrieveCustomerId() {\n    const customerIdV1 = configs.get(&apos;conf_CustomerId&apos;);\n    if (customerIdV1 !== null &amp;&amp; customerIdV1 !== &apos;&apos;) {\n        return customerIdV1;\n    }\n    let customerId = configs.get(&apos;conf_CustomerId_V2&apos;); \/\/ \u56fa\u5b9a\u5024\u306e\u5834\u5408\n    const customerIdDef = configs.getObject(&apos;conf_CustomerId_V2&apos;);\n    if (customerIdDef !== null) {\n        if (customerIdDef.matchDataType(&apos;SELECT_SINGLE&apos;)) { \/\/ \u9078\u629e\u578b\u30c7\u30fc\u30bf\u9805\u76ee\u306e\u5834\u5408\n            const select = engine.findData(customerIdDef);\n            if (select === null || select.size() === 0) { \/\/ \u672a\u9078\u629e\n              throw new Error(&apos;Customer ID is not selected.&apos;);\n            }\n            customerId = select.get(0).getValue();\n        } else { \/\/ \u6587\u5b57\u578b\u30c7\u30fc\u30bf\u9805\u76ee\u306e\u5834\u5408\n            customerId = engine.findData(customerIdDef);\n        }\n    }\n    if (customerId === null || customerId === &apos;&apos;) {\n        throw new Error(&apos;Customer ID is blank.&apos;);\n    }\n    return customerId;\n}\n\n\/**\n  * config \u304b\u3089\u30e9\u30a4\u30f3\u30a2\u30a4\u30c6\u30e0\u306e\u60c5\u5831\u3092\u8aad\u307f\u51fa\u3059\n  * \u5165\u529b\u5024\u304c\u4e0d\u6b63\u306a\u5834\u5408\u3084\u3001\u8acb\u6c42\u984d\u5408\u8a08\u304c 8 \u6841\uff08Stripe \u306e\u4e0a\u9650\u5024\uff09\u3092\u8d85\u3048\u308b\u5834\u5408\u306f\u30a8\u30e9\u30fc\n  * @return {List&lt;Object&gt;} items\n  * @return {String} items[].description \u30a2\u30a4\u30c6\u30e0\u540d\n  * @return {String} items[].unitAmount \u5358\u4fa1\n  * @return {String} items[].quantity \u6570\u91cf\n  *\/\nfunction retrieveItems() {\n    const itemsDef = configs.getObject(&apos;conf_LineItems&apos;);\n    if (itemsDef === null) {\n        return [];\n    }\n    const table = engine.findData(itemsDef); \/\/ ScriptListArray\n\n    \/\/ \u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u3092\u30c1\u30a7\u30c3\u30af\n    if (table === null) {\n        return [];\n    }\n    if (table.size() &gt; httpClient.getRequestingLimit() - 1) { \/\/ \u8acb\u6c42\u66f8\u30c9\u30e9\u30d5\u30c8\u306e\u4f5c\u6210\u3067 1 \u56de\u3001\u5404\u30a2\u30a4\u30c6\u30e0\u306e\u6dfb\u4ed8\u3067\u30ea\u30af\u30a8\u30b9\u30c8 1 \u56de\n        throw new Error(&apos;Too many line items. Number of necessary HTTP requests exceeds the limit.&apos;);\n    }\n\n    \/\/ \u30b5\u30d6\u30c7\u30fc\u30bf\u9805\u76ee\u306e\u6570\u3068\u578b\u3092\u30c1\u30a7\u30c3\u30af\n    const subDataDefs = itemsDef.getSubDataDefinitions(); \/\/ List&lt;SubDataDefinitionView&gt;\n    if (subDataDefs.size() &lt; 3) {\n        throw new Error(&apos;The line items must include item description, unit amount, and quantity.&apos;);\n    }\n    if (!subDataDefs.get(0).matchDataType(&apos;STRING&apos;)) {\n        throw new Error(&apos;Line item name (1st column) must be STRING.&apos;);\n    }\n    if (!subDataDefs.get(1).matchDataType(&apos;DECIMAL&apos;)) {\n        throw new Error(&apos;Line item unit amount (2nd column) must be DECIMAL.&apos;);\n    }\n    if (!subDataDefs.get(2).matchDataType(&apos;DECIMAL&apos;)) {\n        throw new Error(&apos;Line item quantity (3rd column) must be DECIMAL.&apos;);\n    }\n\n    \/\/ \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u914d\u5217\u306b\u6574\u5f62\n    const items = [];\n    let totalAmount = 0;\n    for (let i = 0; i &lt; table.size(); i++) {\n        const row = table.getRow(i);\n        const description = row.getObject(0);\n        if (description === null) {\n            throw new Error(`Line item ${i+1} is invalid. Item name must not be blank.`);\n        }\n        const unitAmount = parseBigDecimalToLong(row.getObject(1), &apos;Unit amount&apos;, i);\n        const quantity = parseBigDecimalToLong(row.getObject(2), &apos;Quantity&apos;, i);\n        totalAmount += unitAmount * quantity;\n        \/\/ \u8acb\u6c42\u984d\u306f Stripe \u306e\u5236\u9650\u3067\u6700\u5927 8 \u6841\u307e\u3067\u3002IDR \u306e\u307f 12 \u6841\u307e\u3067\u3060\u304c\u3001\u3053\u3053\u3067\u306f\u4e00\u5f8b\u3067 8 \u6841\u307e\u3067\u3068\u3059\u308b\n        if (totalAmount &gt; 99999999) {\n            throw new Error(&apos;The total amount of line items must be less than 100000000.&apos;);\n        }\n        const item = {description, unitAmount, quantity};\n        items.push(item);\n    }\n    return items;\n}\n\n\/**\n  * BigDecimal \u306e\u6570\u5024\u3092 long \u306b\u30d1\u30fc\u30b9\u3057\u3066\u8fd4\u3059\n  * \u5c0f\u6570\u70b9\u4ee5\u4e0b\u304c0\u3067\u306a\u3044\u5834\u5408\u3001\u8ca0\u306e\u6570\u306e\u5834\u5408\u306f\u30a8\u30e9\u30fc\n  * @param {BigDecimal} bigDecimal \u6570\u5024\n  * @param {String} label \u30a8\u30e9\u30fc\u51fa\u529b\u7528\u30e9\u30d9\u30eb\n  * @param {Number} i \u30a8\u30e9\u30fc\u51fa\u529b\u7528\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\n  * @return {long} longValue \u5909\u63db\u5f8c\u306e\u6570\u5024\n  *\/\nfunction parseBigDecimalToLong(bigDecimal, label, i) {\n    let longValue;\n    try {\n        longValue = bigDecimal.longValueExact();\n    } catch (e) {\n        throw new Error(`Line item ${i+1} is invalid. ${label} must be integer.`);\n    }\n    if (longValue &lt; 0) {\n        throw new Error(`Line item ${i+1} is invalid. ${label} must not be negative.`);\n    }\n    return longValue;\n}\n\n\/**\n  * \u8acb\u6c42\u66f8\u306e\u30c9\u30e9\u30d5\u30c8\u3092\u4f5c\u6210\u3059\u308b\n  * @param {AuthSettingWrapper} auth  HTTP \u8a8d\u8a3c\u8a2d\u5b9a \u30c8\u30fc\u30af\u30f3\u76f4\u63a5\u6307\u5b9a\n  * @param {String} customerId \u9867\u5ba2 ID\n  * @param {String} description \u8aac\u660e\n  * @param {String} currency \u901a\u8ca8\n  * @return {String} invoiceId \u4f5c\u6210\u3055\u308c\u305f\u8acb\u6c42\u66f8\u30c9\u30e9\u30d5\u30c8\u306e ID\n  *\/\nfunction createInvoice(auth, customerId, description, currency) {\n    const apiUri = &apos;https:\/\/api.stripe.com\/v1\/invoices&apos;;\n    const request = httpClient.begin()\n        .authSetting(auth) \/\/ with &quot;Authorization: Bearer XX&quot;\n        .header(&apos;Stripe-Version&apos;, STRIPE_API_VERSION)\n        .formParam(&apos;customer&apos;, customerId)\n        .formParam(&apos;description&apos;, description)\n        .formParam(&apos;auto_advance&apos;, &apos;false&apos;); \/\/ \u30c9\u30e9\u30d5\u30c8\u304c\u81ea\u52d5\u3067\u78ba\u5b9a\u3055\u308c\u306a\u3044\u3088\u3046 false \u306b\n    if (currency !== &apos;&apos;) {\n        request.formParam(&apos;currency&apos;, currency);\n    }\n    const response = request.post(apiUri);\n    const status = response.getStatusCode();\n    const responseStr = response.getResponseAsString();\n    if (status !== 200) {\n        engine.log(responseStr);\n        throw new Error(`Failed to create draft invoice. status: ${status}`);\n    }\n    return JSON.parse(responseStr).id;\n}\n\n\/**\n  * \u8acb\u6c42\u66f8\u30c9\u30e9\u30d5\u30c8\u306b\u30e9\u30a4\u30f3\u30a2\u30a4\u30c6\u30e0\u3092\u8ffd\u52a0\u3059\u308b\n  * @param {AuthSettingWrapper} auth  HTTP \u8a8d\u8a3c\u8a2d\u5b9a \u30c8\u30fc\u30af\u30f3\u76f4\u63a5\u6307\u5b9a\n  * @param {String} customerId \u9867\u5ba2 ID\n  * @param {String} invoiceId \u8acb\u6c42\u66f8\u30c9\u30e9\u30d5\u30c8\u306e ID\n  * @param {Object} item\n  * @param {String} item.description \u30a2\u30a4\u30c6\u30e0\u540d\n  * @param {long} item.unitAmount \u5358\u4fa1\n  * @param {long} item.quantity \u6570\u91cf\n  *\/\nfunction attachInvoiceItem(auth, customerId, invoiceId, {description, unitAmount, quantity}) {\n    const apiUri = &apos;https:\/\/api.stripe.com\/v1\/invoiceitems&apos;;\n    const response = httpClient.begin()\n        .authSetting(auth) \/\/ with &quot;Authorization: Bearer XX&quot;\n        .header(&apos;Stripe-Version&apos;, STRIPE_API_VERSION)\n        .formParam(&apos;customer&apos;, customerId)\n        .formParam(&apos;invoice&apos;, invoiceId)\n        .formParam(&apos;description&apos;, description)\n        .formParam(&apos;unit_amount&apos;, unitAmount.toString())\n        .formParam(&apos;quantity&apos;, quantity.toString())\n        .post(apiUri);\n    const status = response.getStatusCode();\n    const responseStr = response.getResponseAsString();\n    if (status !== 200) {\n        engine.log(responseStr);\n        throw new Error(`Failed to attach an invoice item. status: ${status}`);\n    }\n}\n\n    <\/code><\/pre><\/div>\n<\/div><\/details><\/div>\n<\/div>\n\n<!-- \/wp:post-content -->","protected":false},"excerpt":{"rendered":"<p>This item creates a draft invoice on Stripe. The created invoice remains a draft until you finalize it, which allows you to send the invoice or charge the customer.<\/p>\n","protected":false},"author":17,"featured_media":125421,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[551],"tags":[404],"class_list":["post-125338","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bpmn-icons","tag-stripe-api"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"Shiho Tatsumi","author_link":"https:\/\/support.questetra.com\/en\/author\/tatsumi48c607ec82\/"},"uagb_comment_info":6,"uagb_excerpt":"This item creates a draft invoice on Stripe. The created invoice remains a draft until you finalize it, which allows you to send the invoice or charge the customer.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-wBA","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":141572,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/stripe-invoicing\/","url_meta":{"origin":125338,"position":0},"title":"Sending Invoices with Stripe","author":"Hirotaka NISHI","date":"2023-01-26","format":false,"excerpt":"Explaining the automated process of creating an invoice on Stripe and sending it to the customer by email.","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/01\/stripe-billing-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/01\/stripe-billing-fi-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/01\/stripe-billing-fi-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/01\/stripe-billing-fi-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/01\/stripe-billing-fi-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":75362,"url":"https:\/\/support.questetra.com\/en\/templates\/paypal-billing-process-20211227\/","url_meta":{"origin":125338,"position":1},"title":"PayPal Billing Process","author":"Hirotaka NISHI","date":"2021-12-28","format":false,"excerpt":"An independent subprocess to be invoked by various business flows. Through \"PayPal Invoicing API\", 1) let PayPal generate \"PayPal Invoice\", 2) let PayPal send \"PayPal Invoice\", 3) confirm payment status of \"PayPal Invoice\" to PayPal. Also generates \"Transfer slip CSV\" for accounting system automatically.","rel":"","context":"In &quot;Workflow Apps&quot;","block_context":{"text":"Workflow Apps","link":"https:\/\/support.questetra.com\/en\/category\/templates\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/03\/eye-catch-paypal-billing-process-20210428-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/03\/eye-catch-paypal-billing-process-20210428-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/03\/eye-catch-paypal-billing-process-20210428-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/03\/eye-catch-paypal-billing-process-20210428-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2019\/03\/eye-catch-paypal-billing-process-20210428-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":152880,"url":"https:\/\/support.questetra.com\/en\/templates\/stripe-billing-process-2023\/","url_meta":{"origin":125338,"position":2},"title":"Stripe Billing Process","author":"Hirotaka NISHI","date":"2023-10-05","format":false,"excerpt":"An independent sub-process that can be invoked by various business flows. Through the Stripe API; 1) Stripe generates a Stripe invoice, and 2) Stripe sends the Stripe invoice. Billing will be done to customers who are already registered with Stripe, but when the customer is not registered, he or she\u2026","rel":"","context":"In &quot;Workflow Apps&quot;","block_context":{"text":"Workflow Apps","link":"https:\/\/support.questetra.com\/en\/category\/templates\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/10\/eye-catch-stripe-billng-process-20231004-en.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/10\/eye-catch-stripe-billng-process-20231004-en.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/10\/eye-catch-stripe-billng-process-20231004-en.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/10\/eye-catch-stripe-billng-process-20231004-en.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/10\/eye-catch-stripe-billng-process-20231004-en.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":125350,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-stripe-invoice-finalize\/","url_meta":{"origin":125338,"position":3},"title":"Stripe: Finalize Draft Invoice","author":"Shiho Tatsumi","date":"2024-05-24","format":false,"excerpt":"This item finalizes a draft invoice on Stripe, which allows you to send the invoice or charge the customer.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2022\/07\/stripe-icon-fi-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":143586,"url":"https:\/\/support.questetra.com\/en\/developer-blog\/stripe-charge\/","url_meta":{"origin":125338,"position":4},"title":"Utilize Stripe to Set Up Automatic Billing","author":"Hirotaka NISHI","date":"2023-03-15","format":false,"excerpt":"This section explains the difference between [Stripe: Charge by Invoice] and [Stripe: Send Invoice], their uses, and how automatic billing works with [Stripe: Charge by Invoice].","rel":"","context":"In &quot;Questetra Developers Blog&quot;","block_context":{"text":"Questetra Developers Blog","link":"https:\/\/support.questetra.com\/en\/category\/developer-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/03\/stripe-charge-fi-en1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/03\/stripe-charge-fi-en1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/03\/stripe-charge-fi-en1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/03\/stripe-charge-fi-en1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2023\/03\/stripe-charge-fi-en1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":67465,"url":"https:\/\/support.questetra.com\/en\/addons\/paypal-status\/","url_meta":{"origin":125338,"position":5},"title":"PayPal Invoicing Status","author":"Hirotaka NISHI","date":"2017-06-03","format":false,"excerpt":"Download Paypal-status.xmlSince Rhino (deprecated) is specified as the script engine, a setting error will occur even if you install this in a workflow AppTo use this Add-on, you need to change the script engine and modify the script accordinglyPlease refer to Notice Concerning Deprecation of Rhino for the method for\u2026","rel":"","context":"In &quot;Add-ons&quot;","block_context":{"text":"Add-ons","link":"https:\/\/support.questetra.com\/en\/category\/addons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2017\/06\/paypal-invoicing-status-header.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2017\/06\/paypal-invoicing-status-header.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2017\/06\/paypal-invoicing-status-header.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2017\/06\/paypal-invoicing-status-header.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2017\/06\/paypal-invoicing-status-header.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/125338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=125338"}],"version-history":[{"count":13,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/125338\/revisions"}],"predecessor-version":[{"id":161721,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/125338\/revisions\/161721"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/125421"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=125338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=125338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=125338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}