[{"data":1,"prerenderedAt":1268},["ShallowReactive",2],{"navigation_docs":3,"-packages-python-refunds":465,"-packages-python-refunds-surround":1263},[4,8,62,115,450],{"title":5,"path":6,"stem":7},"Introduction","\u002Fintroduction","0.introduction",{"title":9,"path":10,"stem":11,"children":12,"page":61},"Guides","\u002Fguides","1.guides",[13,17,21,25,29,33,37,41,45,49,53,57],{"title":14,"path":15,"stem":16},"Quickstart","\u002Fguides\u002Fquickstart","1.guides\u002F1.quickstart",{"title":18,"path":19,"stem":20},"Payouts & Settlement","\u002Fguides\u002Fpayouts","1.guides\u002F10.payouts",{"title":22,"path":23,"stem":24},"Customer Emails","\u002Fguides\u002Fcustomer-emails","1.guides\u002F11.customer-emails",{"title":26,"path":27,"stem":28},"Build your own integration","\u002Fguides\u002Fbuild-your-own-integration","1.guides\u002F2.build-your-own-integration",{"title":30,"path":31,"stem":32},"Selling Workflow","\u002Fguides\u002Fselling-workflow","1.guides\u002F2.selling-workflow",{"title":34,"path":35,"stem":36},"Vatly SDKs","\u002Fguides\u002Fsdks","1.guides\u002F3.sdks",{"title":38,"path":39,"stem":40},"Authentication","\u002Fguides\u002Fauthentication","1.guides\u002F4.authentication",{"title":42,"path":43,"stem":44},"Pagination","\u002Fguides\u002Fpagination","1.guides\u002F5.pagination",{"title":46,"path":47,"stem":48},"Errors","\u002Fguides\u002Ferrors","1.guides\u002F6.errors",{"title":50,"path":51,"stem":52},"Webhooks","\u002Fguides\u002Fwebhooks","1.guides\u002F7.webhooks",{"title":54,"path":55,"stem":56},"Idempotency","\u002Fguides\u002Fidempotency","1.guides\u002F8.idempotency",{"title":58,"path":59,"stem":60},"Testing","\u002Fguides\u002Ftesting","1.guides\u002F9.testing",false,{"title":63,"path":64,"stem":65,"children":66,"page":61},"Api Reference","\u002Fapi-reference","2.api-reference",[67,71,75,79,83,87,91,95,99,103,107,111],{"title":68,"path":69,"stem":70},"Customers","\u002Fapi-reference\u002Fcustomers","2.api-reference\u002F1.customers",{"title":72,"path":73,"stem":74},"Webhook Endpoints","\u002Fapi-reference\u002Fwebhook-endpoints","2.api-reference\u002F10.webhook-endpoints",{"title":76,"path":77,"stem":78},"Test helpers","\u002Fapi-reference\u002Ftest-helpers","2.api-reference\u002F11.test-helpers",{"title":80,"path":81,"stem":82},"Checkouts","\u002Fapi-reference\u002Fcheckouts","2.api-reference\u002F2.checkouts",{"title":84,"path":85,"stem":86},"One-off Products","\u002Fapi-reference\u002Fone-off-products","2.api-reference\u002F3.one-off-products",{"title":88,"path":89,"stem":90},"Subscriptions","\u002Fapi-reference\u002Fsubscriptions","2.api-reference\u002F4.subscriptions",{"title":92,"path":93,"stem":94},"Subscription Plans","\u002Fapi-reference\u002Fsubscription-plans","2.api-reference\u002F5.subscription-plans",{"title":96,"path":97,"stem":98},"Orders","\u002Fapi-reference\u002Forders","2.api-reference\u002F6.orders",{"title":100,"path":101,"stem":102},"Order Refunds","\u002Fapi-reference\u002Frefunds","2.api-reference\u002F7.refunds",{"title":104,"path":105,"stem":106},"Refunds","\u002Fapi-reference\u002Fglobal-refunds","2.api-reference\u002F8.global-refunds",{"title":108,"path":109,"stem":110},"Chargebacks","\u002Fapi-reference\u002Fchargebacks","2.api-reference\u002F9.chargebacks",{"title":112,"path":113,"stem":114},"Webhook Events","\u002Fapi-reference\u002Fwebhook-events","2.api-reference\u002F99.webhook-events",{"title":116,"path":117,"stem":118,"children":119},"Packages","\u002Fpackages","3.packages",[120,122,164,210,244,283,318,366,408],{"title":116,"path":117,"stem":121},"3.packages\u002Findex",{"title":123,"path":124,"stem":125,"children":126,"page":61},"PHP SDK","\u002Fpackages\u002Fphp","3.packages\u002F1.php",[127,131,134,137,140,144,147,151,154,157,160],{"title":128,"path":129,"stem":130},"Getting started","\u002Fpackages\u002Fphp\u002Freadme","3.packages\u002F1.php\u002F00.readme",{"title":68,"path":132,"stem":133},"\u002Fpackages\u002Fphp\u002Fcustomers","3.packages\u002F1.php\u002F02.customers",{"title":80,"path":135,"stem":136},"\u002Fpackages\u002Fphp\u002Fcheckouts","3.packages\u002F1.php\u002F03.checkouts",{"title":88,"path":138,"stem":139},"\u002Fpackages\u002Fphp\u002Fsubscriptions","3.packages\u002F1.php\u002F04.subscriptions",{"title":141,"path":142,"stem":143},"Subscription plans","\u002Fpackages\u002Fphp\u002Fsubscriptionplans","3.packages\u002F1.php\u002F05.subscriptionplans",{"title":96,"path":145,"stem":146},"\u002Fpackages\u002Fphp\u002Forders","3.packages\u002F1.php\u002F06.orders",{"title":148,"path":149,"stem":150},"One-off products","\u002Fpackages\u002Fphp\u002Foneoffproducts","3.packages\u002F1.php\u002F07.oneoffproducts",{"title":104,"path":152,"stem":153},"\u002Fpackages\u002Fphp\u002Frefunds","3.packages\u002F1.php\u002F08.refunds",{"title":108,"path":155,"stem":156},"\u002Fpackages\u002Fphp\u002Fchargebacks","3.packages\u002F1.php\u002F09.chargebacks",{"title":50,"path":158,"stem":159},"\u002Fpackages\u002Fphp\u002Fwebhooks","3.packages\u002F1.php\u002F10.webhooks",{"title":161,"path":162,"stem":163},"Webhook URLs","\u002Fpackages\u002Fphp\u002Fwebhookendpoints","3.packages\u002F1.php\u002F11.webhookendpoints",{"title":165,"path":166,"stem":167,"children":168,"page":61},"PHP Fluent","\u002Fpackages\u002Ffluent-php","3.packages\u002F2.fluent-php",[169,172,176,180,183,186,189,192,196,199,203,207],{"title":128,"path":170,"stem":171},"\u002Fpackages\u002Ffluent-php\u002Freadme","3.packages\u002F2.fluent-php\u002F00.readme",{"title":173,"path":174,"stem":175},"Configuration","\u002Fpackages\u002Ffluent-php\u002Fconfiguration","3.packages\u002F2.fluent-php\u002F01.configuration",{"title":177,"path":178,"stem":179},"Core concepts","\u002Fpackages\u002Ffluent-php\u002Fcoreconcepts","3.packages\u002F2.fluent-php\u002F02.coreconcepts",{"title":68,"path":181,"stem":182},"\u002Fpackages\u002Ffluent-php\u002Fcustomers","3.packages\u002F2.fluent-php\u002F03.customers",{"title":80,"path":184,"stem":185},"\u002Fpackages\u002Ffluent-php\u002Fcheckouts","3.packages\u002F2.fluent-php\u002F04.checkouts",{"title":88,"path":187,"stem":188},"\u002Fpackages\u002Ffluent-php\u002Fsubscriptions","3.packages\u002F2.fluent-php\u002F05.subscriptions",{"title":96,"path":190,"stem":191},"\u002Fpackages\u002Ffluent-php\u002Forders","3.packages\u002F2.fluent-php\u002F06.orders",{"title":193,"path":194,"stem":195},"Customer portal","\u002Fpackages\u002Ffluent-php\u002Fcustomerportal","3.packages\u002F2.fluent-php\u002F07.customerportal",{"title":50,"path":197,"stem":198},"\u002Fpackages\u002Ffluent-php\u002Fwebhooks","3.packages\u002F2.fluent-php\u002F08.webhooks",{"title":200,"path":201,"stem":202},"Webhook event flow","\u002Fpackages\u002Ffluent-php\u002Fwebhook-flow","3.packages\u002F2.fluent-php\u002F09.webhook-flow",{"title":204,"path":205,"stem":206},"Existing tables","\u002Fpackages\u002Ffluent-php\u002Fhost-owns-its-tables","3.packages\u002F2.fluent-php\u002F10.host-owns-its-tables",{"title":58,"path":208,"stem":209},"\u002Fpackages\u002Ffluent-php\u002Ftesting","3.packages\u002F2.fluent-php\u002F11.testing",{"title":211,"path":212,"stem":213,"children":214,"page":61},"Laravel","\u002Fpackages\u002Flaravel","3.packages\u002F3.laravel",[215,218,221,224,227,230,233,236,240],{"title":128,"path":216,"stem":217},"\u002Fpackages\u002Flaravel\u002Freadme","3.packages\u002F3.laravel\u002F00.readme",{"title":173,"path":219,"stem":220},"\u002Fpackages\u002Flaravel\u002Fconfiguration","3.packages\u002F3.laravel\u002F01.configuration",{"title":68,"path":222,"stem":223},"\u002Fpackages\u002Flaravel\u002Fcustomers","3.packages\u002F3.laravel\u002F02.customers",{"title":80,"path":225,"stem":226},"\u002Fpackages\u002Flaravel\u002Fcheckouts","3.packages\u002F3.laravel\u002F03.checkouts",{"title":88,"path":228,"stem":229},"\u002Fpackages\u002Flaravel\u002Fsubscriptions","3.packages\u002F3.laravel\u002F04.subscriptions",{"title":96,"path":231,"stem":232},"\u002Fpackages\u002Flaravel\u002Forders","3.packages\u002F3.laravel\u002F05.orders",{"title":50,"path":234,"stem":235},"\u002Fpackages\u002Flaravel\u002Fwebhooks","3.packages\u002F3.laravel\u002F06.webhooks",{"title":237,"path":238,"stem":239},"Comparison","\u002Fpackages\u002Flaravel\u002Fcomparison","3.packages\u002F3.laravel\u002F07.comparison",{"title":241,"path":242,"stem":243},"Migrating from Cashier","\u002Fpackages\u002Flaravel\u002Fmigrating-to-vatly","3.packages\u002F3.laravel\u002F08.migrating-to-vatly",{"title":245,"path":246,"stem":247,"children":248,"page":61},"JavaScript SDK","\u002Fpackages\u002Fjavascript","3.packages\u002F4.javascript",[249,252,255,258,261,264,267,270,273,276,279],{"title":128,"path":250,"stem":251},"\u002Fpackages\u002Fjavascript\u002Freadme","3.packages\u002F4.javascript\u002F00.readme",{"title":68,"path":253,"stem":254},"\u002Fpackages\u002Fjavascript\u002Fcustomers","3.packages\u002F4.javascript\u002F02.customers",{"title":80,"path":256,"stem":257},"\u002Fpackages\u002Fjavascript\u002Fcheckouts","3.packages\u002F4.javascript\u002F03.checkouts",{"title":88,"path":259,"stem":260},"\u002Fpackages\u002Fjavascript\u002Fsubscriptions","3.packages\u002F4.javascript\u002F04.subscriptions",{"title":141,"path":262,"stem":263},"\u002Fpackages\u002Fjavascript\u002Fsubscriptionplans","3.packages\u002F4.javascript\u002F05.subscriptionplans",{"title":96,"path":265,"stem":266},"\u002Fpackages\u002Fjavascript\u002Forders","3.packages\u002F4.javascript\u002F06.orders",{"title":148,"path":268,"stem":269},"\u002Fpackages\u002Fjavascript\u002Foneoffproducts","3.packages\u002F4.javascript\u002F07.oneoffproducts",{"title":104,"path":271,"stem":272},"\u002Fpackages\u002Fjavascript\u002Frefunds","3.packages\u002F4.javascript\u002F08.refunds",{"title":108,"path":274,"stem":275},"\u002Fpackages\u002Fjavascript\u002Fchargebacks","3.packages\u002F4.javascript\u002F09.chargebacks",{"title":50,"path":277,"stem":278},"\u002Fpackages\u002Fjavascript\u002Fwebhooks","3.packages\u002F4.javascript\u002F10.webhooks",{"title":280,"path":281,"stem":282},"API reference","\u002Fpackages\u002Fjavascript\u002Fapi","3.packages\u002F4.javascript\u002F12.api",{"title":284,"path":285,"stem":286,"children":287,"page":61},"JavaScript Fluent","\u002Fpackages\u002Ffluent-js","3.packages\u002F5.fluent-js",[288,291,294,297,300,303,306,309,312,315],{"title":128,"path":289,"stem":290},"\u002Fpackages\u002Ffluent-js\u002Freadme","3.packages\u002F5.fluent-js\u002F00.readme",{"title":173,"path":292,"stem":293},"\u002Fpackages\u002Ffluent-js\u002Fconfiguration","3.packages\u002F5.fluent-js\u002F01.configuration",{"title":177,"path":295,"stem":296},"\u002Fpackages\u002Ffluent-js\u002Fcoreconcepts","3.packages\u002F5.fluent-js\u002F02.coreconcepts",{"title":68,"path":298,"stem":299},"\u002Fpackages\u002Ffluent-js\u002Fcustomers","3.packages\u002F5.fluent-js\u002F03.customers",{"title":80,"path":301,"stem":302},"\u002Fpackages\u002Ffluent-js\u002Fcheckouts","3.packages\u002F5.fluent-js\u002F04.checkouts",{"title":88,"path":304,"stem":305},"\u002Fpackages\u002Ffluent-js\u002Fsubscriptions","3.packages\u002F5.fluent-js\u002F05.subscriptions",{"title":96,"path":307,"stem":308},"\u002Fpackages\u002Ffluent-js\u002Forders","3.packages\u002F5.fluent-js\u002F06.orders",{"title":193,"path":310,"stem":311},"\u002Fpackages\u002Ffluent-js\u002Fcustomerportal","3.packages\u002F5.fluent-js\u002F07.customerportal",{"title":50,"path":313,"stem":314},"\u002Fpackages\u002Ffluent-js\u002Fwebhooks","3.packages\u002F5.fluent-js\u002F08.webhooks",{"title":58,"path":316,"stem":317},"\u002Fpackages\u002Ffluent-js\u002Ftesting","3.packages\u002F5.fluent-js\u002F11.testing",{"title":319,"path":320,"stem":321,"children":322,"page":61},"Python SDK","\u002Fpackages\u002Fpython","3.packages\u002F6.python",[323,326,329,332,335,338,341,344,347,350,353,356,359,362],{"title":128,"path":324,"stem":325},"\u002Fpackages\u002Fpython\u002Freadme","3.packages\u002F6.python\u002F00.readme",{"title":173,"path":327,"stem":328},"\u002Fpackages\u002Fpython\u002Fconfiguration","3.packages\u002F6.python\u002F01.configuration",{"title":68,"path":330,"stem":331},"\u002Fpackages\u002Fpython\u002Fcustomers","3.packages\u002F6.python\u002F02.customers",{"title":80,"path":333,"stem":334},"\u002Fpackages\u002Fpython\u002Fcheckouts","3.packages\u002F6.python\u002F03.checkouts",{"title":88,"path":336,"stem":337},"\u002Fpackages\u002Fpython\u002Fsubscriptions","3.packages\u002F6.python\u002F04.subscriptions",{"title":141,"path":339,"stem":340},"\u002Fpackages\u002Fpython\u002Fsubscriptionplans","3.packages\u002F6.python\u002F05.subscriptionplans",{"title":96,"path":342,"stem":343},"\u002Fpackages\u002Fpython\u002Forders","3.packages\u002F6.python\u002F06.orders",{"title":148,"path":345,"stem":346},"\u002Fpackages\u002Fpython\u002Foneoffproducts","3.packages\u002F6.python\u002F07.oneoffproducts",{"title":104,"path":348,"stem":349},"\u002Fpackages\u002Fpython\u002Frefunds","3.packages\u002F6.python\u002F08.refunds",{"title":108,"path":351,"stem":352},"\u002Fpackages\u002Fpython\u002Fchargebacks","3.packages\u002F6.python\u002F09.chargebacks",{"title":50,"path":354,"stem":355},"\u002Fpackages\u002Fpython\u002Fwebhooks","3.packages\u002F6.python\u002F10.webhooks",{"title":161,"path":357,"stem":358},"\u002Fpackages\u002Fpython\u002Fwebhookendpoints","3.packages\u002F6.python\u002F11.webhookendpoints",{"title":280,"path":360,"stem":361},"\u002Fpackages\u002Fpython\u002Fapi","3.packages\u002F6.python\u002F12.api",{"title":363,"path":364,"stem":365},"Development","\u002Fpackages\u002Fpython\u002Fdevelopment","3.packages\u002F6.python\u002F13.development",{"title":367,"path":368,"stem":369,"children":370,"page":61},"Python Fluent","\u002Fpackages\u002Ffluent-python","3.packages\u002F7.fluent-python",[371,374,377,380,383,386,389,392,395,398,401,405],{"title":128,"path":372,"stem":373},"\u002Fpackages\u002Ffluent-python\u002Freadme","3.packages\u002F7.fluent-python\u002F00.readme",{"title":173,"path":375,"stem":376},"\u002Fpackages\u002Ffluent-python\u002Fconfiguration","3.packages\u002F7.fluent-python\u002F01.configuration",{"title":177,"path":378,"stem":379},"\u002Fpackages\u002Ffluent-python\u002Fcoreconcepts","3.packages\u002F7.fluent-python\u002F02.coreconcepts",{"title":68,"path":381,"stem":382},"\u002Fpackages\u002Ffluent-python\u002Fcustomers","3.packages\u002F7.fluent-python\u002F03.customers",{"title":80,"path":384,"stem":385},"\u002Fpackages\u002Ffluent-python\u002Fcheckouts","3.packages\u002F7.fluent-python\u002F04.checkouts",{"title":88,"path":387,"stem":388},"\u002Fpackages\u002Ffluent-python\u002Fsubscriptions","3.packages\u002F7.fluent-python\u002F05.subscriptions",{"title":96,"path":390,"stem":391},"\u002Fpackages\u002Ffluent-python\u002Forders","3.packages\u002F7.fluent-python\u002F06.orders",{"title":193,"path":393,"stem":394},"\u002Fpackages\u002Ffluent-python\u002Fcustomerportal","3.packages\u002F7.fluent-python\u002F07.customerportal",{"title":50,"path":396,"stem":397},"\u002Fpackages\u002Ffluent-python\u002Fwebhooks","3.packages\u002F7.fluent-python\u002F08.webhooks",{"title":58,"path":399,"stem":400},"\u002Fpackages\u002Ffluent-python\u002Ftesting","3.packages\u002F7.fluent-python\u002F11.testing",{"title":402,"path":403,"stem":404},"Porting","\u002Fpackages\u002Ffluent-python\u002Fporting","3.packages\u002F7.fluent-python\u002F12.porting",{"title":363,"path":406,"stem":407},"\u002Fpackages\u002Ffluent-python\u002Fdevelopment","3.packages\u002F7.fluent-python\u002F13.development",{"title":409,"path":410,"stem":411,"children":412,"page":61},"Django","\u002Fpackages\u002Fdjango","3.packages\u002F8.django",[413,416,420,423,427,431,434,437,440,444,447],{"title":128,"path":414,"stem":415},"\u002Fpackages\u002Fdjango\u002Freadme","3.packages\u002F8.django\u002F00.readme",{"title":417,"path":418,"stem":419},"Installation","\u002Fpackages\u002Fdjango\u002Finstallation","3.packages\u002F8.django\u002F01.installation",{"title":173,"path":421,"stem":422},"\u002Fpackages\u002Fdjango\u002Fconfiguration","3.packages\u002F8.django\u002F02.configuration",{"title":424,"path":425,"stem":426},"Billable models","\u002Fpackages\u002Fdjango\u002Fbillablemodels","3.packages\u002F8.django\u002F03.billablemodels",{"title":428,"path":429,"stem":430},"Checkout","\u002Fpackages\u002Fdjango\u002Fcheckout","3.packages\u002F8.django\u002F04.checkout",{"title":88,"path":432,"stem":433},"\u002Fpackages\u002Fdjango\u002Fbilling","3.packages\u002F8.django\u002F05.billing",{"title":193,"path":435,"stem":436},"\u002Fpackages\u002Fdjango\u002Fcustomerportal","3.packages\u002F8.django\u002F06.customerportal",{"title":50,"path":438,"stem":439},"\u002Fpackages\u002Fdjango\u002Fwebhooks","3.packages\u002F8.django\u002F07.webhooks",{"title":441,"path":442,"stem":443},"Admin","\u002Fpackages\u002Fdjango\u002Fadmin","3.packages\u002F8.django\u002F08.admin",{"title":58,"path":445,"stem":446},"\u002Fpackages\u002Fdjango\u002Ftesting","3.packages\u002F8.django\u002F09.testing",{"title":363,"path":448,"stem":449},"\u002Fpackages\u002Fdjango\u002Fdevelopment","3.packages\u002F8.django\u002F10.development",{"title":451,"path":452,"stem":453,"children":454},"Integrations","\u002Fintegrations","4.integrations",[455,457,461],{"title":451,"path":452,"stem":456},"4.integrations\u002Findex",{"title":458,"path":459,"stem":460},"Lovable payments with Vatly","\u002Fintegrations\u002Flovable","4.integrations\u002F1.lovable",{"title":462,"path":463,"stem":464},"Bolt payments with Vatly","\u002Fintegrations\u002Fbolt","4.integrations\u002F2.bolt",{"id":466,"title":104,"body":467,"description":1256,"extension":1257,"links":1258,"meta":1259,"navigation":1260,"path":348,"seo":1261,"stem":349,"__hash__":1262},"docs\u002F3.packages\u002F6.python\u002F08.refunds.md",{"type":468,"value":469,"toc":1251},"minimark",[470,488,493,672,675,755,759,962,970,974,1171,1174,1234,1247],[471,472,473,474,478,479,482,483,487],"p",{},"Refunds reverse some or all of an order. Create them through ",[475,476,477],"code",{},"client.orders",", not\n",[475,480,481],{},"client.refunds",". The top-level refunds resource is for reads.\nExamples accept the client from ",[484,485,486],"a",{"href":324},"setup",".",[489,490,492],"h2",{"id":491},"issue-a-full-refund","Issue a full refund",[494,495,500],"pre",{"className":496,"code":497,"language":498,"meta":499,"style":499},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from vatly import RequestOptions, VatlyClient\n\n\ndef example(client: VatlyClient):\n    refund = client.orders.create_full_refund(\n        \"order_example\",\n        {},\n        options=RequestOptions(idempotency_key=\"refund:request-42\"),\n    )\n    return refund.id, refund.status\n","python","",[475,501,502,528,535,540,567,593,609,615,643,649],{"__ignoreMap":499},[503,504,507,511,515,518,521,525],"span",{"class":505,"line":506},"line",1,[503,508,510],{"class":509},"s7zQu","from",[503,512,514],{"class":513},"sTEyZ"," vatly ",[503,516,517],{"class":509},"import",[503,519,520],{"class":513}," RequestOptions",[503,522,524],{"class":523},"sMK4o",",",[503,526,527],{"class":513}," VatlyClient\n",[503,529,531],{"class":505,"line":530},2,[503,532,534],{"emptyLinePlaceholder":533},true,"\n",[503,536,538],{"class":505,"line":537},3,[503,539,534],{"emptyLinePlaceholder":533},[503,541,543,547,551,554,558,561,564],{"class":505,"line":542},4,[503,544,546],{"class":545},"spNyl","def",[503,548,550],{"class":549},"s2Zo4"," example",[503,552,553],{"class":523},"(",[503,555,557],{"class":556},"sHdIc","client",[503,559,560],{"class":523},":",[503,562,563],{"class":513}," VatlyClient",[503,565,566],{"class":523},"):\n",[503,568,570,573,576,579,581,585,587,590],{"class":505,"line":569},5,[503,571,572],{"class":513},"    refund ",[503,574,575],{"class":523},"=",[503,577,578],{"class":513}," client",[503,580,487],{"class":523},[503,582,584],{"class":583},"swJcz","orders",[503,586,487],{"class":523},[503,588,589],{"class":549},"create_full_refund",[503,591,592],{"class":523},"(\n",[503,594,596,599,603,606],{"class":505,"line":595},6,[503,597,598],{"class":523},"        \"",[503,600,602],{"class":601},"sfazB","order_example",[503,604,605],{"class":523},"\"",[503,607,608],{"class":523},",\n",[503,610,612],{"class":505,"line":611},7,[503,613,614],{"class":523},"        {},\n",[503,616,618,621,623,626,628,631,633,635,638,640],{"class":505,"line":617},8,[503,619,620],{"class":556},"        options",[503,622,575],{"class":523},[503,624,625],{"class":549},"RequestOptions",[503,627,553],{"class":523},[503,629,630],{"class":556},"idempotency_key",[503,632,575],{"class":523},[503,634,605],{"class":523},[503,636,637],{"class":601},"refund:request-42",[503,639,605],{"class":523},[503,641,642],{"class":523},"),\n",[503,644,646],{"class":505,"line":645},9,[503,647,648],{"class":523},"    )\n",[503,650,652,655,658,660,663,665,667,669],{"class":505,"line":651},10,[503,653,654],{"class":509},"    return",[503,656,657],{"class":513}," refund",[503,659,487],{"class":523},[503,661,662],{"class":583},"id",[503,664,524],{"class":523},[503,666,657],{"class":513},[503,668,487],{"class":523},[503,670,671],{"class":583},"status\n",[471,673,674],{},"Keep the same key for retries of this refund. A timeout does not prove it failed;\nread the existing refund\u002Forder before deciding to issue another.",[676,677,678,694],"table",{},[679,680,681],"thead",{},[682,683,684,688,691],"tr",{},[685,686,687],"th",{},"Operation",[685,689,690],{},"Inputs",[685,692,693],{},"Return",[695,696,697,715,730,743],"tbody",{},[682,698,699,705,712],{},[700,701,702],"td",{},[475,703,704],{},"orders.create_full_refund",[700,706,707,708,711],{},"order ID, ",[475,709,710],{},"{}"," or optional metadata",[700,713,714],{},"Refund",[682,716,717,722,728],{},[700,718,719],{},[475,720,721],{},"orders.create_refund",[700,723,707,724,727],{},[475,725,726],{},"{\"items\": [...]}","; optional metadata",[700,729,714],{},[682,731,732,737,740],{},[700,733,734],{},[475,735,736],{},"orders.cancel_refund",[700,738,739],{},"order ID, refund ID",[700,741,742],{},"None",[682,744,745,750,753],{},[700,746,747],{},[475,748,749],{},"refunds.get",[700,751,752],{},"refund ID",[700,754,714],{},[489,756,758],{"id":757},"refund-part-of-a-line","Refund part of a line",[494,760,762],{"className":496,"code":761,"language":498,"meta":499,"style":499},"from vatly import RequestOptions, VatlyClient\n\n\ndef example(client: VatlyClient):\n    return client.orders.create_refund(\n        \"order_example\",\n        {\n            \"items\": [\n                {\"itemId\": \"order_item_example\", \"amount\": {\"value\": \"5.00\", \"currency\": \"EUR\"}}\n            ],\n        },\n        options=RequestOptions(idempotency_key=\"partial-refund:42\"),\n    )\n",[475,763,764,778,782,786,802,819,829,834,849,922,927,933,957],{"__ignoreMap":499},[503,765,766,768,770,772,774,776],{"class":505,"line":506},[503,767,510],{"class":509},[503,769,514],{"class":513},[503,771,517],{"class":509},[503,773,520],{"class":513},[503,775,524],{"class":523},[503,777,527],{"class":513},[503,779,780],{"class":505,"line":530},[503,781,534],{"emptyLinePlaceholder":533},[503,783,784],{"class":505,"line":537},[503,785,534],{"emptyLinePlaceholder":533},[503,787,788,790,792,794,796,798,800],{"class":505,"line":542},[503,789,546],{"class":545},[503,791,550],{"class":549},[503,793,553],{"class":523},[503,795,557],{"class":556},[503,797,560],{"class":523},[503,799,563],{"class":513},[503,801,566],{"class":523},[503,803,804,806,808,810,812,814,817],{"class":505,"line":569},[503,805,654],{"class":509},[503,807,578],{"class":513},[503,809,487],{"class":523},[503,811,584],{"class":583},[503,813,487],{"class":523},[503,815,816],{"class":549},"create_refund",[503,818,592],{"class":523},[503,820,821,823,825,827],{"class":505,"line":595},[503,822,598],{"class":523},[503,824,602],{"class":601},[503,826,605],{"class":523},[503,828,608],{"class":523},[503,830,831],{"class":505,"line":611},[503,832,833],{"class":523},"        {\n",[503,835,836,839,842,844,846],{"class":505,"line":617},[503,837,838],{"class":523},"            \"",[503,840,841],{"class":601},"items",[503,843,605],{"class":523},[503,845,560],{"class":523},[503,847,848],{"class":523}," [\n",[503,850,851,854,856,859,861,863,866,869,871,873,875,878,880,882,885,887,890,892,894,896,899,901,903,905,908,910,912,914,917,919],{"class":505,"line":645},[503,852,853],{"class":523},"                {",[503,855,605],{"class":523},[503,857,858],{"class":601},"itemId",[503,860,605],{"class":523},[503,862,560],{"class":523},[503,864,865],{"class":523}," \"",[503,867,868],{"class":601},"order_item_example",[503,870,605],{"class":523},[503,872,524],{"class":523},[503,874,865],{"class":523},[503,876,877],{"class":601},"amount",[503,879,605],{"class":523},[503,881,560],{"class":523},[503,883,884],{"class":523}," {",[503,886,605],{"class":523},[503,888,889],{"class":601},"value",[503,891,605],{"class":523},[503,893,560],{"class":523},[503,895,865],{"class":523},[503,897,898],{"class":601},"5.00",[503,900,605],{"class":523},[503,902,524],{"class":523},[503,904,865],{"class":523},[503,906,907],{"class":601},"currency",[503,909,605],{"class":523},[503,911,560],{"class":523},[503,913,865],{"class":523},[503,915,916],{"class":601},"EUR",[503,918,605],{"class":523},[503,920,921],{"class":523},"}}\n",[503,923,924],{"class":505,"line":651},[503,925,926],{"class":523},"            ],\n",[503,928,930],{"class":505,"line":929},11,[503,931,932],{"class":523},"        },\n",[503,934,936,938,940,942,944,946,948,950,953,955],{"class":505,"line":935},12,[503,937,620],{"class":556},[503,939,575],{"class":523},[503,941,625],{"class":549},[503,943,553],{"class":523},[503,945,630],{"class":556},[503,947,575],{"class":523},[503,949,605],{"class":523},[503,951,952],{"class":601},"partial-refund:42",[503,954,605],{"class":523},[503,956,642],{"class":523},[503,958,960],{"class":505,"line":959},13,[503,961,648],{"class":523},[471,963,964,966,967,969],{},[475,965,858],{}," must be an original order line ID. ",[475,968,877],{}," is before tax and must not\nexceed that line's remaining refundable amount. Preserve the order currency and\nuse decimal strings, never rounded floats. Vatly calculates the tax reversal.",[489,971,973],{"id":972},"read-and-cancel-a-pending-refund","Read and cancel a pending refund",[494,975,977],{"className":496,"code":976,"language":498,"meta":499,"style":499},"from vatly import VatlyClient\n\n\ndef example(client: VatlyClient):\n    refunds = list(client.refunds.list_all({\"limit\": 25}))\n    scoped = list(client.orders.list_all_refunds(\"order_example\"))\n    refund = client.orders.get_refund(\"order_example\", \"refund_example\")\n    client.orders.cancel_refund(\"order_example\", refund.id)\n    return refunds, scoped\n",[475,978,979,989,993,997,1013,1057,1090,1127,1159],{"__ignoreMap":499},[503,980,981,983,985,987],{"class":505,"line":506},[503,982,510],{"class":509},[503,984,514],{"class":513},[503,986,517],{"class":509},[503,988,527],{"class":513},[503,990,991],{"class":505,"line":530},[503,992,534],{"emptyLinePlaceholder":533},[503,994,995],{"class":505,"line":537},[503,996,534],{"emptyLinePlaceholder":533},[503,998,999,1001,1003,1005,1007,1009,1011],{"class":505,"line":542},[503,1000,546],{"class":545},[503,1002,550],{"class":549},[503,1004,553],{"class":523},[503,1006,557],{"class":556},[503,1008,560],{"class":523},[503,1010,563],{"class":513},[503,1012,566],{"class":523},[503,1014,1015,1018,1020,1024,1026,1028,1030,1033,1035,1038,1041,1043,1046,1048,1050,1054],{"class":505,"line":569},[503,1016,1017],{"class":513},"    refunds ",[503,1019,575],{"class":523},[503,1021,1023],{"class":1022},"sBMFI"," list",[503,1025,553],{"class":523},[503,1027,557],{"class":549},[503,1029,487],{"class":523},[503,1031,1032],{"class":583},"refunds",[503,1034,487],{"class":523},[503,1036,1037],{"class":549},"list_all",[503,1039,1040],{"class":523},"({",[503,1042,605],{"class":523},[503,1044,1045],{"class":601},"limit",[503,1047,605],{"class":523},[503,1049,560],{"class":523},[503,1051,1053],{"class":1052},"sbssI"," 25",[503,1055,1056],{"class":523},"}))\n",[503,1058,1059,1062,1064,1066,1068,1070,1072,1074,1076,1079,1081,1083,1085,1087],{"class":505,"line":595},[503,1060,1061],{"class":513},"    scoped ",[503,1063,575],{"class":523},[503,1065,1023],{"class":1022},[503,1067,553],{"class":523},[503,1069,557],{"class":549},[503,1071,487],{"class":523},[503,1073,584],{"class":583},[503,1075,487],{"class":523},[503,1077,1078],{"class":549},"list_all_refunds",[503,1080,553],{"class":523},[503,1082,605],{"class":523},[503,1084,602],{"class":601},[503,1086,605],{"class":523},[503,1088,1089],{"class":523},"))\n",[503,1091,1092,1094,1096,1098,1100,1102,1104,1107,1109,1111,1113,1115,1117,1119,1122,1124],{"class":505,"line":611},[503,1093,572],{"class":513},[503,1095,575],{"class":523},[503,1097,578],{"class":513},[503,1099,487],{"class":523},[503,1101,584],{"class":583},[503,1103,487],{"class":523},[503,1105,1106],{"class":549},"get_refund",[503,1108,553],{"class":523},[503,1110,605],{"class":523},[503,1112,602],{"class":601},[503,1114,605],{"class":523},[503,1116,524],{"class":523},[503,1118,865],{"class":523},[503,1120,1121],{"class":601},"refund_example",[503,1123,605],{"class":523},[503,1125,1126],{"class":523},")\n",[503,1128,1129,1132,1134,1136,1138,1141,1143,1145,1147,1149,1151,1153,1155,1157],{"class":505,"line":617},[503,1130,1131],{"class":513},"    client",[503,1133,487],{"class":523},[503,1135,584],{"class":583},[503,1137,487],{"class":523},[503,1139,1140],{"class":549},"cancel_refund",[503,1142,553],{"class":523},[503,1144,605],{"class":523},[503,1146,602],{"class":601},[503,1148,605],{"class":523},[503,1150,524],{"class":523},[503,1152,657],{"class":549},[503,1154,487],{"class":523},[503,1156,662],{"class":583},[503,1158,1126],{"class":523},[503,1160,1161,1163,1166,1168],{"class":505,"line":645},[503,1162,654],{"class":509},[503,1164,1165],{"class":513}," refunds",[503,1167,524],{"class":523},[503,1169,1170],{"class":513}," scoped\n",[471,1172,1173],{},"Cancellation is only allowed while Vatly permits it; it is not a reversal of a\ncompleted refund. Signed refund events confirm completion, failure or cancellation.",[676,1175,1176,1186],{},[679,1177,1178],{},[682,1179,1180,1183],{},[685,1181,1182],{},"Response field",[685,1184,1185],{},"Meaning",[695,1187,1188,1201,1211,1221],{},[682,1189,1190,1198],{},[700,1191,1192,1194,1195],{},[475,1193,662],{},", ",[475,1196,1197],{},"status",[700,1199,1200],{},"Refund identifier and state",[682,1202,1203,1208],{},[700,1204,1205],{},[475,1206,1207],{},"original_order_id",[700,1209,1210],{},"Order being reversed",[682,1212,1213,1218],{},[700,1214,1215],{},[475,1216,1217],{},"lines",[700,1219,1220],{},"Refunded lines and financial details",[682,1222,1223,1231],{},[700,1224,1225,1194,1228],{},[475,1226,1227],{},"testmode",[475,1229,1230],{},"metadata",[700,1232,1233],{},"Mode and custom data",[471,1235,1236,1242,1243],{},[484,1237,1241],{"href":1238,"rel":1239},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference\u002Frefunds",[1240],"nofollow","Refund API reference"," · ",[484,1244,1246],{"href":1245},"\u002Fpackages\u002Fpython\u002Fapi#refunds","All methods",[1248,1249,1250],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":499,"searchDepth":530,"depth":530,"links":1252},[1253,1254,1255],{"id":491,"depth":530,"text":492},{"id":757,"depth":530,"text":758},{"id":972,"depth":530,"text":973},"Refunds reverse some or all of an order.","md",null,{},{"title":104},{"title":104,"description":1256},"NK5szdOS-7lPIviW94VrMWTWheGeYaH8JpixKXq6KdE",[1264,1266],{"title":148,"path":345,"stem":346,"description":1265,"children":-1},"Sell a digital product once rather than on a recurring schedule.",{"title":108,"path":351,"stem":352,"description":1267,"children":-1},"Read payment disputes and retain their financial snapshots for accounting.",1794594931956]