An overdue penalty is charged at the loan’s due instant and, because the LMS
settles penalties before interest and principal, the next repayment pays it
first. Sometimes that penalty should never have applied: the customer paid on
the wallet before the due instant, but the repayment reached us after it and
without a transactionAt, so it settled the penalty instead of removing it.This endpoint corrects that. It does not move money. It returns what was
paid on the penalty to the loan as a credit balance, and the loan moves to
Overpaid. You then return that credit to the customer with
Refund an overpayment, exactly as for any other
overpayment.Two equivalent forms, /v1/loans/{loan_id}/penalties/refund and the
externalId form above. Prefer the externalId form for partner integrations.
This is a two-step correction. After this call the customer is owed money
and the loan shows it as totalOverpaid. The correction is complete only
when you have credited the wallet and recorded it with POST .../refunds.
Read totalOverpaid from this response and pass it as that call’s amount.
Path parameters
string
required
The loan’s externalId. On the /v1/loans/{loan_id}/penalties/refund form,
this is the numeric LMS id instead.
Request body
string
required
Your own reference for this correction, for example the support ticket or
the wallet transaction id that proved the payment was on time (max 100
characters). If a penalty refund carrying this key has already been recorded
on the loan, the original is returned unchanged instead of a second refund
being made. This is what makes a retry safe.
string
Optional free text recorded on the LMS transaction, such as why the penalty
was not owed (max 500 characters).
There is no amount: the whole paid penalty is returned, and the amount you
state is on the follow-up refund call. There is no transactionDate either:
the LMS books a charge refund on the day it is recorded and accepts no other.
Examples
# 1. Return the paid penalty to the loancurl -sf -X POST "$BASE/v1/loans/external/loan-ext-12345/penalties/refund" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "idempotencyKey": "cs-ticket-4411", "note": "wallet shows payment before the due instant" }'# 2. Credit the wallet, then record it (amount = totalOverpaid from step 1)curl -sf -X POST "$BASE/v1/loans/external/loan-ext-12345/refunds" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "amount": 1000, "idempotencyKey": "wallet-refund-abc123" }'
Response
200 OK returns the refund transaction(s) and the loan’s position afterwards.
One Charge Refund transaction per penalty charge refunded. A loan normally
carries one penalty, so this is normally one entry.
string
Overpaid after a successful refund on a settled loan.
number
The credit now owed to the customer. Pass this as amount to
POST .../refunds.
Errors
Code
Sub-code
When
failed_precondition
no_paid_penalty
The loan carries no paid penalty: none was charged, it was waived, or it is still outstanding. An outstanding penalty is settled by the repayment, not refunded
failed_precondition
penalty_already_refunded
Every paid penalty on the loan has already been returned to it, under a different key. Retrying with the original key returns that refund instead
invalid_argument
validation_error
idempotencyKey is missing or longer than 100 characters; note is longer than 500 characters
not_found
loan_not_found
No loan with that id or externalId
Retrying a refund that already succeeded is not an error: with the same
idempotencyKey you get the original transaction back with 200.
Avoiding the need for this
This endpoint exists for a penalty that was paid because timing evidence
arrived late. Send transactionAt, the exact wallet time, on every repayment
including the first call. A payment made before the due instant then removes
its penalty as the repayment posts, and there is nothing to refund. See
Record a repayment.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Blackswan","description":"Blackswan partner-facing HTTP API for customers, loans, repayments, and credit decisions.","colors":{"primary":"#14213d","light":"#e5e5e5","dark":"#000000"},"logo":{"light":"https://mintcdn.com/bsa/vWtHf-rJQE_2VwyJ/logo/light.png?fit=max\u0026auto=format\u0026n=vWtHf-rJQE_2VwyJ\u0026q=85\u0026s=aab493cc77e7b1a2c0b7b5886fa28b98","dark":"https://mintcdn.com/bsa/vWtHf-rJQE_2VwyJ/logo/dark.png?fit=max\u0026auto=format\u0026n=vWtHf-rJQE_2VwyJ\u0026q=85\u0026s=0cd558ea0df493a229f0bccd3e747bce"},"favicon":"https://mintcdn.com/bsa/vWtHf-rJQE_2VwyJ/favicon.png?fit=max\u0026auto=format\u0026n=vWtHf-rJQE_2VwyJ\u0026q=85\u0026s=d92c6dd66658e104459e611d50057ba9","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api-staging.bsa.ai"}},"background":{"color":{"light":"#ffffff","dark":"#0d0d0f"}},"navbar":{"links":[{"href":"https://bsa.ai","label":"Blackswan"},{"href":"mailto:hello@bsa.ai","label":"Contact"}]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bsa","hasAudioNarration":false,"actualSubdomain":"bsa","customDomains":["docs.lms.bsa.ai"],"gitSource":{"type":"github","owner":"tausi-africa","repo":"bsa-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10baca9ffae5051c402950"},"entitlements":{},"buildId":"6af2add25c785f33431c6441","clientVersion":"0.0.4448","searchFilterCounts":[{"language":"default","tag":"Loans","count":11},{"language":"default","tag":"Customers","count":7},{"language":"default","tag":"Repayments","count":6},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"Credit Scoring","count":2},{"language":"default","tag":"Getting Started","count":2},{"language":"default","tag":"Loan Products","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"repayments/refund-penalty","slug":"/repayments/refund-penalty","pageMetadata":{"title":"Refund a paid penalty","description":"Return a penalty the customer already paid, when it turns out not to have been owed.","api":"POST /v1/loans/external/{loan_external_id}/penalties/refund","href":"/repayments/refund-penalty"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Return a penalty the customer already paid, when it turns out not to have been owed.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`An overdue penalty is charged at the loan’s due instant and, because the LMS\nsettles penalties before interest and principal, the next repayment pays it\nfirst. Sometimes that penalty should never have applied: the customer paid on\nthe wallet before the due instant, but the repayment reached us after it and\nwithout a `,_jsx(_components.code,{children:`transactionAt`}),`, so it settled the penalty instead of removing it.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint corrects that. It does `,_jsx(_components.strong,{children:`not`}),` move money. It returns what was\npaid on the penalty to the loan as a credit balance, and the loan moves to\n`,_jsx(_components.code,{children:`Overpaid`}),`. You then return that credit to the customer with\n`,_jsx(_components.a,{href:`/repayments/refund`,children:`Refund an overpayment`}),`, exactly as for any other\noverpayment.`]}),`\n`,_jsxs(_components.p,{children:[`Two equivalent forms, `,_jsx(_components.code,{children:`/v1/loans/{loan_id}/penalties/refund`}),` and the\nexternalId form above. Prefer the externalId form for partner integrations.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This is a two-step correction.`}),` After this call the customer is owed money\nand the loan shows it as `,_jsx(_components.code,{children:`totalOverpaid`}),`. The correction is complete only\nwhen you have credited the wallet and recorded it with `,_jsx(_components.code,{children:`POST .../refunds`}),`.\nRead `,_jsx(_components.code,{children:`totalOverpaid`}),` from this response and pass it as that call’s `,_jsx(_components.code,{children:`amount`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`loan_external_id`,type:`string`,required:true,id:`param-loan-external-id`,children:_jsxs(_components.p,{children:[`The loan’s externalId. On the `,_jsx(_components.code,{children:`/v1/loans/{loan_id}/penalties/refund`}),` form,\nthis is the numeric LMS id instead.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`idempotencyKey`,type:`string`,required:true,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Your own reference for this correction, for example the support ticket or\nthe wallet transaction id that proved the payment was on time (max 100\ncharacters). If a penalty refund carrying this key has already been recorded\non the loan, the original is returned unchanged instead of a second refund\nbeing made. `,_jsx(_components.strong,{children:`This is what makes a retry safe.`})]})}),`\n`,_jsx(ParamField,{body:`note`,type:`string`,id:`param-note`,children:_jsx(_components.p,{children:`Optional free text recorded on the LMS transaction, such as why the penalty\nwas not owed (max 500 characters).`})}),`\n`,_jsxs(_components.p,{children:[`There is no `,_jsx(_components.code,{children:`amount`}),`: the whole paid penalty is returned, and the amount you\nstate is on the follow-up refund call. There is no `,_jsx(_components.code,{children:`transactionDate`}),` either:\nthe LMS books a charge refund on the day it is recorded and accepts no other.`]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Return the paid penalty to the loan`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sf`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/v1/loans/external/loan-ext-12345/penalties/refund\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TOKEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"idempotencyKey\": \"cs-ticket-4411\", \"note\": \"wallet shows payment before the due instant\" }'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Credit the wallet, then record it (amount = totalOverpaid from step 1)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sf`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/v1/loans/external/loan-ext-12345/refunds\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TOKEN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"amount\": 1000, \"idempotencyKey\": \"wallet-refund-abc123\" }'`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` returns the refund transaction(s) and the loan’s position afterwards.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"refunded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transactions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1786\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Charge Refund\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-28\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"overpayment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"idempotencyKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cs-ticket-4411\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"posted\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"idempotencyKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cs-ticket-4411\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loanStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Overpaid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalOutstanding\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalOverpaid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ResponseField,{name:`refunded`,type:`number`,id:`param-refunded`,children:_jsx(_components.p,{children:`The total returned to the loan by this call.`})}),`\n`,_jsx(ResponseField,{name:`transactions`,type:`array`,id:`param-transactions`,children:_jsxs(_components.p,{children:[`One `,_jsx(_components.code,{children:`Charge Refund`}),` transaction per penalty charge refunded. A loan normally\ncarries one penalty, so this is normally one entry.`]})}),`\n`,_jsx(ResponseField,{name:`loanStatus`,type:`string`,id:`param-loan-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Overpaid`}),` after a successful refund on a settled loan.`]})}),`\n`,_jsx(ResponseField,{name:`totalOverpaid`,type:`number`,id:`param-total-overpaid`,children:_jsxs(_components.p,{children:[`The credit now owed to the customer. Pass this as `,_jsx(_components.code,{children:`amount`}),` to\n`,_jsx(_components.code,{children:`POST .../refunds`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Sub-code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed_precondition`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`no_paid_penalty`})}),_jsx(_components.td,{children:`The loan carries no paid penalty: none was charged, it was waived, or it is still outstanding. An outstanding penalty is settled by the repayment, not refunded`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed_precondition`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`penalty_already_refunded`})}),_jsx(_components.td,{children:`Every paid penalty on the loan has already been returned to it, under a different key. Retrying with the original key returns that refund instead`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_argument`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`validation_error`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`idempotencyKey`}),` is missing or longer than 100 characters; `,_jsx(_components.code,{children:`note`}),` is longer than 500 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`not_found`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`loan_not_found`})}),_jsx(_components.td,{children:`No loan with that id or externalId`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Retrying a refund that already succeeded is `,_jsx(_components.strong,{children:`not`}),` an error: with the same\n`,_jsx(_components.code,{children:`idempotencyKey`}),` you get the original transaction back with `,_jsx(_components.code,{children:`200`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`avoiding-the-need-for-this`,children:`Avoiding the need for this`}),`\n`,_jsxs(_components.p,{children:[`This endpoint exists for a penalty that was paid because timing evidence\narrived late. Send `,_jsx(_components.code,{children:`transactionAt`}),`, the exact wallet time, on every repayment\nincluding the first call. A payment made before the due instant then removes\nits penalty as the repayment posts, and there is nothing to refund. See\n`,_jsx(_components.a,{href:`/repayments/repay`,children:`Record a repayment`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Refund a paid penalty","description":"Return a penalty the customer already paid, when it turns out not to have been owed.","api":"POST /v1/loans/external/{loan_external_id}/penalties/refund","href":"/repayments/refund-penalty"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Path parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Request body","slug":"request-body","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Avoiding the need for this","slug":"avoiding-the-need-for-this","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Refund a paid penalty","path":"/v1/loans/external/{loan_external_id}/penalties/refund","servers":[{"url":"https://api-staging.bsa.ai"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"loan_external_id":{"schema":[{"type":"string","description":"The loan’s externalId. On the `/v1/loans/{loan_id}/penalties/refund` form, this is the numeric LMS id instead.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"idempotencyKey":[{"type":"string","description":"Your own reference for this correction, for example the support ticket or the wallet transaction id that proved the payment was on time (max 100 characters). If a penalty refund carrying this key has already been recorded on the loan, the original is returned unchanged instead of a second refund being made. This is what makes a retry safe.","required":true}],"note":[{"type":"string","description":"Optional free text recorded on the LMS transaction, such as why the penalty was not owed (max 500 characters)."}]}}],"examples":{"example":{"value":{"idempotencyKey":"\u003cstring>","note":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"refunded":[{"type":"number","description":"The total returned to the loan by this call."}],"transactions":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"One `Charge Refund` transaction per penalty charge refunded. A loan normally carries one penalty, so this is normally one entry."}],"loanStatus":[{"type":"string","description":"`Overpaid` after a successful refund on a settled loan."}],"totalOverpaid":[{"type":"number","description":"The credit now owed to the customer. Pass this as `amount` to `POST .../refunds` ."}]}}],"examples":{"example":{"value":{"refunded":123,"transactions":[{}],"loanStatus":"\u003cstring>","totalOverpaid":123}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"bsa","siteName":"Blackswan","title":"Refund a paid penalty - Blackswan","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-28T11:41:39.538Z","originalFileLocation":"repayments/refund-penalty.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Return a penalty the customer already paid, when it turns out not to have been owed.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Blackswan\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Refund a paid penalty - Blackswan\">\u003cmeta data-mint-head property=\"og:description\" content=\"Return a penalty the customer already paid, when it turns out not to have been owed.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Blackswan\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.lms.bsa.ai/repayments/refund-penalty\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bsa.mintlify.site/_mintlify/api/og/v2?division=Repayments\u0026amp;title=Refund+a+paid+penalty\u0026amp;description=Return+a+penalty+the+customer+already+paid%2C+when+it+turns+out+not+to+have+been+owed.\u0026amp;theme=04ef1c6275fc089e56d4178b\u0026amp;signature=4bd192612e78f0bf3660b86e7efea7e1ae287eb386d0c7ed7ce5c49ec2a1ddf3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Refund a paid penalty - Blackswan\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Return a penalty the customer already paid, when it turns out not to have been owed.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bsa.mintlify.site/_mintlify/api/og/v2?division=Repayments\u0026amp;title=Refund+a+paid+penalty\u0026amp;description=Return+a+penalty+the+customer+already+paid%2C+when+it+turns+out+not+to+have+been+owed.\u0026amp;theme=04ef1c6275fc089e56d4178b\u0026amp;signature=4bd192612e78f0bf3660b86e7efea7e1ae287eb386d0c7ed7ce5c49ec2a1ddf3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/bsa/_6Q0gFWsnj0uC_hg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Blackswan\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#14213d\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.lms.bsa.ai/repayments/refund-penalty\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/repayments/refund-penalty.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.lms.bsa.ai/#organization\",\"name\":\"Blackswan\",\"url\":\"https://docs.lms.bsa.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bsa/vWtHf-rJQE_2VwyJ/logo/light.png?fit=max\u0026auto=format\u0026n=vWtHf-rJQE_2VwyJ\u0026q=85\u0026s=aab493cc77e7b1a2c0b7b5886fa28b98\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.lms.bsa.ai#website\",\"name\":\"Blackswan\",\"url\":\"https://docs.lms.bsa.ai\",\"publisher\":{\"@id\":\"https://docs.lms.bsa.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.lms.bsa.ai/repayments/refund-penalty#webpage\",\"url\":\"https://docs.lms.bsa.ai/repayments/refund-penalty\",\"name\":\"Refund a paid penalty\",\"description\":\"Return a penalty the customer already paid, when it turns out not to have been owed.\",\"dateModified\":\"2026-09-28T11:41:39.538Z\",\"isPartOf\":{\"@id\":\"https://docs.lms.bsa.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lms.bsa.ai/repayments/refund-penalty#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lms.bsa.ai/repayments/refund-penalty#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Repayments\",\"item\":\"https://docs.lms.bsa.ai/repayments/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Refund a paid penalty\",\"item\":\"https://docs.lms.bsa.ai/repayments/refund-penalty\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lms.bsa.ai/repayments/refund-penalty#apireference\",\"headline\":\"Refund a paid penalty\",\"name\":\"Refund a paid penalty\",\"description\":\"Return a penalty the customer already paid, when it turns out not to have been owed.\",\"url\":\"https://docs.lms.bsa.ai/repayments/refund-penalty\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lms.bsa.ai/repayments/refund-penalty#webpage\"},\"dateModified\":\"2026-09-28T11:41:39.538Z\",\"publisher\":{\"@id\":\"https://docs.lms.bsa.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.lms.bsa.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Blackswan\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Blackswan\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/repayments/refund-penalty.md","siteName":"Blackswan","nav":{"global":null,"groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Concepts","pages":[{"title":"Authentication","href":"/concepts/authentication"},{"title":"Authorization","href":"/concepts/authorization"},{"title":"IDs, dates, and money","href":"/concepts/ids-dates-money"},{"title":"Pagination","href":"/concepts/pagination"},{"title":"Errors","href":"/concepts/errors"}]},{"group":"Customers","pages":[{"title":"Customers","href":"/customers/overview"},{"title":"Create a customer","api":"POST /v1/customers","href":"/customers/create"},{"title":"List customers","api":"GET /v1/customers","href":"/customers/list"},{"title":"Get a customer","api":"GET /v1/customers/external/{customer_external_id}","href":"/customers/get"},{"title":"Update a customer","api":"PUT /v1/customers/external/{customer_external_id}","href":"/customers/update"},{"title":"Delete a customer","api":"DELETE /v1/customers/{customer_id}","href":"/customers/delete"},{"title":"Close a customer","api":"POST /v1/customers/{customer_id}/close","href":"/customers/close"}]},{"group":"Loans","pages":[{"title":"Loans","href":"/loans/overview"},{"title":"Create a loan","api":"POST /v1/loans","href":"/loans/create"},{"title":"List loans","api":"GET /v1/loans","href":"/loans/list"},{"title":"Get a loan","api":"GET /v1/loans/external/{loan_external_id}","href":"/loans/get"},{"title":"Update a loan","api":"PUT /v1/loans/{loan_id}","href":"/loans/update"},{"title":"Delete a loan","api":"DELETE /v1/loans/{loan_id}","href":"/loans/delete"},{"title":"Roll back a loan","api":"POST /v1/loans/external/{loan_external_id}/rollback","href":"/loans/rollback"},{"title":"Undo disbursal","api":"POST /v1/loans/{loan_id}/undo-disbursal","href":"/loans/undo-disbursal"},{"title":"Undo approval","api":"POST /v1/loans/{loan_id}/undo-approval","href":"/loans/undo-approval"},{"title":"Adjust disbursement date","api":"POST /v1/loans/external/{loan_external_id}/adjust-disbursement-date","href":"/loans/adjust-disbursement-date"},{"title":"Write off a loan","api":"POST /v1/loans/{loan_id}/writeoff","href":"/loans/writeoff"}]},{"group":"Repayments","pages":[{"title":"Repayments","href":"/repayments/overview"},{"title":"Record a repayment","api":"POST /v1/loans/external/{loan_external_id}/repayments","href":"/repayments/repay"},{"title":"Refund an overpayment","description":"Return an overpayment credit to the customer and close the loan.","api":"POST /v1/loans/external/{loan_external_id}/refunds","href":"/repayments/refund"},{"title":"Refund a paid penalty","api":"POST /v1/loans/external/{loan_external_id}/penalties/refund","href":"/repayments/refund-penalty"},{"title":"List repayments","description":"Fetch the paginated list of a loan's repayment transactions.","api":"GET /v1/loans/external/{loan_external_id}/repayments","href":"/repayments/list"},{"title":"Get a repayment","api":"GET /v1/loans/external/{loan_external_id}/repayments/{transaction_id}","href":"/repayments/get"}]},{"group":"Loan Products","pages":[{"title":"List loan products","api":"GET /v1/loan-products","href":"/loan-products/list"},{"title":"Get a loan product","api":"GET /v1/loan-products/{product_id}","href":"/loan-products/get"}]},{"group":"Credit Scoring","pages":[{"title":"Get credit scorecard","api":"GET /v1/credit-scorecard/{external_id}","href":"/credit-decisions/scorecard"},{"title":"Boost credit limit","api":"POST /v1/credit-boost","href":"/credit-decisions/boost"}]}]},"basePath":"","title":"Refund a paid penalty - Blackswan","deploymentId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","buildId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-BD9G1WMi.js","snippetPresets-Bcqr8I2u.js","utils-BrYn4XiY.js","style-to-object-BY3JEAdk.js","utils-CYrCnchl.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CNFO66BS.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BneVo7uA.js","_Uint8Array-n4RvRzp3.js","isObject-FP1Yky1u.js","ApiExamples-C1YMsTjy.js","usePlaygroundInputsStore-DayW4kZ9.js","shallow-DDCzdKmR.js","isEqual-CBVoazy8.js","CodeSnippets-CWandYY5.js","CodeSnippet-grFP6YU_.js","use-playground-group-access-BBqHUxQK.js","Page-DBPN_x5x.js","api-description-markdown-1J-AA_Kv.js","DynamicMarkdown-Dgh_e4rL.js","SectionHeading-BP6Np9Uh.js","MethodPill-4k_Ty_Xv.js","getPastedJson-CWUNKLcr.js","Check2Icon-Cs4FQb2J.js","axios-CsQoIw0U.js"]}