A payment link is a URL that takes your customer to a secure checkout page hosted by HUB2, where they pay with one of the payment methods and providers you allow.
The payment methods offered on the checkout page. Must not be empty and must include mobile_money or credit_card. A link that offers neither is rejected with 400 and the code payment_method_not_supported. Possible values: mobile_money, credit_card, bank_transfer.
The providers offered on the checkout page (e.g., ["orange", "mtn"]). Required unless paymentMethods contains only credit_card. For a card-only link, omit it: an empty array is rejected with 400, and card payments use the card provider configured for your account. Maximum 20 providers. Each provider must be enabled in country; names are case-insensitive. A provider that does not support any of the requested paymentMethods is ignored. If no requested provider supports any of the requested paymentMethods, the request fails with 400.
The amount to charge, in the smallest currency unit (e.g., 1000). Required unless openAmount is true, in which case it must be omitted. Minimum 500 for XOF and XAF.
How many times the link can be paid. Possible values: single_use (one successful payment), multi_use (several successful payments, until maximumPayments or the expiration date is reached).
The expiration date of the link, in ISO 8601 format (e.g., 2026-10-15T14:30:00.000Z). Optional. Defaults to 15 minutes after creation. A date that is not in the future is silently replaced by this default, without an error.
Validation error, or invalid or unavailable providers. The code field of the error gives the reason: wrong_provider (a provider is not available for the country or payment method), payment_method_not_supported (the link offers neither mobile_money nor credit_card), credit_card_provider_not_configured (card payments are not enabled or configured for your account), credit_card_provider_unavailable (the card provider of your account is not enabled for the link’s country), credit_card_fees_not_supported (your account passes payment fees on to the customer, which card payments do not support).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HUB2 Documentation","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/hub2-83/aPkTvmVeXN9HXpuW/assets/logo/hub2.png?fit=max\u0026auto=format\u0026n=aPkTvmVeXN9HXpuW\u0026q=85\u0026s=18f9f70abbe4d6234bad47152927237a","dark":"https://mintcdn.com/hub2-83/aPkTvmVeXN9HXpuW/assets/logo/hub2.png?fit=max\u0026auto=format\u0026n=aPkTvmVeXN9HXpuW\u0026q=85\u0026s=18f9f70abbe4d6234bad47152927237a"},"favicon":"https://mintcdn.com/hub2-83/aPkTvmVeXN9HXpuW/assets/favicon.png?fit=max\u0026auto=format\u0026n=aPkTvmVeXN9HXpuW\u0026q=85\u0026s=d71426a9f8f85b6c6ccce6d36247bf39","api":{"openapi":"https://api.hub2.io/docs-json"},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/hub2","website":"https://www.hub2.io"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hub2-83","hasAudioNarration":false,"actualSubdomain":"hub2-83","customDomains":["docs.hub2.io"],"gitSource":{"type":"github","owner":"technohub2","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae16defdd9644647b4200dd","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Référence de l'API","count":86},{"language":"default","tag":"Integration","count":44},{"language":"default","tag":"Intégration","count":44},{"language":"default","tag":"Payments","count":18},{"language":"default","tag":"Webhooks","count":17},{"language":"default","tag":"Documentation","count":16},{"language":"default","tag":"Transfers","count":11},{"language":"default","tag":"Compliance","count":10},{"language":"default","tag":"Payment Links","count":10},{"language":"default","tag":"Processing Only","count":10}]},"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":"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},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"assets/style.css","content":"table{display:table!important}.table-scroll{overflow:scroll}table tbody tr:nth-child(odd){background:#FAFAFA}html.dark table tbody tr:nth-child(odd){background:#1A1A1A}"}],"page":{"pagePath":"api-reference/payment_links/create_payment_links","slug":"/api-reference/payment_links/create_payment_links","pageMetadata":{"title":"Create a payment link","api":"POST https://api.hub2.io/payment-links","description":"Generate a secure payment link to collect payments from your customers.","href":"/api-reference/payment_links/create_payment_links"},"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: \"Generate a secure payment link to collect payments from your customers.\"\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={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`A payment link is a URL that takes your customer to a secure checkout page hosted by HUB2, where they pay with one of the payment methods and providers you allow.`}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`ApiKey`,type:`string`,required:true,id:`param-api-key`,children:_jsx(_components.p,{children:`Your API key.`})}),`\n`,_jsx(ParamField,{header:`MerchantId`,type:`string`,required:true,id:`param-merchant-id`,children:_jsx(_components.p,{children:`Your merchant ID.`})}),`\n`,_jsx(ParamField,{header:`Environment`,type:`string`,required:true,id:`param-environment`,children:_jsxs(_components.p,{children:[`The environment to use: `,_jsx(_components.code,{children:`sandbox`}),` or `,_jsx(_components.code,{children:`live`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(ParamField,{body:`purchaseReference`,type:`string`,required:true,id:`param-purchase-reference`,children:_jsxs(_components.p,{children:[`Your reference for the purchase (e.g., `,_jsx(_components.code,{children:`ORDER-12345`}),`). For a `,_jsx(_components.code,{children:`multi_use`}),` link, it identifies the collection.`]})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,required:true,id:`param-currency`,children:_jsxs(_components.p,{children:[`The currency, as a three-letter ISO 4217 code (e.g., `,_jsx(_components.code,{children:`XOF`}),`).`]})}),`\n`,_jsx(ParamField,{body:`country`,type:`string`,required:true,id:`param-country`,children:_jsxs(_components.p,{children:[`The country where the customer pays, as a two-letter ISO 3166-1 alpha-2 code (e.g., `,_jsx(_components.code,{children:`CI`}),`).`]})}),`\n`,_jsx(ParamField,{body:`paymentMethods`,type:`string[]`,required:true,id:`param-payment-methods`,children:_jsxs(_components.p,{children:[`The payment methods offered on the checkout page. Must not be empty and must include `,_jsx(_components.code,{children:`mobile_money`}),` or `,_jsx(_components.code,{children:`credit_card`}),`. A link that offers neither is rejected with `,_jsx(_components.code,{children:`400`}),` and the code `,_jsx(_components.code,{children:`payment_method_not_supported`}),`. Possible values: `,_jsx(_components.code,{children:`mobile_money`}),`, `,_jsx(_components.code,{children:`credit_card`}),`, `,_jsx(_components.code,{children:`bank_transfer`}),`.`]})}),`\n`,_jsx(ParamField,{body:`providers`,type:`string[]`,id:`param-providers`,children:_jsxs(_components.p,{children:[`The providers offered on the checkout page (e.g., `,_jsx(_components.code,{children:`[\"orange\", \"mtn\"]`}),`). Required unless `,_jsx(_components.code,{children:`paymentMethods`}),` contains only `,_jsx(_components.code,{children:`credit_card`}),`. For a card-only link, omit it: an empty array is rejected with `,_jsx(_components.code,{children:`400`}),`, and card payments use the card provider configured for your account. Maximum 20 providers. Each provider must be enabled in `,_jsx(_components.code,{children:`country`}),`; names are case-insensitive. A provider that does not support any of the requested `,_jsx(_components.code,{children:`paymentMethods`}),` is ignored. If no requested provider supports any of the requested `,_jsx(_components.code,{children:`paymentMethods`}),`, the request fails with `,_jsx(_components.code,{children:`400`}),`.`]})}),`\n`,_jsx(ParamField,{body:`amount`,type:`integer`,id:`param-amount`,children:_jsxs(_components.p,{children:[`The amount to charge, in the smallest currency unit (e.g., `,_jsx(_components.code,{children:`1000`}),`). Required unless `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`, in which case it must be omitted. Minimum `,_jsx(_components.code,{children:`500`}),` for `,_jsx(_components.code,{children:`XOF`}),` and `,_jsx(_components.code,{children:`XAF`}),`.`]})}),`\n`,_jsx(ParamField,{body:`openAmount`,type:`boolean`,default:`false`,id:`param-open-amount`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, the customer enters the amount on the checkout page.`]})}),`\n`,_jsx(ParamField,{body:`minAmount`,type:`integer`,id:`param-min-amount`,children:_jsxs(_components.p,{children:[`The minimum amount the customer can enter. Only relevant when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`. Minimum `,_jsx(_components.code,{children:`500`}),` for `,_jsx(_components.code,{children:`XOF`}),` and `,_jsx(_components.code,{children:`XAF`}),`.`]})}),`\n`,_jsx(ParamField,{body:`maxAmount`,type:`integer`,id:`param-max-amount`,children:_jsxs(_components.p,{children:[`The maximum amount the customer can enter. Only relevant when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`. Must be greater than `,_jsx(_components.code,{children:`minAmount`}),`.`]})}),`\n`,_jsx(ParamField,{body:`type`,type:`string`,default:`single_use`,id:`param-type`,children:_jsxs(_components.p,{children:[`How many times the link can be paid. Possible values: `,_jsx(_components.code,{children:`single_use`}),` (one successful payment), `,_jsx(_components.code,{children:`multi_use`}),` (several successful payments, until `,_jsx(_components.code,{children:`maximumPayments`}),` or the expiration date is reached).`]})}),`\n`,_jsx(ParamField,{body:`maximumPayments`,type:`integer`,id:`param-maximum-payments`,children:_jsxs(_components.p,{children:[`The maximum number of successful payments for a `,_jsx(_components.code,{children:`multi_use`}),` link. Minimum `,_jsx(_components.code,{children:`1`}),`. Omit it for an unlimited number of payments. Ignored for `,_jsx(_components.code,{children:`single_use`}),` links.`]})}),`\n`,_jsx(ParamField,{body:`expirationDate`,type:`string`,id:`param-expiration-date`,children:_jsxs(_components.p,{children:[`The expiration date of the link, in ISO 8601 format (e.g., `,_jsx(_components.code,{children:`2026-10-15T14:30:00.000Z`}),`). Optional. Defaults to 15 minutes after creation. A date that is not in the future is silently replaced by this default, without an error.`]})}),`\n`,_jsx(ParamField,{body:`successUrl`,type:`string`,id:`param-success-url`,children:_jsx(_components.p,{children:`The HTTPS URL the customer is redirected to after a successful payment.`})}),`\n`,_jsx(ParamField,{body:`failureUrl`,type:`string`,id:`param-failure-url`,children:_jsx(_components.p,{children:`The HTTPS URL the customer is redirected to after a failed payment.`})}),`\n`,_jsx(ParamField,{body:`customerPhoneNumber`,type:`string`,id:`param-customer-phone-number`,children:_jsx(_components.p,{children:`The phone number of the customer. When set, only this phone number can pay the link.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`A description displayed on the checkout page.`})}),`\n`,_jsxs(ParamField,{body:`customerFields`,type:`object[]`,id:`param-customer-fields`,children:[_jsx(_components.p,{children:`Up to 5 custom form fields the customer fills in before choosing a payment method. They cannot be changed after creation.`}),_jsxs(Expandable,{title:`Customer field object`,children:[_jsx(ParamField,{body:`fieldName`,type:`string`,required:true,id:`param-field-name`,children:_jsxs(_components.p,{children:[`The field identifier, in snake_case (e.g., `,_jsx(_components.code,{children:`national_id`}),`).`]})}),_jsx(ParamField,{body:`fieldLabel`,type:`string`,required:true,id:`param-field-label`,children:_jsx(_components.p,{children:`The label displayed to the customer. Maximum 100 characters.`})}),_jsx(ParamField,{body:`fieldType`,type:`string`,required:true,id:`param-field-type`,children:_jsxs(_components.p,{children:[`The expected value type. Possible values: `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`integer`}),`, `,_jsx(_components.code,{children:`decimal`}),`, `,_jsx(_components.code,{children:`email`}),`, `,_jsx(_components.code,{children:`date`}),`.`]})}),_jsx(ParamField,{body:`isRequired`,type:`boolean`,required:true,id:`param-is-required`,children:_jsx(_components.p,{children:`Whether the customer must fill in the field.`})}),_jsx(ParamField,{body:`fieldPlaceholder`,type:`string`,id:`param-field-placeholder`,children:_jsx(_components.p,{children:`The placeholder text of the input. Maximum 200 characters.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`HTTP status: 201 Created`})}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`The ID of the payment link (e.g., `,_jsx(_components.code,{children:`pl_z1urYtVFgEebtcj8fxp4v`}),`).`]})}),`\n`,_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsx(_components.p,{children:`The URL of the checkout page to share with your customer.`})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`The status of the payment link. Possible values: `,_jsx(_components.code,{children:`active`}),`, `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`closed`}),`, `,_jsx(_components.code,{children:`expired`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[`The type of the payment link. Possible values: `,_jsx(_components.code,{children:`single_use`}),`, `,_jsx(_components.code,{children:`multi_use`}),`, `,_jsx(_components.code,{children:`bill_payment`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`purchaseReference`,type:`string`,id:`param-purchase-reference-1`,children:_jsx(_components.p,{children:`Your reference for the purchase.`})}),`\n`,_jsx(ResponseField,{name:`amount`,type:`number | null`,id:`param-amount-1`,children:_jsxs(_components.p,{children:[`The amount to charge, in the smallest currency unit. `,_jsx(_components.code,{children:`null`}),` when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency-1`,children:_jsx(_components.p,{children:`The currency, as an ISO 4217 code.`})}),`\n`,_jsx(ResponseField,{name:`openAmount`,type:`boolean`,id:`param-open-amount-1`,children:_jsx(_components.p,{children:`Whether the customer enters the amount.`})}),`\n`,_jsx(ResponseField,{name:`minAmount`,type:`number`,id:`param-min-amount-1`,children:_jsxs(_components.p,{children:[`The minimum amount the customer can enter. Only when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`maxAmount`,type:`number`,id:`param-max-amount-1`,children:_jsxs(_components.p,{children:[`The maximum amount the customer can enter. Only when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`maximumPayments`,type:`number`,id:`param-maximum-payments-1`,children:_jsxs(_components.p,{children:[`The maximum number of successful payments. Absent for an unlimited `,_jsx(_components.code,{children:`multi_use`}),` link.`]})}),`\n`,_jsx(ResponseField,{name:`currentSuccessCount`,type:`number`,id:`param-current-success-count`,children:_jsx(_components.p,{children:`The number of successful payments recorded on the link.`})}),`\n`,_jsx(ResponseField,{name:`maximumAttempts`,type:`number`,id:`param-maximum-attempts`,children:_jsxs(_components.p,{children:[`The maximum number of failed payments on a `,_jsx(_components.code,{children:`single_use`}),` link (currently `,_jsx(_components.code,{children:`3`}),`). When it is reached, the link is closed.`]})}),`\n`,_jsx(ResponseField,{name:`customerPhoneNumber`,type:`string | null`,id:`param-customer-phone-number-1`,children:_jsx(_components.p,{children:`The only phone number allowed to pay the link, if one was set.`})}),`\n`,_jsx(ResponseField,{name:`customerFields`,type:`object[]`,id:`param-customer-fields-1`,children:_jsx(_components.p,{children:`The custom form fields of the link. Absent when the link has none.`})}),`\n`,_jsx(ResponseField,{name:`expirationDate`,type:`string`,id:`param-expiration-date-1`,children:_jsx(_components.p,{children:`The expiration date of the link, in ISO 8601 format.`})}),`\n`,_jsx(ResponseField,{name:`createdAt`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`The creation date of the link, in ISO 8601 format.`})}),`\n`,_jsx(ResponseField,{name:`updatedAt`,type:`string`,id:`param-updated-at`,children:_jsx(_components.p,{children:`The date of the last update of the link, in ISO 8601 format.`})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Status`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Validation error, or invalid or unavailable providers. The `,_jsx(_components.code,{children:`code`}),` field of the error gives the reason: `,_jsx(_components.code,{children:`wrong_provider`}),` (a provider is not available for the country or payment method), `,_jsx(_components.code,{children:`payment_method_not_supported`}),` (the link offers neither `,_jsx(_components.code,{children:`mobile_money`}),` nor `,_jsx(_components.code,{children:`credit_card`}),`), `,_jsx(_components.code,{children:`credit_card_provider_not_configured`}),` (card payments are not enabled or configured for your account), `,_jsx(_components.code,{children:`credit_card_provider_unavailable`}),` (the card provider of your account is not enabled for the link’s `,_jsx(_components.code,{children:`country`}),`), `,_jsx(_components.code,{children:`credit_card_fees_not_supported`}),` (your account passes payment fees on to the customer, which card payments do not support).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Invalid credentials.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Missing permission.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`More than 100 requests per 10 seconds.`})]})]})]})]})}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":"Create a payment link","api":"POST https://api.hub2.io/payment-links","description":"Generate a secure payment link to collect payments from your customers.","href":"/api-reference/payment_links/create_payment_links"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`A payment link is a URL that takes your customer to a secure checkout page hosted by HUB2, where they pay with one of the payment methods and providers you allow.`}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`ApiKey`,type:`string`,required:true,id:`param-api-key`,children:_jsx(_components.p,{children:`Your API key.`})}),`\n`,_jsx(ParamField,{header:`MerchantId`,type:`string`,required:true,id:`param-merchant-id`,children:_jsx(_components.p,{children:`Your merchant ID.`})}),`\n`,_jsx(ParamField,{header:`Environment`,type:`string`,required:true,id:`param-environment`,children:_jsxs(_components.p,{children:[`The environment to use: `,_jsx(_components.code,{children:`sandbox`}),` or `,_jsx(_components.code,{children:`live`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(ParamField,{body:`purchaseReference`,type:`string`,required:true,id:`param-purchase-reference`,children:_jsxs(_components.p,{children:[`Your reference for the purchase (e.g., `,_jsx(_components.code,{children:`ORDER-12345`}),`). For a `,_jsx(_components.code,{children:`multi_use`}),` link, it identifies the collection.`]})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,required:true,id:`param-currency`,children:_jsxs(_components.p,{children:[`The currency, as a three-letter ISO 4217 code (e.g., `,_jsx(_components.code,{children:`XOF`}),`).`]})}),`\n`,_jsx(ParamField,{body:`country`,type:`string`,required:true,id:`param-country`,children:_jsxs(_components.p,{children:[`The country where the customer pays, as a two-letter ISO 3166-1 alpha-2 code (e.g., `,_jsx(_components.code,{children:`CI`}),`).`]})}),`\n`,_jsx(ParamField,{body:`paymentMethods`,type:`string[]`,required:true,id:`param-payment-methods`,children:_jsxs(_components.p,{children:[`The payment methods offered on the checkout page. Must not be empty and must include `,_jsx(_components.code,{children:`mobile_money`}),` or `,_jsx(_components.code,{children:`credit_card`}),`. A link that offers neither is rejected with `,_jsx(_components.code,{children:`400`}),` and the code `,_jsx(_components.code,{children:`payment_method_not_supported`}),`. Possible values: `,_jsx(_components.code,{children:`mobile_money`}),`, `,_jsx(_components.code,{children:`credit_card`}),`, `,_jsx(_components.code,{children:`bank_transfer`}),`.`]})}),`\n`,_jsx(ParamField,{body:`providers`,type:`string[]`,id:`param-providers`,children:_jsxs(_components.p,{children:[`The providers offered on the checkout page (e.g., `,_jsx(_components.code,{children:`[\"orange\", \"mtn\"]`}),`). Required unless `,_jsx(_components.code,{children:`paymentMethods`}),` contains only `,_jsx(_components.code,{children:`credit_card`}),`. For a card-only link, omit it: an empty array is rejected with `,_jsx(_components.code,{children:`400`}),`, and card payments use the card provider configured for your account. Maximum 20 providers. Each provider must be enabled in `,_jsx(_components.code,{children:`country`}),`; names are case-insensitive. A provider that does not support any of the requested `,_jsx(_components.code,{children:`paymentMethods`}),` is ignored. If no requested provider supports any of the requested `,_jsx(_components.code,{children:`paymentMethods`}),`, the request fails with `,_jsx(_components.code,{children:`400`}),`.`]})}),`\n`,_jsx(ParamField,{body:`amount`,type:`integer`,id:`param-amount`,children:_jsxs(_components.p,{children:[`The amount to charge, in the smallest currency unit (e.g., `,_jsx(_components.code,{children:`1000`}),`). Required unless `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`, in which case it must be omitted. Minimum `,_jsx(_components.code,{children:`500`}),` for `,_jsx(_components.code,{children:`XOF`}),` and `,_jsx(_components.code,{children:`XAF`}),`.`]})}),`\n`,_jsx(ParamField,{body:`openAmount`,type:`boolean`,default:`false`,id:`param-open-amount`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, the customer enters the amount on the checkout page.`]})}),`\n`,_jsx(ParamField,{body:`minAmount`,type:`integer`,id:`param-min-amount`,children:_jsxs(_components.p,{children:[`The minimum amount the customer can enter. Only relevant when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`. Minimum `,_jsx(_components.code,{children:`500`}),` for `,_jsx(_components.code,{children:`XOF`}),` and `,_jsx(_components.code,{children:`XAF`}),`.`]})}),`\n`,_jsx(ParamField,{body:`maxAmount`,type:`integer`,id:`param-max-amount`,children:_jsxs(_components.p,{children:[`The maximum amount the customer can enter. Only relevant when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`. Must be greater than `,_jsx(_components.code,{children:`minAmount`}),`.`]})}),`\n`,_jsx(ParamField,{body:`type`,type:`string`,default:`single_use`,id:`param-type`,children:_jsxs(_components.p,{children:[`How many times the link can be paid. Possible values: `,_jsx(_components.code,{children:`single_use`}),` (one successful payment), `,_jsx(_components.code,{children:`multi_use`}),` (several successful payments, until `,_jsx(_components.code,{children:`maximumPayments`}),` or the expiration date is reached).`]})}),`\n`,_jsx(ParamField,{body:`maximumPayments`,type:`integer`,id:`param-maximum-payments`,children:_jsxs(_components.p,{children:[`The maximum number of successful payments for a `,_jsx(_components.code,{children:`multi_use`}),` link. Minimum `,_jsx(_components.code,{children:`1`}),`. Omit it for an unlimited number of payments. Ignored for `,_jsx(_components.code,{children:`single_use`}),` links.`]})}),`\n`,_jsx(ParamField,{body:`expirationDate`,type:`string`,id:`param-expiration-date`,children:_jsxs(_components.p,{children:[`The expiration date of the link, in ISO 8601 format (e.g., `,_jsx(_components.code,{children:`2026-10-15T14:30:00.000Z`}),`). Optional. Defaults to 15 minutes after creation. A date that is not in the future is silently replaced by this default, without an error.`]})}),`\n`,_jsx(ParamField,{body:`successUrl`,type:`string`,id:`param-success-url`,children:_jsx(_components.p,{children:`The HTTPS URL the customer is redirected to after a successful payment.`})}),`\n`,_jsx(ParamField,{body:`failureUrl`,type:`string`,id:`param-failure-url`,children:_jsx(_components.p,{children:`The HTTPS URL the customer is redirected to after a failed payment.`})}),`\n`,_jsx(ParamField,{body:`customerPhoneNumber`,type:`string`,id:`param-customer-phone-number`,children:_jsx(_components.p,{children:`The phone number of the customer. When set, only this phone number can pay the link.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`A description displayed on the checkout page.`})}),`\n`,_jsxs(ParamField,{body:`customerFields`,type:`object[]`,id:`param-customer-fields`,children:[_jsx(_components.p,{children:`Up to 5 custom form fields the customer fills in before choosing a payment method. They cannot be changed after creation.`}),_jsxs(Expandable,{title:`Customer field object`,children:[_jsx(ParamField,{body:`fieldName`,type:`string`,required:true,id:`param-field-name`,children:_jsxs(_components.p,{children:[`The field identifier, in snake_case (e.g., `,_jsx(_components.code,{children:`national_id`}),`).`]})}),_jsx(ParamField,{body:`fieldLabel`,type:`string`,required:true,id:`param-field-label`,children:_jsx(_components.p,{children:`The label displayed to the customer. Maximum 100 characters.`})}),_jsx(ParamField,{body:`fieldType`,type:`string`,required:true,id:`param-field-type`,children:_jsxs(_components.p,{children:[`The expected value type. Possible values: `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`integer`}),`, `,_jsx(_components.code,{children:`decimal`}),`, `,_jsx(_components.code,{children:`email`}),`, `,_jsx(_components.code,{children:`date`}),`.`]})}),_jsx(ParamField,{body:`isRequired`,type:`boolean`,required:true,id:`param-is-required`,children:_jsx(_components.p,{children:`Whether the customer must fill in the field.`})}),_jsx(ParamField,{body:`fieldPlaceholder`,type:`string`,id:`param-field-placeholder`,children:_jsx(_components.p,{children:`The placeholder text of the input. Maximum 200 characters.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`HTTP status: 201 Created`})}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`The ID of the payment link (e.g., `,_jsx(_components.code,{children:`pl_z1urYtVFgEebtcj8fxp4v`}),`).`]})}),`\n`,_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsx(_components.p,{children:`The URL of the checkout page to share with your customer.`})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`The status of the payment link. Possible values: `,_jsx(_components.code,{children:`active`}),`, `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`closed`}),`, `,_jsx(_components.code,{children:`expired`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[`The type of the payment link. Possible values: `,_jsx(_components.code,{children:`single_use`}),`, `,_jsx(_components.code,{children:`multi_use`}),`, `,_jsx(_components.code,{children:`bill_payment`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`purchaseReference`,type:`string`,id:`param-purchase-reference-1`,children:_jsx(_components.p,{children:`Your reference for the purchase.`})}),`\n`,_jsx(ResponseField,{name:`amount`,type:`number | null`,id:`param-amount-1`,children:_jsxs(_components.p,{children:[`The amount to charge, in the smallest currency unit. `,_jsx(_components.code,{children:`null`}),` when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency-1`,children:_jsx(_components.p,{children:`The currency, as an ISO 4217 code.`})}),`\n`,_jsx(ResponseField,{name:`openAmount`,type:`boolean`,id:`param-open-amount-1`,children:_jsx(_components.p,{children:`Whether the customer enters the amount.`})}),`\n`,_jsx(ResponseField,{name:`minAmount`,type:`number`,id:`param-min-amount-1`,children:_jsxs(_components.p,{children:[`The minimum amount the customer can enter. Only when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`maxAmount`,type:`number`,id:`param-max-amount-1`,children:_jsxs(_components.p,{children:[`The maximum amount the customer can enter. Only when `,_jsx(_components.code,{children:`openAmount`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`maximumPayments`,type:`number`,id:`param-maximum-payments-1`,children:_jsxs(_components.p,{children:[`The maximum number of successful payments. Absent for an unlimited `,_jsx(_components.code,{children:`multi_use`}),` link.`]})}),`\n`,_jsx(ResponseField,{name:`currentSuccessCount`,type:`number`,id:`param-current-success-count`,children:_jsx(_components.p,{children:`The number of successful payments recorded on the link.`})}),`\n`,_jsx(ResponseField,{name:`maximumAttempts`,type:`number`,id:`param-maximum-attempts`,children:_jsxs(_components.p,{children:[`The maximum number of failed payments on a `,_jsx(_components.code,{children:`single_use`}),` link (currently `,_jsx(_components.code,{children:`3`}),`). When it is reached, the link is closed.`]})}),`\n`,_jsx(ResponseField,{name:`customerPhoneNumber`,type:`string | null`,id:`param-customer-phone-number-1`,children:_jsx(_components.p,{children:`The only phone number allowed to pay the link, if one was set.`})}),`\n`,_jsx(ResponseField,{name:`customerFields`,type:`object[]`,id:`param-customer-fields-1`,children:_jsx(_components.p,{children:`The custom form fields of the link. Absent when the link has none.`})}),`\n`,_jsx(ResponseField,{name:`expirationDate`,type:`string`,id:`param-expiration-date-1`,children:_jsx(_components.p,{children:`The expiration date of the link, in ISO 8601 format.`})}),`\n`,_jsx(ResponseField,{name:`createdAt`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`The creation date of the link, in ISO 8601 format.`})}),`\n`,_jsx(ResponseField,{name:`updatedAt`,type:`string`,id:`param-updated-at`,children:_jsx(_components.p,{children:`The date of the last update of the link, in ISO 8601 format.`})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Status`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Validation error, or invalid or unavailable providers. The `,_jsx(_components.code,{children:`code`}),` field of the error gives the reason: `,_jsx(_components.code,{children:`wrong_provider`}),` (a provider is not available for the country or payment method), `,_jsx(_components.code,{children:`payment_method_not_supported`}),` (the link offers neither `,_jsx(_components.code,{children:`mobile_money`}),` nor `,_jsx(_components.code,{children:`credit_card`}),`), `,_jsx(_components.code,{children:`credit_card_provider_not_configured`}),` (card payments are not enabled or configured for your account), `,_jsx(_components.code,{children:`credit_card_provider_unavailable`}),` (the card provider of your account is not enabled for the link’s `,_jsx(_components.code,{children:`country`}),`), `,_jsx(_components.code,{children:`credit_card_fees_not_supported`}),` (your account passes payment fees on to the customer, which card payments do not support).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Invalid credentials.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Missing permission.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`More than 100 requests per 10 seconds.`})]})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`18`,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:`18`,children:[_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:` --location`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.hub2.io/payment-links'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ApiKey: \u003cYOUR_API_KEY>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'MerchantId: \u003cYOUR_MERCHANT_ID>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Environment: sandbox'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--data `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"purchaseReference\": \"ORDER-12345\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Payment for order 12345\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 1000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"XOF\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"CI\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"single_use\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expirationDate\": \"\u003cFUTURE_ISO_8601_DATE>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"paymentMethods\": [\"mobile_money\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"providers\": [\"orange\", \"mtn\", \"moov\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"successUrl\": \"https://merchant.example.com/success\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"failureUrl\": \"https://merchant.example.com/failure\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL (card only)`,numberOfLines:`17`,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:`17`,children:[_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:` --location`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.hub2.io/payment-links'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ApiKey: \u003cYOUR_API_KEY>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'MerchantId: \u003cYOUR_MERCHANT_ID>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Environment: sandbox'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--data `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"purchaseReference\": \"ORDER-12346\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Payment for order 12346\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\": 1000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"XOF\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"CI\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"single_use\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expirationDate\": \"\u003cFUTURE_ISO_8601_DATE>\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"paymentMethods\": [\"credit_card\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"successUrl\": \"https://merchant.example.com/success\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"failureUrl\": \"https://merchant.example.com/failure\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`201`,numberOfLines:`17`,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:`17`,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:`\"pl_z1urYtVFgEebtcj8fxp4v\"`}),_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:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://pay.hub2.io/pl_z1urYtVFgEebtcj8fxp4v\"`}),_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:`\"active\"`}),_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:` \"purchaseReference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORDER-12345\"`}),_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:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"XOF\"`}),_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:` \"openAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"maximumPayments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"maximumAttempts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_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:` \"currentSuccessCount\"`}),_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:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-15T14:00:00.000Z\"`}),_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:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-15T14:00:00.000Z\"`}),_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:` \"expirationDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-15T14:30:00.000Z\"`}),_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:` \"customerPhoneNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:`\"single_use\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}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":"Create a payment link","api":"POST https://api.hub2.io/payment-links","description":"Generate a secure payment link to collect payments from your customers.","href":"/api-reference/payment_links/create_payment_links"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --location\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://api.hub2.io/payment-links'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'ApiKey: \u0026#x3C;YOUR_API_KEY>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'MerchantId: \u0026#x3C;YOUR_MERCHANT_ID>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Environment: sandbox'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--data \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"purchaseReference\": \"ORDER-12345\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Payment for order 12345\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"amount\": 1000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"currency\": \"XOF\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"CI\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"single_use\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"expirationDate\": \"\u0026#x3C;FUTURE_ISO_8601_DATE>\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"paymentMethods\": [\"mobile_money\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"providers\": [\"orange\", \"mtn\", \"moov\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"successUrl\": \"https://merchant.example.com/success\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"failureUrl\": \"https://merchant.example.com/failure\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL (card only)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --location\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://api.hub2.io/payment-links'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'ApiKey: \u0026#x3C;YOUR_API_KEY>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'MerchantId: \u0026#x3C;YOUR_MERCHANT_ID>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Environment: sandbox'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--header \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">--data \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"purchaseReference\": \"ORDER-12346\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Payment for order 12346\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"amount\": 1000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"currency\": \"XOF\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"CI\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"single_use\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"expirationDate\": \"\u0026#x3C;FUTURE_ISO_8601_DATE>\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"paymentMethods\": [\"credit_card\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"successUrl\": \"https://merchant.example.com/success\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"failureUrl\": \"https://merchant.example.com/failure\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pl_z1urYtVFgEebtcj8fxp4v\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://pay.hub2.io/pl_z1urYtVFgEebtcj8fxp4v\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"purchaseReference\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ORDER-12345\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"XOF\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"openAmount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"maximumPayments\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"maximumAttempts\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currentSuccessCount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-10-15T14:00:00.000Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"updatedAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-10-15T14:00:00.000Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expirationDate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-10-15T14:30:00.000Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customerPhoneNumber\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"single_use\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a payment link","path":"/payment-links","servers":[{"url":"https://api.hub2.io"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"ApiKey":{"schema":[{"type":"string","description":"Your API key.","required":true}]},"MerchantId":{"schema":[{"type":"string","description":"Your merchant ID.","required":true}]},"Environment":{"schema":[{"type":"string","description":"The environment to use: `sandbox` or `live` .","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"purchaseReference":[{"type":"string","description":"Your reference for the purchase (e.g., `ORDER-12345` ). For a `multi_use` link, it identifies the collection.","required":true}],"currency":[{"type":"string","description":"The currency, as a three-letter ISO 4217 code (e.g., `XOF` ).","required":true}],"country":[{"type":"string","description":"The country where the customer pays, as a two-letter ISO 3166-1 alpha-2 code (e.g., `CI` ).","required":true}],"paymentMethods":[{"type":"array","items":[{"type":"string"}],"description":"The payment methods offered on the checkout page. Must not be empty and must include `mobile_money` or `credit_card` . A link that offers neither is rejected with `400` and the code `payment_method_not_supported` . Possible values: `mobile_money` , `credit_card` , `bank_transfer` .","required":true}],"providers":[{"type":"array","items":[{"type":"string"}],"description":"The providers offered on the checkout page (e.g., `[\"orange\", \"mtn\"]` ). Required unless `paymentMethods` contains only `credit_card` . For a card-only link, omit it: an empty array is rejected with `400` , and card payments use the card provider configured for your account. Maximum 20 providers. Each provider must be enabled in `country` ; names are case-insensitive. A provider that does not support any of the requested `paymentMethods` is ignored. If no requested provider supports any of the requested `paymentMethods` , the request fails with `400` ."}],"amount":[{"type":"integer","description":"The amount to charge, in the smallest currency unit (e.g., `1000` ). Required unless `openAmount` is `true` , in which case it must be omitted. Minimum `500` for `XOF` and `XAF` ."}],"openAmount":[{"type":"boolean","description":"When `true` , the customer enters the amount on the checkout page."}],"minAmount":[{"type":"integer","description":"The minimum amount the customer can enter. Only relevant when `openAmount` is `true` . Minimum `500` for `XOF` and `XAF` ."}],"maxAmount":[{"type":"integer","description":"The maximum amount the customer can enter. Only relevant when `openAmount` is `true` . Must be greater than `minAmount` ."}],"type":[{"type":"string","description":"How many times the link can be paid. Possible values: `single_use` (one successful payment), `multi_use` (several successful payments, until `maximumPayments` or the expiration date is reached)."}],"maximumPayments":[{"type":"integer","description":"The maximum number of successful payments for a `multi_use` link. Minimum `1` . Omit it for an unlimited number of payments. Ignored for `single_use` links."}],"expirationDate":[{"type":"string","description":"The expiration date of the link, in ISO 8601 format (e.g., `2026-10-15T14:30:00.000Z` ). Optional. Defaults to 15 minutes after creation. A date that is not in the future is silently replaced by this default, without an error."}],"successUrl":[{"type":"string","description":"The HTTPS URL the customer is redirected to after a successful payment."}],"failureUrl":[{"type":"string","description":"The HTTPS URL the customer is redirected to after a failed payment."}],"customerPhoneNumber":[{"type":"string","description":"The phone number of the customer. When set, only this phone number can pay the link."}],"description":[{"type":"string","description":"A description displayed on the checkout page."}],"customerFields":[{"type":"array","items":[{"type":"object","properties":{"fieldName":[{"type":"string","description":"The field identifier, in snake_case (e.g., `national_id` ).","required":true}],"fieldLabel":[{"type":"string","description":"The label displayed to the customer. Maximum 100 characters.","required":true}],"fieldType":[{"type":"string","description":"The expected value type. Possible values: `text` , `integer` , `decimal` , `email` , `date` .","required":true}],"isRequired":[{"type":"boolean","description":"Whether the customer must fill in the field.","required":true}],"fieldPlaceholder":[{"type":"string","description":"The placeholder text of the input. Maximum 200 characters."}]}}],"description":"Up to 5 custom form fields the customer fills in before choosing a payment method. They cannot be changed after creation."}]}}],"examples":{"example":{"value":{"purchaseReference":"\u003cstring>","currency":"\u003cstring>","country":"\u003cstring>","paymentMethods":["\u003cstring>"],"providers":["\u003cstring>"],"amount":123,"openAmount":true,"minAmount":123,"maxAmount":123,"type":"\u003cstring>","maximumPayments":123,"expirationDate":"\u003cstring>","successUrl":"\u003cstring>","failureUrl":"\u003cstring>","customerPhoneNumber":"\u003cstring>","description":"\u003cstring>","customerFields":[{"fieldName":"\u003cstring>","fieldLabel":"\u003cstring>","fieldType":"\u003cstring>","isRequired":true,"fieldPlaceholder":"\u003cstring>"}]}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"The ID of the payment link (e.g., `pl_z1urYtVFgEebtcj8fxp4v` )."}],"url":[{"type":"string","description":"The URL of the checkout page to share with your customer."}],"status":[{"type":"string","description":"The status of the payment link. Possible values: `active` , `completed` , `closed` , `expired` ."}],"type":[{"type":"string","description":"The type of the payment link. Possible values: `single_use` , `multi_use` , `bill_payment` ."}],"purchaseReference":[{"type":"string","description":"Your reference for the purchase."}],"amount":[{"type":"object","properties":{},"description":"The amount to charge, in the smallest currency unit. `null` when `openAmount` is `true` ."}],"currency":[{"type":"string","description":"The currency, as an ISO 4217 code."}],"openAmount":[{"type":"boolean","description":"Whether the customer enters the amount."}],"minAmount":[{"type":"number","description":"The minimum amount the customer can enter. Only when `openAmount` is `true` ."}],"maxAmount":[{"type":"number","description":"The maximum amount the customer can enter. Only when `openAmount` is `true` ."}],"maximumPayments":[{"type":"number","description":"The maximum number of successful payments. Absent for an unlimited `multi_use` link."}],"currentSuccessCount":[{"type":"number","description":"The number of successful payments recorded on the link."}],"maximumAttempts":[{"type":"number","description":"The maximum number of failed payments on a `single_use` link (currently `3` ). When it is reached, the link is closed."}],"customerPhoneNumber":[{"type":"object","properties":{},"description":"The only phone number allowed to pay the link, if one was set."}],"customerFields":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"The custom form fields of the link. Absent when the link has none."}],"expirationDate":[{"type":"string","description":"The expiration date of the link, in ISO 8601 format."}],"createdAt":[{"type":"string","description":"The creation date of the link, in ISO 8601 format."}],"updatedAt":[{"type":"string","description":"The date of the last update of the link, in ISO 8601 format."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","url":"\u003cstring>","status":"\u003cstring>","type":"\u003cstring>","purchaseReference":"\u003cstring>","amount":{},"currency":"\u003cstring>","openAmount":true,"minAmount":123,"maxAmount":123,"maximumPayments":123,"currentSuccessCount":123,"maximumAttempts":123,"customerPhoneNumber":{},"customerFields":[{}],"expirationDate":"\u003cstring>","createdAt":"\u003cstring>","updatedAt":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/hub2-83/0ef60d836fa10d10/assets/mermaid.js"],"subdomain":"hub2-83","siteName":"HUB2 Documentation","title":"Create a payment link - HUB2 Documentation","navMaps":{"firstHrefInVersion":{"English":{"href":"/api-reference/payment_links/create_payment_links","matchLevel":0},"Français":{"href":"/api-reference/payment_links/create_payment_links","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T03:37:35.112Z","originalFileLocation":"api-reference/payment_links/create_payment_links.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=\"Generate a secure payment link to collect payments from your customers.\">\u003cmeta data-mint-head name=\"application-name\" content=\"HUB2 Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_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/hub2-83/2cSAgZof76cJIDy-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a payment link - HUB2 Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate a secure payment link to collect payments from your customers.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HUB2 Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hub2.io/api-reference/payment_links/create_payment_links\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hub2-83.mintlify.site/_mintlify/api/og/v2?division=Payment+Links\u0026amp;title=Create+a+payment+link\u0026amp;description=Generate+a+secure+payment+link+to+collect+payments+from+your+customers.\u0026amp;theme=92cb3d561e9d2318e8ed5cd1\u0026amp;signature=8a9019608d04ca51dae989d50716264958a348d423ff82b27a48aa26938a2cf5\">\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 - HUB2 Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate a secure payment link to collect payments from your customers.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hub2-83.mintlify.site/_mintlify/api/og/v2?division=Payment+Links\u0026amp;title=Create+a+payment+link\u0026amp;description=Generate+a+secure+payment+link+to+collect+payments+from+your+customers.\u0026amp;theme=92cb3d561e9d2318e8ed5cd1\u0026amp;signature=8a9019608d04ca51dae989d50716264958a348d423ff82b27a48aa26938a2cf5\">\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/hub2-83/2cSAgZof76cJIDy-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HUB2 Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hub2.io/api-reference/payment_links/create_payment_links\">\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_payment_links.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hub2.io/#organization\",\"name\":\"HUB2 Documentation\",\"url\":\"https://docs.hub2.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hub2-83/aPkTvmVeXN9HXpuW/assets/logo/hub2.png?fit=max\u0026auto=format\u0026n=aPkTvmVeXN9HXpuW\u0026q=85\u0026s=18f9f70abbe4d6234bad47152927237a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hub2.io#website\",\"name\":\"HUB2 Documentation\",\"url\":\"https://docs.hub2.io\",\"publisher\":{\"@id\":\"https://docs.hub2.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links#webpage\",\"url\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links\",\"name\":\"Create a payment link\",\"description\":\"Generate a secure payment link to collect payments from your customers.\",\"dateModified\":\"2026-10-28T03:37:35.112Z\",\"isPartOf\":{\"@id\":\"https://docs.hub2.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HUB2 Documentation\",\"item\":\"https://docs.hub2.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a payment link\",\"item\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links#apireference\",\"headline\":\"Create a payment link\",\"name\":\"Create a payment link\",\"description\":\"Generate a secure payment link to collect payments from your customers.\",\"url\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hub2.io/api-reference/payment_links/create_payment_links#webpage\"},\"dateModified\":\"2026-10-28T03:37:35.112Z\",\"publisher\":{\"@id\":\"https://docs.hub2.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hub2.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HUB2 Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"HUB2 Documentation","nav":{"global":null,"versions":[{"version":"English","tabs":[{"tab":"HUB2"},{"tab":"Integration","pages":[{"title":"Integration","href":"/integration/en/getting_started/introduction"}]},{"tab":"Documentation","pages":[{"title":"Documentation","href":"/documentation/en/glossary"}]},{"tab":"API Reference","groups":[{"group":"Data","pages":[{"openapi":"get /data/countries","title":"Get countries","href":"/api-reference/data/get-countries"},{"openapi":"get /data/providers","title":"Get providers","href":"/api-reference/data/get-providers"},{"openapi":"get /data/bank-codes","title":"Get bank codes","href":"/api-reference/data/get-bank-codes"}]},{"group":"Balance","pages":[{"openapi":"get /balance","title":"Check Merchant Balance","href":"/api-reference/balance/check-merchant-balance"}]},{"group":"Webhooks","pages":[{"openapi":"get /webhooks","title":"Get all webhooks","href":"/api-reference/webhooks/get-all-webhooks"},{"openapi":"post /webhooks","title":"Create a webhook","href":"/api-reference/webhooks/create-a-webhook"},{"openapi":"get /webhooks/{id}","title":"Get a webhook","href":"/api-reference/webhooks/get-a-webhook"},{"openapi":"delete /webhooks/{id}","title":"Remove a webhook","href":"/api-reference/webhooks/remove-a-webhook"},{"openapi":"patch /webhooks/{id}","title":"Update a webhook","href":"/api-reference/webhooks/update-a-webhook"}]},{"group":"Sms","pages":[{"openapi":"get /sms/count","title":"Retrieve number of sms sent","href":"/api-reference/sms/retrieve-number-of-sms-sent"},{"openapi":"get /sms/list","title":"Get a list of sms sent","href":"/api-reference/sms/get-a-list-of-sms-sent"},{"openapi":"post /sms","title":"Send Sms","href":"/api-reference/sms/send-sms"}]},{"group":"Payments","pages":[{"openapi":"get /payment-intents","title":"Retrieve a PaymentIntent collection","href":"/api-reference/payments/retrieve-a-paymentintent-collection"},{"openapi":"post /payment-intents","title":"Create a PaymentIntent object","href":"/api-reference/payments/create-a-paymentintent-object"},{"openapi":"get /payment-intents/{id}","title":"Retrieve a PaymentIntent object","href":"/api-reference/payments/retrieve-a-paymentintent-object"},{"openapi":"post /payment-intents/{id}/payments","title":"Attempt a payment on a PaymentIntent object","href":"/api-reference/payments/attempt-a-payment-on-a-paymentintent-object"},{"openapi":"post /payment-intents/{id}/payments/sync","title":"Synchronously attempt a payment on a payment intent","href":"/api-reference/payments/synchronously-attempt-a-payment-on-a-payment-intent"},{"openapi":"post /payment-intents/{id}/authentication","title":"Authenticate the current payment","href":"/api-reference/payments/authenticate-the-current-payment"},{"openapi":"get /payment-intents/{id}/payment-fees","title":"Retrieve fees","href":"/api-reference/payments/retrieve-fees"},{"openapi":"get /payment-intents/url/{token}","title":"Retrieve configured URLs","href":"/api-reference/payments/retrieve-configured-urls"},{"openapi":"get /payment-intents/{id}/status","title":"Retrieve a PaymentIntent status","href":"/api-reference/payments/retrieve-a-paymentintent-status"},{"openapi":"get /payments","title":"Retrieve a Payments collection","href":"/api-reference/payments/retrieve-a-payments-collection"},{"openapi":"get /payments/{id}/status","title":"Retrieve the status payment object","href":"/api-reference/payments/retrieve-the-status-payment-object"}]},{"group":"Provisioning","pages":[{"openapi":"get /provisionings","title":"Retrieve a Provisionings collection","href":"/api-reference/provisioning/retrieve-a-provisionings-collection"},{"openapi":"post /provisionings","title":"Create a Provisioning","href":"/api-reference/provisioning/create-a-provisioning"},{"openapi":"get /provisionings/{id}","title":"Retrieve a Provisioning from given id","href":"/api-reference/provisioning/retrieve-a-provisioning-from-given-id"}]},{"group":"Receipt","pages":[{"openapi":"get /receipts/{id}","title":"Retrieve a Receipt","href":"/api-reference/receipt/retrieve-a-receipt"},{"openapi":"get /receipts/html/{id}","title":"Retrieve a Receipt as an HTML representation","href":"/api-reference/receipt/retrieve-a-receipt-as-an-html-representation"}]},{"group":"Payment on Terminal","pages":[{"openapi":"post /terminal/payments","title":"Execute payment","href":"/api-reference/payment-on-terminal/execute-payment"},{"openapi":"get /terminal/payments/{id}","title":"Retrieve a payment","href":"/api-reference/payment-on-terminal/retrieve-a-payment"}]},{"group":"IRT","pages":[{"openapi":"get /irt/transfer","title":"Retrieve a IRT transfers collection","href":"/api-reference/irt/retrieve-a-irt-transfers-collection"},{"openapi":"post /irt/transfer","title":"Create IRT transfer","href":"/api-reference/irt/create-irt-transfer"},{"openapi":"post /irt/transfer/verified-recipient","title":"Create an IRT transfer to a verified recipient","href":"/api-reference/irt/create-irt-transfer-verified-recipient"}]},{"group":"Transfers","pages":[{"openapi":"get /transfers","title":"Retrieve a Transfer collection","href":"/api-reference/transfers/retrieve-a-transfer-collection"},{"openapi":"post /transfers","title":"Create Transfer","href":"/api-reference/transfers/create-transfer"},{"openapi":"get /transfers/{id}","title":"Retrieve a Transfer","href":"/api-reference/transfers/retrieve-a-transfer"},{"openapi":"get /transfers/{id}/balance","title":"Retrieve a transfer's balance","href":"/api-reference/transfers/retrieve-a-transfers-balance"},{"openapi":"get /transfers/{id}/status","title":"Retrieve a transfer's status","href":"/api-reference/transfers/retrieve-a-transfers-status"},{"openapi":"post /transfers/status","title":"Retrieve the status of several transfers","href":"/api-reference/transfers/retrieve-transfers-status"}]},{"group":"Refunds","pages":[{"title":"Retrieve refunds collection","api":"GET https://api.hub2.io/refunds","href":"/api-reference/refunds/retrieve-refunds-collection"},{"openapi":"post /refunds/refund","title":"Create Refund","href":"/api-reference/refunds/create-refund"},{"title":"Retrieve a refund","api":"GET https://api.hub2.io/refunds/{id}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Payment Refunds","pages":[{"openapi":"post /payments-refund/{id}/refund","title":"Create Refund for a Payment","href":"/api-reference/payments-refunds/create-refund-for-a-payment"},{"openapi":"get /payments-refund/{refundId}/status","title":"Get the status of a Payment Refund","href":"/api-reference/payments-refunds/get-the-status-of-a-payment-refund"}]},{"group":"Deposits","pages":[{"openapi":"get /deposits","title":"List deposits","href":"/api-reference/deposits/list-deposits"},{"openapi":"post /deposits","title":"Create a deposit","href":"/api-reference/deposits/create-a-deposit"},{"openapi":"get /deposits/{id}","title":"Get a deposit","href":"/api-reference/deposits/get-a-deposit"},{"openapi":"get /deposits/proof-upload-uri","title":"Get a proof upload URL","href":"/api-reference/deposits/get-a-proof-upload-url"},{"openapi":"post /deposits/{id}/proof","title":"Submit a proof","href":"/api-reference/deposits/submit-a-proof"},{"openapi":"get /deposits/{id}/proof","title":"Get deposit proof image","href":"/api-reference/deposits/get-deposit-proof-image"}]},{"group":"Compliance","pages":[{"openapi":"get /compliance/kyb/{name}","title":"Retrieve a kyb by name","href":"/api-reference/compliance/retrieve-a-kyb-by-name"},{"openapi":"put /compliance/kyb/{name}","title":"Update a kyb","href":"/api-reference/compliance/update-a-kyb"},{"openapi":"delete /compliance/kyb/{name}","title":"Delete a kyb","href":"/api-reference/compliance/delete-a-kyb"},{"openapi":"get /compliance/kyb","title":"Fetch a kyb list","href":"/api-reference/compliance/fetch-a-kyb-list"},{"openapi":"post /compliance/kyb","title":"Create a kyb","href":"/api-reference/compliance/create-a-kyb"},{"openapi":"get /compliance/transaction","title":"Fetch a kyb transactions list","href":"/api-reference/compliance/fetch-a-kyb-transactions-list"},{"openapi":"post /compliance/transaction","title":"Create a kyb transaction","href":"/api-reference/compliance/create-a-kyb-transaction"},{"openapi":"get /compliance/transaction/{reference}","title":"Retrieve a kyb transaction by reference","href":"/api-reference/compliance/retrieve-a-kyb-transaction-by-reference"},{"openapi":"delete /compliance/transaction/{reference}","title":"Delete a kyb transaction","href":"/api-reference/compliance/delete-a-kyb-transaction"},{"openapi":"get /compliance/kyc","title":"Get kyc information","href":"/api-reference/compliance/get-kyc-information"}]},{"group":"Recipients","pages":[{"openapi":"post /recipient","title":"Create a new recipient","href":"/api-reference/recipients/create-recipient"},{"openapi":"get /recipient/{id}","title":"Get a recipient by id","href":"/api-reference/recipients/find-recipient"},{"openapi":"get /recipient","title":"Retrieve a list of recipients according to filters","href":"/api-reference/recipients/list-recipients"},{"openapi":"delete /recipient/{id}","title":"Delete a recipient by id","href":"/api-reference/recipients/delete-recipient"}]},{"group":"Processing Only","pages":[{"openapi":"post /delegated/payments","title":"Create a delegated payment","href":"/api-reference/processing-only/make-a-delegated-payment"},{"openapi":"post /delegated/payments/sync","title":"Create a delegated synchronous payment","href":"/api-reference/processing-only/make-a-synchronous-delegated-payment"},{"openapi":"post /delegated/transfers","title":"Create a delegated Transfer","href":"/api-reference/processing-only/make-a-delegated-transfer"},{"openapi":"post /delegated/transfers/irt","title":"Create a delegated IRT transfer","description":"Make an IRT transfer using your own provider credentials.","href":"/api-reference/processing-only/make-a-delegated-transfer-irt"}]},{"group":"Payment Links","pages":[{"title":"Create a payment link","api":"POST https://api.hub2.io/payment-links","href":"/api-reference/payment_links/create_payment_links"},{"openapi":"get /payment-links","title":"List Payment Links","description":"Retrieve a list of payment links with optional filtering","href":"/api-reference/payment_links/list_payment_links"},{"openapi":"get /payment-links/{id}","title":"Get Payment Link with Attempts","href":"/api-reference/payment_links/list_payment_links_with_attempts"},{"openapi":"patch /payment-links/{id}/close","title":"Close Payment Link","href":"/api-reference/payment_links/close_payment_links"}]},{"group":"Submerchants","pages":[{"openapi":"post /submerchants","title":"Create a submerchant","href":"/api-reference/submerchants/create-a-submerchant"},{"openapi":"get /submerchants","title":"List submerchants","href":"/api-reference/submerchants/list_submerchants"},{"openapi":"patch /submerchants/{submerchantId}","title":"Update a submerchant","href":"/api-reference/submerchants/update-a-submerchant"}]},{"group":"Subscriptions","pages":[{"openapi":"post /subscription-links","title":"Create Subscription Link","href":"/api-reference/subscriptions/create-a-subscription-link"},{"openapi":"post /subscription-intents","title":"Enroll a customer in card-on-file recurring debits","href":"/api-reference/subscriptions/enroll-a-customer"},{"openapi":"get /subscription-intents/{id}/status","title":"Retrieve a card-on-file enrollment status","href":"/api-reference/subscriptions/retrieve-an-enrollment-status"},{"openapi":"get /subscriptions","title":"Retrieve a Subscription collection","href":"/api-reference/subscriptions/retrieve-a-subscription-collection"},{"openapi":"post /subscriptions/{id}/charge","title":"Charge a merchant-initiated subscription on demand","href":"/api-reference/subscriptions/charge-a-subscription"},{"openapi":"post /subscriptions/{id}/suspend","title":"Suspend a subscription","href":"/api-reference/subscriptions/suspend-a-subscription"},{"openapi":"post /subscriptions/{id}/cancel","title":"Cancel a subscription","href":"/api-reference/subscriptions/cancel-a-subscription"},{"openapi":"get /subscriptions/{id}/transactions","title":"Retrieve a subscription's charge history","href":"/api-reference/subscriptions/retrieve-a-subscription-charge-history"}]},{"group":"Instant Payment","pages":[{"openapi":"get /instant-payment/accounts/{accountType}/aliases","title":"List the instant payment aliases of an account","href":"/api-reference/instant-payment/list-aliases"},{"openapi":"post /instant-payment/accounts/{accountType}/aliases","title":"Create an instant payment alias","href":"/api-reference/instant-payment/create-an-alias"},{"openapi":"delete /instant-payment/accounts/{accountType}/aliases/{aliasKey}","title":"Delete an instant payment alias","href":"/api-reference/instant-payment/delete-an-alias"}]}]}]},{"version":"Français","tabs":[{"tab":"HUB2"},{"tab":"Intégration","pages":[{"title":"Intégration","href":"/integration/fr/getting_started/introduction"}]},{"tab":"Documentation","pages":[{"title":"Documentation","href":"/documentation/fr/glossary"}]},{"tab":"Référence de l'API","groups":[{"group":"Data","pages":[{"openapi":"get /data/countries","title":"Get countries","href":"/api-reference/data/get-countries"},{"openapi":"get /data/providers","title":"Get providers","href":"/api-reference/data/get-providers"},{"openapi":"get /data/bank-codes","title":"Get bank codes","href":"/api-reference/data/get-bank-codes"}]},{"group":"Balance","pages":[{"openapi":"get /balance","title":"Check Merchant Balance","href":"/api-reference/balance/check-merchant-balance"}]},{"group":"Webhooks","pages":[{"openapi":"get /webhooks","title":"Get all webhooks","href":"/api-reference/webhooks/get-all-webhooks"},{"openapi":"post /webhooks","title":"Create a webhook","href":"/api-reference/webhooks/create-a-webhook"},{"openapi":"get /webhooks/{id}","title":"Get a webhook","href":"/api-reference/webhooks/get-a-webhook"},{"openapi":"delete /webhooks/{id}","title":"Remove a webhook","href":"/api-reference/webhooks/remove-a-webhook"},{"openapi":"patch /webhooks/{id}","title":"Update a webhook","href":"/api-reference/webhooks/update-a-webhook"}]},{"group":"Sms","pages":[{"openapi":"get /sms/count","title":"Retrieve number of sms sent","href":"/api-reference/sms/retrieve-number-of-sms-sent"},{"openapi":"get /sms/list","title":"Get a list of sms sent","href":"/api-reference/sms/get-a-list-of-sms-sent"},{"openapi":"post /sms","title":"Send Sms","href":"/api-reference/sms/send-sms"}]},{"group":"Payments","pages":[{"openapi":"get /payment-intents","title":"Retrieve a PaymentIntent collection","href":"/api-reference/payments/retrieve-a-paymentintent-collection"},{"openapi":"post /payment-intents","title":"Create a PaymentIntent object","href":"/api-reference/payments/create-a-paymentintent-object"},{"openapi":"get /payment-intents/{id}","title":"Retrieve a PaymentIntent object","href":"/api-reference/payments/retrieve-a-paymentintent-object"},{"openapi":"post /payment-intents/{id}/payments","title":"Attempt a payment on a PaymentIntent object","href":"/api-reference/payments/attempt-a-payment-on-a-paymentintent-object"},{"openapi":"post /payment-intents/{id}/payments/sync","title":"Synchronously attempt a payment on a payment intent","href":"/api-reference/payments/synchronously-attempt-a-payment-on-a-payment-intent"},{"openapi":"post /payment-intents/{id}/authentication","title":"Authenticate the current payment","href":"/api-reference/payments/authenticate-the-current-payment"},{"openapi":"get /payment-intents/{id}/payment-fees","title":"Retrieve fees","href":"/api-reference/payments/retrieve-fees"},{"openapi":"get /payment-intents/url/{token}","title":"Retrieve configured URLs","href":"/api-reference/payments/retrieve-configured-urls"},{"openapi":"get /payment-intents/{id}/status","title":"Retrieve a PaymentIntent status","href":"/api-reference/payments/retrieve-a-paymentintent-status"},{"openapi":"get /payments","title":"Retrieve a Payments collection","href":"/api-reference/payments/retrieve-a-payments-collection"},{"openapi":"get /payments/{id}/status","title":"Retrieve the status payment object","href":"/api-reference/payments/retrieve-the-status-payment-object"}]},{"group":"Provisioning","pages":[{"openapi":"get /provisionings","title":"Retrieve a Provisionings collection","href":"/api-reference/provisioning/retrieve-a-provisionings-collection"},{"openapi":"post /provisionings","title":"Create a Provisioning","href":"/api-reference/provisioning/create-a-provisioning"},{"openapi":"get /provisionings/{id}","title":"Retrieve a Provisioning from given id","href":"/api-reference/provisioning/retrieve-a-provisioning-from-given-id"}]},{"group":"Receipt","pages":[{"openapi":"get /receipts/{id}","title":"Retrieve a Receipt","href":"/api-reference/receipt/retrieve-a-receipt"},{"openapi":"get /receipts/html/{id}","title":"Retrieve a Receipt as an HTML representation","href":"/api-reference/receipt/retrieve-a-receipt-as-an-html-representation"}]},{"group":"Payment on Terminal","pages":[{"openapi":"post /terminal/payments","title":"Execute payment","href":"/api-reference/payment-on-terminal/execute-payment"},{"openapi":"get /terminal/payments/{id}","title":"Retrieve a payment","href":"/api-reference/payment-on-terminal/retrieve-a-payment"}]},{"group":"IRT","pages":[{"openapi":"get /irt/transfer","title":"Retrieve a IRT transfers collection","href":"/api-reference/irt/retrieve-a-irt-transfers-collection"},{"openapi":"post /irt/transfer","title":"Create IRT transfer","href":"/api-reference/irt/create-irt-transfer"},{"openapi":"post /irt/transfer/verified-recipient","title":"Create an IRT transfer to a verified recipient","href":"/api-reference/irt/create-irt-transfer-verified-recipient"}]},{"group":"Transfers","pages":[{"openapi":"get /transfers","title":"Retrieve a Transfer collection","href":"/api-reference/transfers/retrieve-a-transfer-collection"},{"openapi":"post /transfers","title":"Create Transfer","href":"/api-reference/transfers/create-transfer"},{"openapi":"get /transfers/{id}","title":"Retrieve a Transfer","href":"/api-reference/transfers/retrieve-a-transfer"},{"openapi":"get /transfers/{id}/balance","title":"Retrieve a transfer's balance","href":"/api-reference/transfers/retrieve-a-transfers-balance"},{"openapi":"get /transfers/{id}/status","title":"Retrieve a transfer's status","href":"/api-reference/transfers/retrieve-a-transfers-status"},{"openapi":"post /transfers/status","title":"Retrieve the status of several transfers","href":"/api-reference/transfers/retrieve-transfers-status"}]},{"group":"Refunds","pages":[{"title":"Retrieve refunds collection","api":"GET https://api.hub2.io/refunds","href":"/api-reference/refunds/retrieve-refunds-collection"},{"openapi":"post /refunds/refund","title":"Create Refund","href":"/api-reference/refunds/create-refund"},{"title":"Retrieve a refund","api":"GET https://api.hub2.io/refunds/{id}","href":"/api-reference/refunds/retrieve-a-refund"}]},{"group":"Payment Refunds","pages":[{"openapi":"post /payments-refund/{id}/refund","title":"Create Refund for a Payment","href":"/api-reference/payments-refunds/create-refund-for-a-payment"},{"openapi":"get /payments-refund/{refundId}/status","title":"Get the status of a Payment Refund","href":"/api-reference/payments-refunds/get-the-status-of-a-payment-refund"}]},{"group":"Deposits","pages":[{"openapi":"get /deposits","title":"List deposits","href":"/api-reference/deposits/list-deposits"},{"openapi":"post /deposits","title":"Create a deposit","href":"/api-reference/deposits/create-a-deposit"},{"openapi":"get /deposits/{id}","title":"Get a deposit","href":"/api-reference/deposits/get-a-deposit"},{"openapi":"get /deposits/proof-upload-uri","title":"Get a proof upload URL","href":"/api-reference/deposits/get-a-proof-upload-url"},{"openapi":"post /deposits/{id}/proof","title":"Submit a proof","href":"/api-reference/deposits/submit-a-proof"},{"openapi":"get /deposits/{id}/proof","title":"Get deposit proof image","href":"/api-reference/deposits/get-deposit-proof-image"}]},{"group":"Compliance","pages":[{"openapi":"get /compliance/kyb/{name}","title":"Retrieve a kyb by name","href":"/api-reference/compliance/retrieve-a-kyb-by-name"},{"openapi":"put /compliance/kyb/{name}","title":"Update a kyb","href":"/api-reference/compliance/update-a-kyb"},{"openapi":"delete /compliance/kyb/{name}","title":"Delete a kyb","href":"/api-reference/compliance/delete-a-kyb"},{"openapi":"get /compliance/kyb","title":"Fetch a kyb list","href":"/api-reference/compliance/fetch-a-kyb-list"},{"openapi":"post /compliance/kyb","title":"Create a kyb","href":"/api-reference/compliance/create-a-kyb"},{"openapi":"get /compliance/transaction","title":"Fetch a kyb transactions list","href":"/api-reference/compliance/fetch-a-kyb-transactions-list"},{"openapi":"post /compliance/transaction","title":"Create a kyb transaction","href":"/api-reference/compliance/create-a-kyb-transaction"},{"openapi":"get /compliance/transaction/{reference}","title":"Retrieve a kyb transaction by reference","href":"/api-reference/compliance/retrieve-a-kyb-transaction-by-reference"},{"openapi":"delete /compliance/transaction/{reference}","title":"Delete a kyb transaction","href":"/api-reference/compliance/delete-a-kyb-transaction"},{"openapi":"get /compliance/kyc","title":"Get kyc information","href":"/api-reference/compliance/get-kyc-information"}]},{"group":"Recipients","pages":[{"openapi":"post /recipient","title":"Create a new recipient","href":"/api-reference/recipients/create-recipient"},{"openapi":"get /recipient/{id}","title":"Get a recipient by id","href":"/api-reference/recipients/find-recipient"},{"openapi":"get /recipient","title":"Retrieve a list of recipients according to filters","href":"/api-reference/recipients/list-recipients"},{"openapi":"delete /recipient/{id}","title":"Delete a recipient by id","href":"/api-reference/recipients/delete-recipient"}]},{"group":"Processing Only","pages":[{"openapi":"post /delegated/payments","title":"Create a delegated payment","href":"/api-reference/processing-only/make-a-delegated-payment"},{"openapi":"post /delegated/payments/sync","title":"Create a delegated synchronous payment","href":"/api-reference/processing-only/make-a-synchronous-delegated-payment"},{"openapi":"post /delegated/transfers","title":"Create a delegated Transfer","href":"/api-reference/processing-only/make-a-delegated-transfer"},{"openapi":"post /delegated/transfers/irt","title":"Create a delegated IRT transfer","description":"Make an IRT transfer using your own provider credentials.","href":"/api-reference/processing-only/make-a-delegated-transfer-irt"}]},{"group":"Payment Links","pages":[{"title":"Create a payment link","api":"POST https://api.hub2.io/payment-links","href":"/api-reference/payment_links/create_payment_links"},{"openapi":"get /payment-links","title":"List Payment Links","description":"Retrieve a list of payment links with optional filtering","href":"/api-reference/payment_links/list_payment_links"},{"openapi":"get /payment-links/{id}","title":"Get Payment Link with Attempts","href":"/api-reference/payment_links/list_payment_links_with_attempts"},{"openapi":"patch /payment-links/{id}/close","title":"Close Payment Link","href":"/api-reference/payment_links/close_payment_links"}]},{"group":"Submerchants","pages":[{"openapi":"post /submerchants","title":"Create a submerchant","href":"/api-reference/submerchants/create-a-submerchant"},{"openapi":"get /submerchants","title":"List submerchants","href":"/api-reference/submerchants/list_submerchants"},{"openapi":"patch /submerchants/{submerchantId}","title":"Update a submerchant","href":"/api-reference/submerchants/update-a-submerchant"}]},{"group":"Subscriptions","pages":[{"openapi":"post /subscription-links","title":"Create Subscription Link","href":"/api-reference/subscriptions/create-a-subscription-link"},{"openapi":"post /subscription-intents","title":"Enroll a customer in card-on-file recurring debits","href":"/api-reference/subscriptions/enroll-a-customer"},{"openapi":"get /subscription-intents/{id}/status","title":"Retrieve a card-on-file enrollment status","href":"/api-reference/subscriptions/retrieve-an-enrollment-status"},{"openapi":"get /subscriptions","title":"Retrieve a Subscription collection","href":"/api-reference/subscriptions/retrieve-a-subscription-collection"},{"openapi":"post /subscriptions/{id}/charge","title":"Charge a merchant-initiated subscription on demand","href":"/api-reference/subscriptions/charge-a-subscription"},{"openapi":"post /subscriptions/{id}/suspend","title":"Suspend a subscription","href":"/api-reference/subscriptions/suspend-a-subscription"},{"openapi":"post /subscriptions/{id}/cancel","title":"Cancel a subscription","href":"/api-reference/subscriptions/cancel-a-subscription"},{"openapi":"get /subscriptions/{id}/transactions","title":"Retrieve a subscription's charge history","href":"/api-reference/subscriptions/retrieve-a-subscription-charge-history"}]},{"group":"Instant Payment","pages":[{"openapi":"get /instant-payment/accounts/{accountType}/aliases","title":"List the instant payment aliases of an account","href":"/api-reference/instant-payment/list-aliases"},{"openapi":"post /instant-payment/accounts/{accountType}/aliases","title":"Create an instant payment alias","href":"/api-reference/instant-payment/create-an-alias"},{"openapi":"delete /instant-payment/accounts/{accountType}/aliases/{aliasKey}","title":"Delete an instant payment alias","href":"/api-reference/instant-payment/delete-an-alias"}]}]}]}]},"basePath":"","title":"Create a payment link - HUB2 Documentation","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js"]}