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.
Headers
string
required
Your API key.
string
required
Your merchant ID.
string
required
The environment to use: sandbox or live.
Request
string
required
Your reference for the purchase (e.g., ORDER-12345). For a multi_use link, it identifies the collection.
string
required
The currency, as a three-letter ISO 4217 code (e.g., XOF).
string
required
The country where the customer pays, as a two-letter ISO 3166-1 alpha-2 code (e.g., CI).
string[]
required
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.
string[]
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 name at most 64 characters. A provider unknown in country is rejected with 400 and the generic code Bad Request. A known provider that is not enabled for a payment method the link offers, or that is not available to your account, is left out of the link and missing from the providers of the response. When no provider is left for mobile_money, the request is rejected with 400 and the code wrong_provider. When the providers cannot be checked, the request is rejected with 503 and the code provider_check_unavailable: retry later.
integer
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.
boolean
default:"false"
When true, the customer enters the amount on the checkout page.
integer
The minimum amount the customer can enter. Only relevant when openAmount is true. Minimum 500 for XOF and XAF.
integer
The maximum amount the customer can enter. Only relevant when openAmount is true. Must be greater than minAmount.
string
default:"single_use"
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).
integer
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.
string
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.
string
The HTTPS URL the customer is redirected to after a successful payment.
string
The HTTPS URL the customer is redirected to after a failed payment.
string
The phone number of the customer. When set, only this phone number can pay the link.
string
A description displayed on the checkout page.
object[]
Up to 5 custom form fields the customer fills in before choosing a payment method. They cannot be changed after creation.
Show Customer field object
string
required
The field identifier, in snake_case (e.g., national_id).
string
required
The label displayed to the customer. Maximum 100 characters.
string
required
The expected value type. Possible values: text, integer, decimal, email, date.
boolean
required
Whether the customer must fill in the field.
string
The placeholder text of the input. Maximum 200 characters.
Response
HTTP status: 201 Created
string
The ID of the payment link (e.g., pl_z1urYtVFgEebtcj8fxp4v).
string
The URL of the checkout page to share with your customer.
string
The status of the payment link. Possible values: active, completed, closed, expired.
string
The type of the payment link. Possible values: single_use, multi_use, bill_payment.
string
Your reference for the purchase.
number | null
The amount to charge, in the smallest currency unit. null when openAmount is true.
string
The currency, as an ISO 4217 code.
boolean
Whether the customer enters the amount.
number
The minimum amount the customer can enter. Only when openAmount is true.
number
The maximum amount the customer can enter. Only when openAmount is true.
number
The maximum number of successful payments. Absent for an unlimited multi_use link.
number
The number of successful payments recorded on the link.
number
The maximum number of failed payments on a single_use link (currently 3). When it is reached, the link is closed.
string | null
The only phone number allowed to pay the link, if one was set.
string[]
The providers the link offers. A requested provider that was left out (see providers in the request) is missing here. Absent on a card-only link.
object[]
The custom form fields of the link. Absent when the link has none.
string
The expiration date of the link, in ISO 8601 format.
string
The creation date of the link, in ISO 8601 format.
string
The date of the last update of the link, in ISO 8601 format.
Errors
Status
Description
400
Validation error, or invalid or unavailable providers. The code field of the error gives the reason: Bad Request (a field is invalid, for example a provider unknown in country; message is then a list of messages), wrong_provider (no requested provider is left for mobile_money), 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).
401
Invalid credentials.
403
Missing permission.
429
More than 100 requests per 10 seconds.
503
The providers could not be checked. The code field of the error is provider_check_unavailable: retry later.
{"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":"6afc203b959cb52827707f0e","clientVersion":"0.0.4177","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":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"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 name at most 64 characters. A provider unknown in `,_jsx(_components.code,{children:`country`}),` is rejected with `,_jsx(_components.code,{children:`400`}),` and the generic code `,_jsx(_components.code,{children:`Bad Request`}),`. A known provider that is not enabled for a payment method the link offers, or that is not available to your account, is left out of the link and missing from the `,_jsx(_components.code,{children:`providers`}),` of the response. When no provider is left for `,_jsx(_components.code,{children:`mobile_money`}),`, the request is rejected with `,_jsx(_components.code,{children:`400`}),` and the code `,_jsx(_components.code,{children:`wrong_provider`}),`. When the providers cannot be checked, the request is rejected with `,_jsx(_components.code,{children:`503`}),` and the code `,_jsx(_components.code,{children:`provider_check_unavailable`}),`: retry later.`]})}),`\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:`providers`,type:`string[]`,id:`param-providers-1`,children:_jsxs(_components.p,{children:[`The providers the link offers. A requested provider that was left out (see `,_jsx(_components.code,{children:`providers`}),` in the request) is missing here. Absent on a card-only link.`]})}),`\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:`Bad Request`}),` (a field is invalid, for example a provider unknown in `,_jsx(_components.code,{children:`country`}),`; `,_jsx(_components.code,{children:`message`}),` is then a list of messages), `,_jsx(_components.code,{children:`wrong_provider`}),` (no requested provider is left for `,_jsx(_components.code,{children:`mobile_money`}),`), `,_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.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`503`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The providers could not be checked. The `,_jsx(_components.code,{children:`code`}),` field of the error is `,_jsx(_components.code,{children:`provider_check_unavailable`}),`: retry later.`]})]})]})]})]})}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 name at most 64 characters. A provider unknown in `,_jsx(_components.code,{children:`country`}),` is rejected with `,_jsx(_components.code,{children:`400`}),` and the generic code `,_jsx(_components.code,{children:`Bad Request`}),`. A known provider that is not enabled for a payment method the link offers, or that is not available to your account, is left out of the link and missing from the `,_jsx(_components.code,{children:`providers`}),` of the response. When no provider is left for `,_jsx(_components.code,{children:`mobile_money`}),`, the request is rejected with `,_jsx(_components.code,{children:`400`}),` and the code `,_jsx(_components.code,{children:`wrong_provider`}),`. When the providers cannot be checked, the request is rejected with `,_jsx(_components.code,{children:`503`}),` and the code `,_jsx(_components.code,{children:`provider_check_unavailable`}),`: retry later.`]})}),`\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:`providers`,type:`string[]`,id:`param-providers-1`,children:_jsxs(_components.p,{children:[`The providers the link offers. A requested provider that was left out (see `,_jsx(_components.code,{children:`providers`}),` in the request) is missing here. Absent on a card-only link.`]})}),`\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:`Bad Request`}),` (a field is invalid, for example a provider unknown in `,_jsx(_components.code,{children:`country`}),`; `,_jsx(_components.code,{children:`message`}),` is then a list of messages), `,_jsx(_components.code,{children:`wrong_provider`}),` (no requested provider is left for `,_jsx(_components.code,{children:`mobile_money`}),`), `,_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.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`503`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`The providers could not be checked. The `,_jsx(_components.code,{children:`code`}),` field of the error is `,_jsx(_components.code,{children:`provider_check_unavailable`}),`: retry later.`]})]})]})]}),`\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:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"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\"`}),_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:` \"providers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"orange\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mtn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"moov\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}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=\"18\">\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>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"providers\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"orange\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"mtn\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"moov\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\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 name at most 64 characters. A provider unknown in `country` is rejected with `400` and the generic code `Bad Request` . A known provider that is not enabled for a payment method the link offers, or that is not available to your account, is left out of the link and missing from the `providers` of the response. When no provider is left for `mobile_money` , the request is rejected with `400` and the code `wrong_provider` . When the providers cannot be checked, the request is rejected with `503` and the code `provider_check_unavailable` : retry later."}],"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."}],"providers":[{"type":"array","items":[{"type":"string"}],"description":"The providers the link offers. A requested provider that was left out (see `providers` in the request) is missing here. Absent on a card-only link."}],"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":{},"providers":["\u003cstring>"],"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-11-17T09:37:06.810Z","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=a5fca8aa939f5f6b7537a5cc\u0026amp;signature=f78c775a146cb1dde38da65919760daba663fe9247483a489efdf3b6c20fe524\">\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=a5fca8aa939f5f6b7537a5cc\u0026amp;signature=f78c775a146cb1dde38da65919760daba663fe9247483a489efdf3b6c20fe524\">\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-11-17T09:37:06.810Z\",\"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-11-17T09:37:06.810Z\",\"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\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"HUB2 Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/payment_links/create_payment_links.md","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","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js"]}