{
"error": {
"code": "insufficient_funds",
"message": "Not enough available balance for MWK 25,000.00.",
"field": "<string>"
}
}
{
"error": {
"code": "insufficient_funds",
"message": "Not enough available balance for MWK 25,000.00.",
"field": "<string>"
}
}
Payment links
Create a payment link for a sub-merchant
Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as Create a payment link, and the agreed fee always applies.
Where the customer goes after paying. Must be a public https:// address (sandbox also allows http://localhost). Without it, the customer sees PrimePay's receipt page.
active: can be paid. inactive: deactivated by you, can be reactivated. completed: a once link that has been paid (final). expired: its expiresAt has passed (final).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PrimePay","colors":{"primary":"#09000D","light":"#EBCC00","dark":"#09000D"},"logo":{"light":"https://mintcdn.com/prosystems-tech/rcMYSU1YPPUUcDzf/logo/primepay-v3-light.png?fit=max\u0026auto=format\u0026n=rcMYSU1YPPUUcDzf\u0026q=85\u0026s=eb5592018cf5323277a3135853fc9d6d","dark":"https://mintcdn.com/prosystems-tech/rcMYSU1YPPUUcDzf/logo/primepay-v3-dark.png?fit=max\u0026auto=format\u0026n=rcMYSU1YPPUUcDzf\u0026q=85\u0026s=ef373fc158fa9e283a01388a72fdf696"},"favicon":"https://mintcdn.com/prosystems-tech/b52CKE3uGy6vUOXL/logo/primepay-yellow.png?fit=max\u0026auto=format\u0026n=b52CKE3uGy6vUOXL\u0026q=85\u0026s=2780e0e1e5910c8dd14e61055baf15e5","background":{"color":{"dark":"#000000"}},"navbar":{"links":[{"href":"https://primepay.mw/help","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.primepay.mw/"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"prosystems-tech","hasAudioNarration":false,"actualSubdomain":"prosystems-tech","customDomains":["docs.primepay.mw"],"gitSource":{"type":"github","owner":"prosystemstechltd-company","repo":"primepay-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6af44b9d566700d04ef4b621"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af5eaf304140d5ce9d767c7","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":30},{"language":"default","tag":"Docs","count":10},{"language":"default","tag":"Get started","count":7},{"language":"default","tag":"Payouts","count":7},{"language":"default","tag":"Payment links","count":6},{"language":"default","tag":"Transfers","count":6},{"language":"default","tag":"Recipes","count":6},{"language":"default","tag":"Payments","count":5},{"language":"default","tag":"Checkout sessions","count":3},{"language":"default","tag":"Refunds","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"assistant-v5","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":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/payment-links/create-a-payment-link-for-a-sub-merchant","slug":"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant","pageMetadata":{"title":"Create a payment link for a sub-merchant","description":"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as [Create a payment link](/api-reference/payment-links/create-a-payment-link), and the agreed fee always applies.\n\nGuide: [payment link errors](/api-reference/payment-links-overview#payment-link-errors).\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/sub-merchants/{subMerchantCode}/payment-links","href":"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as \", _jsx(_components.a, {\n href: \"/api-reference/payment-links/create-a-payment-link\",\n children: \"Create a payment link\"\n }), \", and the agreed fee always applies.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Guide: \", _jsx(_components.a, {\n href: \"/api-reference/payment-links-overview#payment-link-errors\",\n children: \"payment link errors\"\n }), \".\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a payment link for a sub-merchant","description":"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as [Create a payment link](/api-reference/payment-links/create-a-payment-link), and the agreed fee always applies.\n\nGuide: [payment link errors](/api-reference/payment-links-overview#payment-link-errors).\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/sub-merchants/{subMerchantCode}/payment-links","href":"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Payment links"],"summary":"Create a payment link for a sub-merchant","operationId":"createSubMerchantPaymentLink","description":"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as [Create a payment link](/api-reference/payment-links/create-a-payment-link), and the agreed fee always applies.\n\nGuide: [payment link errors](/api-reference/payment-links-overview#payment-link-errors).\n","parameters":["8e9d483f-f831-43de-8fd8-f72678fb7b74"],"requestBody":"29d3f2fe-3c9b-4416-bdf3-a2a0bb8dd654","responses":{"201":"d110b6e3-f0f9-461b-8b4a-9606b867646c","400":"de5b8aac-ca29-4f67-b3a1-203996273166","404":"9fb7b71e-f863-4fa0-b9d9-db8eea2346a9"},"method":"post","type":"path","servers":["d911aee0-b44b-48be-9f3a-fd7b00e1e819","405140b9-f90a-47e4-aeaa-9946817b93f4"],"security":["f2d79d5d-613e-429d-be97-e78e77778c27"],"path":"/v1/sub-merchants/{subMerchantCode}/payment-links","baseUrlOptions":["https://api.primepay.mw","https://sandbox-api.primepay.mw"],"title":"Create a payment link for a sub-merchant","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"8e9d483f-f831-43de-8fd8-f72678fb7b74":{"name":"subMerchantCode","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9]{8}$","example":"12345678","isRequired":true,"description":"The sub-merchant's 8-digit account code.","uniqueKey":"","typeLabel":"string"},"description":"The sub-merchant's 8-digit account code."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Required with `description`. Greater than zero, at most 2 decimal places, at most MWK 10,000,000. Don't send it with `items`.","example":15000,"uniqueKey":"amount","typeLabel":"number"},"description":{"type":"string","maxLength":255,"description":"Required with `amount`. What the customer is paying for. Shown to the customer.","example":"Chitenje dress, size M","uniqueKey":"description","typeLabel":"string"},"items":{"type":"array","minItems":1,"maxItems":50,"description":"Instead of `amount`. The amount is their total.","items":{"type":"object","required":["name","unitAmount"],"properties":{"name":{"type":"string","maxLength":200,"isRequired":true,"uniqueKey":"\\items.items.[INDEX].name","typeLabel":"string"},"unitAmount":{"type":"number","isRequired":true,"uniqueKey":"\\items.items.[INDEX].unitAmount","typeLabel":"number"},"quantity":{"type":"integer","minimum":1,"maximum":9999,"default":1,"uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"integer"}},"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items","typeLabel":"object[]"},"name":{"type":"string","maxLength":100,"description":"A label for you only. Customers never see it.","example":"Instagram orders","uniqueKey":"name","typeLabel":"string"},"usage":{"type":"string","enum":["many","once"],"default":"many","description":"`many`: the link can be paid any number of times. `once`: it closes after the first payment.","uniqueKey":"usage","typeLabel":"enum\u003cstring>"},"expiresIn":{"type":"string","enum":["never","24h","7d","30d"],"default":"never","uniqueKey":"expiresIn","typeLabel":"enum\u003cstring>"},"collectName":{"type":"boolean","default":true,"description":"Ask the customer for their name.","uniqueKey":"collectName","typeLabel":"boolean"},"collectEmail":{"type":"boolean","default":false,"description":"Ask the customer for their email.","uniqueKey":"collectEmail","typeLabel":"boolean"},"redirectUrl":{"type":"string","description":"Where the customer goes after paying. Must be a public `https://` address (sandbox also allows `http://localhost`). Without it, the customer sees PrimePay's receipt page.","uniqueKey":"redirectUrl","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"amount":15000,"description":"Chitenje dress, size M","items":[{"name":"\u003cstring>","unitAmount":123,"quantity":1}],"name":"Instagram orders","usage":"many","expiresIn":"never","collectName":true,"collectEmail":false,"redirectUrl":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d110b6e3-f0f9-461b-8b4a-9606b867646c":{"description":"The link.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"id","typeLabel":"string"},"url":{"type":"string","description":"The checkout address to send to your customer.","uniqueKey":"url","typeLabel":"string"},"code":{"type":"string","uniqueKey":"code","typeLabel":"string"},"status":{"type":"string","enum":["active","inactive","completed","expired"],"description":"`active`: can be paid. `inactive`: deactivated by you, can be reactivated. `completed`: a `once` link that has been paid (final). `expired`: its `expiresAt` has passed (final).","uniqueKey":"status","typeLabel":"enum\u003cstring>"},"liveMode":{"type":"boolean","uniqueKey":"liveMode","typeLabel":"boolean"},"name":{"type":"string","uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","uniqueKey":"description","typeLabel":"string"},"amount":{"type":"number","uniqueKey":"amount","typeLabel":"number"},"currency":{"type":"string","example":"MWK","uniqueKey":"currency","typeLabel":"string"},"items":{"type":"array","items":{"type":"object","required":["name","unitAmount"],"properties":{"name":{"type":"string","maxLength":200,"isRequired":true,"uniqueKey":"\\items.items.[INDEX].name","typeLabel":"string"},"unitAmount":{"type":"number","isRequired":true,"uniqueKey":"\\items.items.[INDEX].unitAmount","typeLabel":"number"},"quantity":{"type":"integer","minimum":1,"maximum":9999,"default":1,"uniqueKey":"\\items.items.[INDEX].quantity","typeLabel":"integer"}},"uniqueKey":"\\items.items.[INDEX]","typeLabel":"object"},"uniqueKey":"\\items","typeLabel":"object[]"},"usage":{"type":"string","enum":["many","once"],"uniqueKey":"usage","typeLabel":"enum\u003cstring>"},"timesPaid":{"type":"integer","description":"The number of completed payments.","uniqueKey":"timesPaid","typeLabel":"integer"},"collectName":{"type":"boolean","uniqueKey":"collectName","typeLabel":"boolean"},"collectEmail":{"type":"boolean","uniqueKey":"collectEmail","typeLabel":"boolean"},"redirectUrl":{"oneOf":[{"type":"string","uniqueKey":"redirectUrl.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"redirectUrl.oneOf.1","typeLabel":"null"}],"uniqueKey":"redirectUrl","typeLabel":"string | null"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"expiresAt":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"expiresAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","uniqueKey":"expiresAt.oneOf.1","typeLabel":"null"}],"uniqueKey":"expiresAt","typeLabel":"string\u003cdate-time> | null"},"subMerchantAccountCode":{"oneOf":[{"type":"string","uniqueKey":"subMerchantAccountCode.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"subMerchantAccountCode.oneOf.1","typeLabel":"null"}],"uniqueKey":"subMerchantAccountCode","typeLabel":"string | null"},"subMerchantName":{"oneOf":[{"type":"string","uniqueKey":"subMerchantName.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"subMerchantName.oneOf.1","typeLabel":"null"}],"uniqueKey":"subMerchantName","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","url":"\u003cstring>","code":"\u003cstring>","status":"active","liveMode":true,"name":"\u003cstring>","description":"\u003cstring>","amount":123,"currency":"MWK","items":[{"name":"\u003cstring>","unitAmount":123,"quantity":1}],"usage":"many","timesPaid":123,"collectName":true,"collectEmail":true,"redirectUrl":"\u003cstring>","createdAt":"2023-11-07T05:31:56Z","expiresAt":"2023-11-07T05:31:56Z","subMerchantAccountCode":"\u003cstring>","subMerchantName":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"de5b8aac-ca29-4f67-b3a1-203996273166":{"description":"An error. Use `code` in your code; show `message` to people.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"insufficient_funds","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Not enough available balance for MWK 25,000.00.","uniqueKey":"error.message","typeLabel":"string"},"field":{"type":"string","description":"Payment links only. The field that is missing or wrong, for example `items[1].unitAmount`.","uniqueKey":"error.field","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"insufficient_funds","message":"Not enough available balance for MWK 25,000.00.","field":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"9fb7b71e-f863-4fa0-b9d9-db8eea2346a9":{"description":"An error. Use `code` in your code; show `message` to people.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"insufficient_funds","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Not enough available balance for MWK 25,000.00.","uniqueKey":"error.message","typeLabel":"string"},"field":{"type":"string","description":"Payment links only. The field that is missing or wrong, for example `items[1].unitAmount`.","uniqueKey":"error.field","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"insufficient_funds","message":"Not enough available balance for MWK 25,000.00.","field":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"f2d79d5d-613e-429d-be97-e78e77778c27":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key: `sk_live_…` / `sk_test_…` (secret), `pk_live_…` / `pk_test_…` (publishable, read-only reference data) or `rk_live_…` / `rk_test_…` (payments only).\n","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"d911aee0-b44b-48be-9f3a-fd7b00e1e819":{"url":"https://api.primepay.mw","description":"Live API (live keys, `sk_live_…`)"},"405140b9-f90a-47e4-aeaa-9946817b93f4":{"url":"https://sandbox-api.primepay.mw","description":"Sandbox API (test keys, `sk_test_…`)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Your API key: `sk_live_…` / `sk_test_…` (secret), `pk_live_…` / `pk_test_…` (publishable, read-only reference data) or `rk_live_…` / `rk_test_…` (payments only).\n","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your API key: `sk_live_…` / `sk_test_…` (secret), `pk_live_…` / `pk_test_…` (publishable, read-only reference data) or `rk_live_…` / `rk_test_…` (payments only).\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"prosystems-tech","siteName":"PrimePay","title":"Create a payment link for a sub-merchant - PrimePay","navMaps":{"firstHrefInVersion":{"v1":{"href":"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T16:36:07.304Z","originalFileLocation":"api-reference/payment-links/create-a-payment-link-for-a-sub-merchant.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=\"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as Create a payment link, and the agreed fee always applies. Guide: payment link errors.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PrimePay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_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/prosystems-tech/bgyknVzzbWNYws3_/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a payment link for a sub-merchant - PrimePay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as Create a payment link, and the agreed fee always applies. Guide: payment link errors.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PrimePay\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://prosystems-tech.mintlify.site/_mintlify/api/og/v2?division=Payment+links\u0026amp;title=Create+a+payment+link+for+a+sub-merchant\u0026amp;description=Aggregator+accounts+only.+Makes+a+link+that+pays+a+sub-merchant+linked+to+your+account.+The+body+is+the+same+as+%5BCreate+a+payment+link%5D%28%2Fapi-reference%2Fpayment-l\u0026amp;theme=b265b6de14d9582a003885b7\u0026amp;signature=b4e0c0aca2d273f0507efa4b507d7ce3a77c4d4933e945ae693b777bc0464124\">\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=\"Create a payment link for a sub-merchant - PrimePay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as Create a payment link, and the agreed fee always applies. Guide: payment link errors.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://prosystems-tech.mintlify.site/_mintlify/api/og/v2?division=Payment+links\u0026amp;title=Create+a+payment+link+for+a+sub-merchant\u0026amp;description=Aggregator+accounts+only.+Makes+a+link+that+pays+a+sub-merchant+linked+to+your+account.+The+body+is+the+same+as+%5BCreate+a+payment+link%5D%28%2Fapi-reference%2Fpayment-l\u0026amp;theme=b265b6de14d9582a003885b7\u0026amp;signature=b4e0c0aca2d273f0507efa4b507d7ce3a77c4d4933e945ae693b777bc0464124\">\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/prosystems-tech/bgyknVzzbWNYws3_/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PrimePay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#09000D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.primepay.mw/#organization\",\"name\":\"PrimePay\",\"url\":\"https://docs.primepay.mw\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/prosystems-tech/rcMYSU1YPPUUcDzf/logo/primepay-v3-light.png?fit=max\u0026auto=format\u0026n=rcMYSU1YPPUUcDzf\u0026q=85\u0026s=eb5592018cf5323277a3135853fc9d6d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.primepay.mw#website\",\"name\":\"PrimePay\",\"url\":\"https://docs.primepay.mw\",\"publisher\":{\"@id\":\"https://docs.primepay.mw/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant#webpage\",\"url\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant\",\"name\":\"Create a payment link for a sub-merchant\",\"description\":\"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as Create a payment link, and the agreed fee always applies. Guide: payment link errors.\",\"dateModified\":\"2026-11-12T16:36:07.304Z\",\"isPartOf\":{\"@id\":\"https://docs.primepay.mw#website\"},\"breadcrumb\":{\"@id\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Payment links\",\"item\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a payment link for a sub-merchant\",\"item\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant#apireference\",\"headline\":\"Create a payment link for a sub-merchant\",\"name\":\"Create a payment link for a sub-merchant\",\"description\":\"Aggregator accounts only. Makes a link that pays a sub-merchant linked to your account. The body is the same as Create a payment link, and the agreed fee always applies. Guide: payment link errors.\",\"url\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant\",\"mainEntityOfPage\":{\"@id\":\"https://docs.primepay.mw/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant#webpage\"},\"dateModified\":\"2026-11-12T16:36:07.304Z\",\"publisher\":{\"@id\":\"https://docs.primepay.mw/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.primepay.mw#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PrimePay\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"PrimePay\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant.md","siteName":"PrimePay","nav":{"global":null,"versions":[{"version":"v1","tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"API Reference","groups":[{"group":"Get started","pages":[{"title":"PrimePay API v1","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Idempotency","href":"/api-reference/idempotency"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Operators","pages":[{"title":"List mobile money operators","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /mobile-money/operators","href":"/api-reference/operators/list-mobile-money-operators"}]},{"group":"Payments","pages":[{"title":"Create a payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payments/mobile-money","href":"/api-reference/payments/create-a-payment"},{"title":"Collect for a sub-merchant","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/sub-merchants/{subMerchantCode}/payments/mobile-money","href":"/api-reference/payments/collect-for-a-sub-merchant"},{"title":"Get a payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payments/{reference}","href":"/api-reference/payments/get-a-payment"},{"title":"Find a payment by order","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payments","href":"/api-reference/payments/find-a-payment-by-order"}]},{"group":"Refunds","pages":[{"title":"Refund a payment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payments/{reference}/refunds","href":"/api-reference/refunds/refund-a-payment"},{"title":"List a payment's refunds","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payments/{reference}/refunds","href":"/api-reference/refunds/list-a-payments-refunds"},{"title":"Get a refund","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/refunds/{reference}","href":"/api-reference/refunds/get-a-refund"}]},{"group":"Transfers","pages":[{"title":"Look up a merchant account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/transfers/merchant-account/recipient","href":"/api-reference/transfers/look-up-a-merchant-account"},{"title":"Look up a PrimePay wallet","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/transfers/wallet/recipient","href":"/api-reference/transfers/look-up-a-primepay-wallet"},{"title":"Transfer to a merchant account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/transfers/merchant-account","href":"/api-reference/transfers/transfer-to-a-merchant-account"},{"title":"Transfer to a PrimePay wallet","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/transfers/wallet","href":"/api-reference/transfers/transfer-to-a-primepay-wallet"},{"title":"Get a transfer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/transfers/{reference}","href":"/api-reference/transfers/get-a-transfer"}]},{"group":"Payouts","pages":[{"title":"Look up a mobile money number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payouts/mobile-money/recipient","href":"/api-reference/payouts/look-up-a-mobile-money-number"},{"title":"Look up a bank account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payouts/bank/recipient","href":"/api-reference/payouts/look-up-a-bank-account"},{"title":"List banks","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payouts/banks","href":"/api-reference/payouts/list-banks"},{"title":"Pay a mobile money number","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payouts/mobile-money","href":"/api-reference/payouts/pay-a-mobile-money-number"},{"title":"Pay a bank account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payouts/bank","href":"/api-reference/payouts/pay-a-bank-account"},{"title":"Get a payout","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payouts/{reference}","href":"/api-reference/payouts/get-a-payout"}]},{"group":"Payment links","pages":[{"title":"Create a payment link","description":"Makes a link that pays the account that owns the API key. Send either `amount` with `description`, or `items`. Give `url` to your customer.\n\nGuide: [payment links](/api-reference/payment-links-overview) and [payment link errors](/api-reference/payment-links-overview#payment-link-errors).\n","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-links","href":"/api-reference/payment-links/create-a-payment-link"},{"title":"Create a payment link for a sub-merchant","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/sub-merchants/{subMerchantCode}/payment-links","href":"/api-reference/payment-links/create-a-payment-link-for-a-sub-merchant"},{"title":"Get a payment link","description":"Returns the link. `timesPaid` is the number of completed payments.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/payment-links/{id}","href":"/api-reference/payment-links/get-a-payment-link"},{"title":"Deactivate a payment link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-links/{id}/deactivate","href":"/api-reference/payment-links/deactivate-a-payment-link"},{"title":"Reactivate a payment link","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/payment-links/{id}/reactivate","href":"/api-reference/payment-links/reactivate-a-payment-link"}]},{"group":"Checkout sessions","pages":[{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/checkout/sessions","href":"/api-reference/checkout-sessions/create-a-checkout-session"},{"title":"Check a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /v1/checkout/sessions/{id}","href":"/api-reference/checkout-sessions/check-a-checkout-session"},{"title":"Cancel a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /v1/checkout/sessions/{id}/expire","href":"/api-reference/checkout-sessions/cancel-a-checkout-session"}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/recipes/overview"}]},{"tab":"Changelogs","pages":[{"title":"Changelogs","href":"/changelog"}]}]}]},"basePath":"","title":"Create a payment link for a sub-merchant - PrimePay","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}