When a repayment exceeds what the loan still owes, the excess stays on the
loan as a credit balance and the loan moves to Overpaid. While it is in
that state no further repayment can be posted to it — the loan is
settled, and the customer is owed money back.This endpoint records that you have returned that money. It does not move
money itself: the wallet credit is yours to make. Once recorded, the credit
is cleared and the loan closes.Two equivalent forms — prefer the externalId form for partner integrations.
Credit the wallet first, then call this. There is no way to un-refund. If
you record the refund with us and your wallet credit then fails, our ledger
says the customer was repaid when they were not. The safe order is: move the
money, then call this endpoint, retrying with the same idempotencyKey until
it succeeds.
Path parameters
string
required
The loan’s externalId. On the /v1/loans/{loan_id}/refunds form, this is
the numeric LMS id instead.
Request body
number
required
The overpayment you are refunding. It must equal the loan’s current
overpayment exactly; a disagreement is rejected rather than corrected,
because it means you are working from a figure that has since changed. You
already hold this number, since you credited the wallet with it before
calling, and stating it is what ties the two sides to the same figure.
string
required
Your own reference for the wallet credit that returned the money (max 100
characters). If a refund carrying this key has already been recorded on the
loan, the original transaction is returned unchanged instead of a second
refund being made. This is what makes a retry safe, and it keeps working
after the loan has closed.
string
Optional value date in ISO yyyy-MM-dd, defaulting to today. Unlike a
repayment there is no transactionAt: nothing about a refund depends on the
exact instant.
Examples
# Read the credit, return it in the wallet, then record it herecurl -sf "$BASE/v1/loans/external/loan-ext-12345" \ -H "Authorization: Bearer $TOKEN" | jq '{status, totalOverpaid}'# { "status": "Overpaid", "totalOverpaid": 900 }curl -sf -X POST "$BASE/v1/loans/external/loan-ext-12345/refunds" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "amount": 900, "idempotencyKey": "wallet-refund-abc123" }'
Response
200 OK returns the refund transaction plus the loan’s position afterwards.
The loan is now closed and carries nothing outstanding.
Closed (obligations met) after a successful refund. The overpayment is
cleared and totalOverpaid on the loan returns to 0.
number
The credit that was returned.
Errors
Code
Sub-code
When
failed_precondition
loan_not_overpaid
The loan carries no overpayment. Either it was never overpaid, or the credit has already been refunded. The message includes the loan’s current status
invalid_argument
validation_error
amount or idempotencyKey is missing; amount disagrees with the loan’s overpayment; transactionDate is not ISO yyyy-MM-dd or is in the future; idempotencyKey is longer than 100 characters
not_found
loan_not_found
No loan with that id or externalId
already_exists
idempotency_key_reused
The idempotencyKey is already recorded on this loan with a different amount. The original refund stands; a different refund needs a new key
already_exists
transaction_reversed
The transaction recorded under this key has since been reversed; the key cannot be replayed or reused
Retrying a refund that already succeeded is not an error: with the same
idempotencyKeyand the same amount you get the original transaction
back with 200, for as long as the loan exists.
Avoiding overpayment in the first place
A refund is a recovery path, not a routine one. To stay out of it, read
totalOutstanding immediately before each debit and debit exactly that
figure — never a cached amount, never rounded up. 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","slug":"/repayments/refund","pageMetadata":{"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"},"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 an overpayment credit to the customer and close the loan.\"\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:[`When a repayment exceeds what the loan still owes, the excess stays on the\nloan as a credit balance and the loan moves to `,_jsx(_components.code,{children:`Overpaid`}),`. While it is in\nthat state `,_jsx(_components.strong,{children:`no further repayment can be posted to it`}),` — the loan is\nsettled, and the customer is owed money back.`]}),`\n`,_jsx(_components.p,{children:`This endpoint records that you have returned that money. It does not move\nmoney itself: the wallet credit is yours to make. Once recorded, the credit\nis cleared and the loan closes.`}),`\n`,_jsx(_components.p,{children:`Two equivalent forms — prefer the externalId form for partner integrations.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Credit the wallet first, then call this.`}),` There is no way to un-refund. If\nyou record the refund with us and your wallet credit then fails, our ledger\nsays the customer was repaid when they were not. The safe order is: move the\nmoney, then call this endpoint, retrying with the same `,_jsx(_components.code,{children:`idempotencyKey`}),` until\nit succeeds.`]})}),`\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}/refunds`}),` form, this is\nthe numeric LMS id instead.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`amount`,type:`number`,required:true,id:`param-amount`,children:_jsx(_components.p,{children:`The overpayment you are refunding. It must equal the loan’s current\noverpayment exactly; a disagreement is rejected rather than corrected,\nbecause it means you are working from a figure that has since changed. You\nalready hold this number, since you credited the wallet with it before\ncalling, and stating it is what ties the two sides to the same figure.`})}),`\n`,_jsx(ParamField,{body:`idempotencyKey`,type:`string`,required:true,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Your own reference for the wallet credit that returned the money (max 100\ncharacters). If a refund carrying this key has already been recorded on the\nloan, the original transaction is returned unchanged instead of a second\nrefund being made. `,_jsx(_components.strong,{children:`This is what makes a retry safe`}),`, and it keeps working\nafter the loan has closed.`]})}),`\n`,_jsx(ParamField,{body:`transactionDate`,type:`string`,id:`param-transaction-date`,children:_jsxs(_components.p,{children:[`Optional value date in ISO `,_jsx(_components.code,{children:`yyyy-MM-dd`}),`, defaulting to today. Unlike a\nrepayment there is no `,_jsx(_components.code,{children:`transactionAt`}),`: nothing about a refund depends on the\nexact instant.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Read the credit, return it in the wallet, then record it here`})}),`\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:`#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\"`}),_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\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{status, totalOverpaid}'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# { \"status\": \"Overpaid\", \"totalOverpaid\": 900 }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\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\": 900, \"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 plus the loan’s position afterwards.\nThe loan is now closed and carries nothing outstanding.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,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:`12`,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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"739\"`}),_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:`\"Credit Balance 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-22\"`}),_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:`900`}),_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:`900`}),_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:`\"wallet-refund-abc123\"`}),_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\"`}),_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:`\"Closed (obligations met)\"`}),_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:` \"availableCreditLimit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(ResponseField,{name:`loanStatus`,type:`string`,id:`param-loan-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Closed (obligations met)`}),` after a successful refund. The overpayment is\ncleared and `,_jsx(_components.code,{children:`totalOverpaid`}),` on the loan returns to `,_jsx(_components.code,{children:`0`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`amount`,type:`number`,id:`param-amount-1`,children:_jsx(_components.p,{children:`The credit that was returned.`})}),`\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:`loan_not_overpaid`})}),_jsx(_components.td,{children:`The loan carries no overpayment. Either it was never overpaid, or the credit has already been refunded. The message includes the loan’s current status`})]}),_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:`amount`}),` or `,_jsx(_components.code,{children:`idempotencyKey`}),` is missing; `,_jsx(_components.code,{children:`amount`}),` disagrees with the loan’s overpayment; `,_jsx(_components.code,{children:`transactionDate`}),` is not ISO `,_jsx(_components.code,{children:`yyyy-MM-dd`}),` or is in the future; `,_jsx(_components.code,{children:`idempotencyKey`}),` is longer than 100 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`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`already_exists`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`idempotency_key_reused`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`idempotencyKey`}),` is already recorded on this loan with a different `,_jsx(_components.code,{children:`amount`}),`. The original refund stands; a different refund needs a new key`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`already_exists`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`transaction_reversed`})}),_jsx(_components.td,{children:`The transaction recorded under this key has since been reversed; the key cannot be replayed or reused`})]})]})]}),`\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`}),` `,_jsxs(_components.strong,{children:[`and the same `,_jsx(_components.code,{children:`amount`})]}),` you get the original transaction\nback with `,_jsx(_components.code,{children:`200`}),`, for as long as the loan exists.`]}),`\n`,_jsx(Heading,{level:`2`,id:`avoiding-overpayment-in-the-first-place`,children:`Avoiding overpayment in the first place`}),`\n`,_jsxs(_components.p,{children:[`A refund is a recovery path, not a routine one. To stay out of it, read\n`,_jsx(_components.code,{children:`totalOutstanding`}),` immediately before each debit and debit exactly that\nfigure — never a cached amount, never rounded up. 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 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"}}},"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 overpayment in the first place","slug":"avoiding-overpayment-in-the-first-place","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Refund an overpayment","path":"/v1/loans/external/{loan_external_id}/refunds","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}/refunds` form, this is the numeric LMS id instead.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"amount":[{"type":"number","description":"The overpayment you are refunding. It must equal the loan’s current overpayment exactly; a disagreement is rejected rather than corrected, because it means you are working from a figure that has since changed. You already hold this number, since you credited the wallet with it before calling, and stating it is what ties the two sides to the same figure.","required":true}],"idempotencyKey":[{"type":"string","description":"Your own reference for the wallet credit that returned the money (max 100 characters). If a refund carrying this key has already been recorded on the loan, the original transaction is returned unchanged instead of a second refund being made. This is what makes a retry safe , and it keeps working after the loan has closed.","required":true}],"transactionDate":[{"type":"string","description":"Optional value date in ISO `yyyy-MM-dd` , defaulting to today. Unlike a repayment there is no `transactionAt` : nothing about a refund depends on the exact instant."}]}}],"examples":{"example":{"value":{"amount":123,"idempotencyKey":"\u003cstring>","transactionDate":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"loanStatus":[{"type":"string","description":"`Closed (obligations met)` after a successful refund. The overpayment is cleared and `totalOverpaid` on the loan returns to `0` ."}],"amount":[{"type":"number","description":"The credit that was returned."}]}}],"examples":{"example":{"value":{"loanStatus":"\u003cstring>","amount":123}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"bsa","siteName":"Blackswan","title":"Refund an overpayment - Blackswan","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T11:27:08.552Z","originalFileLocation":"repayments/refund.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 an overpayment credit to the customer and close the loan.\">\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 an overpayment - Blackswan\">\u003cmeta data-mint-head property=\"og:description\" content=\"Return an overpayment credit to the customer and close the loan.\">\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\">\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+an+overpayment\u0026amp;description=Return+an+overpayment+credit+to+the+customer+and+close+the+loan.\u0026amp;theme=04ef1c6275fc089e56d4178b\u0026amp;signature=a96788d8114d6e2d79dd5f48e6522d5a6dd3b5b5084db5d80a979951657ef58e\">\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 an overpayment - Blackswan\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Return an overpayment credit to the customer and close the loan.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bsa.mintlify.site/_mintlify/api/og/v2?division=Repayments\u0026amp;title=Refund+an+overpayment\u0026amp;description=Return+an+overpayment+credit+to+the+customer+and+close+the+loan.\u0026amp;theme=04ef1c6275fc089e56d4178b\u0026amp;signature=a96788d8114d6e2d79dd5f48e6522d5a6dd3b5b5084db5d80a979951657ef58e\">\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\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/repayments/refund.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#webpage\",\"url\":\"https://docs.lms.bsa.ai/repayments/refund\",\"name\":\"Refund an overpayment\",\"description\":\"Return an overpayment credit to the customer and close the loan.\",\"dateModified\":\"2026-10-22T11:27:08.552Z\",\"isPartOf\":{\"@id\":\"https://docs.lms.bsa.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.lms.bsa.ai/repayments/refund#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.lms.bsa.ai/repayments/refund#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Repayments\",\"item\":\"https://docs.lms.bsa.ai/repayments/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Refund an overpayment\",\"item\":\"https://docs.lms.bsa.ai/repayments/refund\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.lms.bsa.ai/repayments/refund#apireference\",\"headline\":\"Refund an overpayment\",\"name\":\"Refund an overpayment\",\"description\":\"Return an overpayment credit to the customer and close the loan.\",\"url\":\"https://docs.lms.bsa.ai/repayments/refund\",\"mainEntityOfPage\":{\"@id\":\"https://docs.lms.bsa.ai/repayments/refund#webpage\"},\"dateModified\":\"2026-10-22T11:27:08.552Z\",\"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.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","description":"Post a regular installment repayment.","api":"POST /v1/loans/external/{loan_external_id}/repayments","href":"/repayments/repay"},{"title":"Refund an overpayment","api":"POST /v1/loans/external/{loan_external_id}/refunds","href":"/repayments/refund"},{"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"},{"title":"List repayments","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 an overpayment - 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"]}