Creates a new checkout session and returns a checkout_url to redirect your customer to.
Use hosted (default) to let the customer choose a provider, or redirect with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment.
Idempotency: Pass an Idempotency-Key header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.
Your PayBridgeNP API key. Obtain one from the dashboard under Settings → API Keys. Prefix: sk_test_ for testing, sk_live_ for production.
Headers
Idempotency-Key
string
A unique string (UUID recommended) to make this request idempotent. Safe to retry on network failures.
Body
application/json
amount
integer
required
Payment amount in paisa. Must be an integer between 1,000 (Rs. 10) and 100,000,000 (Rs. 1,000,000). eSewa, Khalti, and Fonepay reject anything below Rs. 10.
Required range: 1000 <= x <= 100000000
Example:
10000
returnUrl
string<uri>
required
Your page URL. The customer is redirected here after payment (success or failure).
Example:
"https://yourapp.com/checkout/complete"
currency
enum<string>
default:NPR
Must be NPR. Other currencies are not yet supported.
Available options:
NPR
cancelUrl
string<uri> | null
Where the customer lands when they cancel - both at the provider and via the "Cancel" link on the hosted picker. Optional. When omitted, cancellations fall back to returnUrl with ?session_id=...&status=cancelled appended, and the hosted picker hides its Cancel link entirely.
Example:
"https://yourapp.com/checkout/cancelled"
embedOrigin
string<uri> | null
Render hosted checkout in an overlay on this origin. The origin must be registered under Project -> Embed domains for the request mode, and flow must be hosted. Live mode requires Growth or higher; sandbox is available on every plan. After the provider handoff, the customer returns through your returnUrl; confirm payment on your server before fulfillment.
Example:
"https://yourshop.com"
provider
enum<string>
Pre-select a provider. Omit to let the customer choose on the hosted page. Required when flow is redirect.
Available options:
esewa,
khalti,
fonepay
flow
enum<string>
default:hosted
hosted (default) renders the PayBridgeNP picker (provider pre-selected if set). redirect skips the picker and forwards straight to the provider - requires provider.
Available options:
hosted,
redirect
description
string | null
Human-readable purchase description (max 200 chars). Providers that support it - like Khalti's purchase_order_name - surface this on their hosted checkout page. Falls back to a generic placeholder when omitted.
Maximum string length: 200
Example:
"Order #1001"
metadata
object | null
Arbitrary key-value data (max 8 KB). Returned on the payment object and in webhook payloads.
Optional customer details pre-filled on the checkout page.
Show child attributes
collectAddress
boolean
default:false
When true, the hosted checkout page asks the customer for a shipping address (street and city required) before payment. The collected address is included as customer_address in webhook event payloads - null otherwise.
buyerPolicy
object | null
Which buyer details the hosted page asks for, for this session only. Omitted keys use your project's defaults (dashboard Settings > Checkout). By default the customer must leave a mobile number or an email, and the name is optional. A field set to off is not asked for; a value you send in customer is still used.
Show child attributes
customerLocks
enum<string>[] | null
Contacts you already know for this customer, sent in customer, that the hosted page shows read-only and the customer cannot change. Each listed field must have a usable value (a Nepali mobile number for phone, a valid address for email).
Available options:
name,
email,
phone
Response
Checkout session created.
id
string
Example:
"cs_01j9x2k3m4n5p6q7r8s9t0u1v2"
livemode
boolean
true when created with a live key, false for sandbox.
checkout_url
string<uri>
Redirect your customer to this URL to complete payment.
Echoes the requested flow. Defaults to hosted when omitted on creation.
Available options:
hosted,
redirect
provider
enum<string> | null
Pre-selected provider, or null if the customer will pick on the hosted page. card is a card test payment (test mode only; cards are not available in live mode).
Available options:
esewa,
khalti,
fonepay,
card
expires_at
string<date-time>
buyer_policy
object
Returned when the session is created: the buyer details the hosted page will ask for, resolved from your project defaults and this request's buyerPolicy, and the contacts locked by customerLocks.
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PayBridgeNP","description":"Developer documentation for accepting eSewa, Khalti, and Fonepay payments in Nepal with PayBridgeNP.","colors":{"primary":"#1f5ff7","light":"#5b8cff","dark":"#1a4fdb"},"logo":{"light":"https://mintcdn.com/paybridgenp/ZIhRJeSmyMmWEJYy/logo/light.svg?fit=max\u0026auto=format\u0026n=ZIhRJeSmyMmWEJYy\u0026q=85\u0026s=56ca123bc9be4b9f764c558f7b3adec8","dark":"https://mintcdn.com/paybridgenp/ZIhRJeSmyMmWEJYy/logo/dark.svg?fit=max\u0026auto=format\u0026n=ZIhRJeSmyMmWEJYy\u0026q=85\u0026s=39a925b00c5c7eee6b04bbfb863d3eb5","href":"https://docs.paybridgenp.com/home"},"favicon":"https://mintcdn.com/paybridgenp/OtdaH4FVK3w8XHcC/favicon.svg?fit=max\u0026auto=format\u0026n=OtdaH4FVK3w8XHcC\u0026q=85\u0026s=4afcdaa925cb367387bdc40b9771ef72","api":{"openapi":"openapi.json"},"navbar":{"links":[{"icon":"signal-bars","href":"https://status.paybridgenp.com","label":"Status"},{"icon":"gauge-high","href":"https://dashboard.paybridgenp.com","label":"Dashboard"}],"primary":{"type":"button","label":"Get API Keys","href":"https://dashboard.paybridgenp.com/signup"}},"footer":{"socials":{"github":"https://github.com/paybridgenp","discord":"https://discord.gg/aquta4JwJt","linkedin":"https://linkedin.com/company/paybridgenp","facebook":"https://www.facebook.com/paybridgenp","x":"https://x.com/PayBridge_NP"}},"search":{"prompt":"Search payments, APIs, SDKs, and integrations"},"seo":{"metatags":{"og:site_name":"PayBridgeNP Documentation","twitter:card":"summary_large_image"},"organization":{"name":"PayBridgeNP","url":"https://paybridgenp.com","logo":"https://docs.paybridgenp.com/logo/light.svg","sameAs":["https://github.com/paybridgenp","https://linkedin.com/company/paybridgenp"]},"indexing":"navigable"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"markdown":{"instructions":["Use hosted checkout for a new payment integration unless the user explicitly needs an SDK or Direct QR flow.","Keep secret API keys on the server. Never place an sk_test_ or sk_live_ key in browser or mobile code.","Never treat a browser return URL as proof of payment. Verify a signed webhook and confirm status, amount, and currency on the server before fulfillment.","Fonepay has no sandbox. A Fonepay payment made from a sandbox project uses the merchant's real Fonepay account and moves real money within the documented caps.","Do not recommend direct integration with Mobile SDK device endpoints. Use the PayBridgeNP Mobile SDK and the merchant-facing session creation API."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"paybridgenp","hasAudioNarration":false,"actualSubdomain":"paybridgenp","customDomains":["docs.paybridgenp.com"],"gitSource":{"type":"github","owner":"paybridgenp","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af8c48a8ab367393043935c","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"API Reference","count":96},{"language":"default","tag":"Billing","count":53},{"language":"default","tag":"Payments","count":43},{"language":"default","tag":"Subscriptions","count":19},{"language":"default","tag":"One-time Invoices","count":14},{"language":"default","tag":"Integrations","count":12},{"language":"default","tag":"Checkout","count":11},{"language":"default","tag":"Dunning","count":8},{"language":"default","tag":"Subscriptions and billing","count":7},{"language":"default","tag":"Customers","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styling.css","content":"/* vietnamese */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGHInHEVA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGGInHEVA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 500;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGIInE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 600;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGHInHEVA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 600;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGGInHEVA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 600;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGIInE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 700;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGHInHEVA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 700;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGGInHEVA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Bricolage Grotesque';\n font-style: normal;\n font-weight: 700;\n font-stretch: 100%;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/bricolagegrotesque/v9/3y9K6as8bTXq_nANBjzKo3IeZx8z6up5BeSl9D4dj_x9PpZBMlGIInE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Iayoxdg.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Gayo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Iayoxdg.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Gayo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Iayoxdg.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Gayo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Iayoxdg.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Schibsted Grotesk';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/schibstedgrotesk/v7/Jqz55SSPQuCQF3t8uOwiUL-taUTtap9Gayo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n@media (min-width: 1024px){body:has(#navbar.is-not-custom) div:has(>#sidebar+#content-container){max-width:92rem}body:has(#navbar.is-not-custom) div:has(>#sidebar+#content-container){padding-left:3rem;padding-right:3rem}#sidebar{width:18rem}body:has(#navbar.is-not-custom) #content-area{padding-left:3rem}#content-side-layout #table-of-contents-layout,#content-side-layout #table-of-contents{width:100%}#content-container>div:has(nav[aria-labelledby]){gap:1.875rem}#content-container>div:has(nav[aria-labelledby])>div:first-child{width:15.375rem;max-width:15.375rem}#content-container>div:has(nav[aria-labelledby])>div:first-child>nav{width:100%;max-width:100%}}#page-title{font-size:1.875rem;line-height:2.25rem}#header>.prose{margin-top:0.375rem;font-size:1rem;line-height:1.5rem}#content{margin-top:1.5rem;font-size:0.9375rem;line-height:1.65}#content>h2{margin-top:1.875rem;margin-bottom:0.75rem;font-size:1.25rem;line-height:1.75rem}#content>h3{margin-top:1.5rem;margin-bottom:0.625rem;font-size:1rem;line-height:1.5rem}#content .callout{border-radius:0.75rem;padding:0.75rem 1rem;font-size:0.875rem;line-height:1.375rem}nav[aria-label=\"Pages\"] a,nav[aria-label=\"Pages\"] button{font-size:0.875rem;line-height:1.25rem}nav[aria-label=\"Pages\"] a{padding-top:0.25rem;padding-bottom:0.25rem}#hero-stage{transform-origin:right center;transform:translateY(-50%) scale(0.95)}@media (max-width: 1279px){#hero-stage{transform:translateY(-50%) scale(0.68)}}"}],"page":{"pagePath":"api-reference/checkout/create-session","slug":"/api-reference/checkout/create-session","pageMetadata":{"openapi":"POST /v1/checkout","title":"Create a checkout session","description":"Creates a new checkout session and returns a `checkout_url` to redirect your customer to.\n\nUse `hosted` (default) to let the customer choose a provider, or `redirect` with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment.\n\n**Idempotency:** Pass an `Idempotency-Key` header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.","href":"/api-reference/checkout/create-session"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a new checkout session and returns a \", _jsx(_components.code, {\n children: \"checkout_url\"\n }), \" to redirect your customer to.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Use \", _jsx(_components.code, {\n children: \"hosted\"\n }), \" (default) to let the customer choose a provider, or \", _jsx(_components.code, {\n children: \"redirect\"\n }), \" with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Idempotency:\"\n }), \" Pass an \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"POST /v1/checkout","title":"Create a checkout session","description":"Creates a new checkout session and returns a `checkout_url` to redirect your customer to.\n\nUse `hosted` (default) to let the customer choose a provider, or `redirect` with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment.\n\n**Idempotency:** Pass an `Idempotency-Key` header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.","href":"/api-reference/checkout/create-session"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/paybridgenp/841570c3b94facb0/home-theme.js"],"openApiReferenceData":{"operation":{"tags":["Payments"],"summary":"Create a checkout session","description":"Creates a new checkout session and returns a `checkout_url` to redirect your customer to.\n\nUse `hosted` (default) to let the customer choose a provider, or `redirect` with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment.\n\n**Idempotency:** Pass an `Idempotency-Key` header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.","operationId":"createCheckoutSession","requestBody":"77c7c6bf-e085-4a47-ae58-bfd09bc165f8","parameters":["8330762b-9d6a-4bd2-b5d9-9d3fb51c0d39"],"responses":{"201":"a913c0ca-8eb1-4f03-b9ff-e2da489aa551","400":"0b21579c-baa8-4d98-95b6-36de5933e8a1","401":"837183d7-476b-43de-b1ea-2436aeba2113"},"x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST https://api.paybridgenp.com/v1/checkout \\\n -H \"Authorization: Bearer sk_test_your_key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"amount\": 10000,\n \"currency\": \"NPR\",\n \"returnUrl\": \"https://yourapp.com/checkout/complete\",\n \"metadata\": { \"order_id\": \"order_123\" }\n }'"},{"lang":"JavaScript","label":"nodejs","source":"import { PayBridgeNP } from \"@paybridge-np/sdk\";\n\nconst paybridgenp = new PayBridgeNP({ apiKey: \"sk_test_your_key\" });\n\nconst session = await paybridgenp.checkout.create({\n amount: 10000,\n currency: \"NPR\",\n returnUrl: \"https://yourapp.com/checkout/complete\",\n metadata: { order_id: \"order_123\" },\n});\n\n// Send this URL to your browser or framework redirect helper.\nconsole.log(session.checkout_url);"},{"lang":"PHP","label":"php","source":"$response = $paybridgenp->post('https://api.paybridgenp.com/v1/checkout', [\n 'headers' => ['Authorization' => 'Bearer sk_test_your_key'],\n 'json' => [\n 'amount' => 10000,\n 'currency' => 'NPR',\n 'returnUrl' => 'https://yourapp.com/checkout/complete',\n 'metadata' => ['order_id' => 'order_123'],\n ],\n]);\n$session = json_decode($response->getBody(), true);\nheader('Location: ' . $session['checkout_url']);"}],"method":"post","type":"path","servers":["e37f6421-70de-48c7-b9fc-5ced90b42b39"],"security":["84af0c48-42cd-49c5-9257-62f69055fcee"],"path":"/v1/checkout","baseUrlOptions":["https://api.paybridgenp.com"],"title":"Create a checkout session","codeSamples":[{"label":"curl","lang":"Shell","source":"curl -X POST https://api.paybridgenp.com/v1/checkout \\\n -H \"Authorization: Bearer sk_test_your_key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"amount\": 10000,\n \"currency\": \"NPR\",\n \"returnUrl\": \"https://yourapp.com/checkout/complete\",\n \"metadata\": { \"order_id\": \"order_123\" }\n }'"},{"label":"nodejs","lang":"JavaScript","source":"import { PayBridgeNP } from \"@paybridge-np/sdk\";\n\nconst paybridgenp = new PayBridgeNP({ apiKey: \"sk_test_your_key\" });\n\nconst session = await paybridgenp.checkout.create({\n amount: 10000,\n currency: \"NPR\",\n returnUrl: \"https://yourapp.com/checkout/complete\",\n metadata: { order_id: \"order_123\" },\n});\n\n// Send this URL to your browser or framework redirect helper.\nconsole.log(session.checkout_url);"},{"label":"php","lang":"PHP","source":"$response = $paybridgenp->post('https://api.paybridgenp.com/v1/checkout', [\n 'headers' => ['Authorization' => 'Bearer sk_test_your_key'],\n 'json' => [\n 'amount' => 10000,\n 'currency' => 'NPR',\n 'returnUrl' => 'https://yourapp.com/checkout/complete',\n 'metadata' => ['order_id' => 'order_123'],\n ],\n]);\n$session = json_decode($response->getBody(), true);\nheader('Location: ' . $session['checkout_url']);"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"8330762b-9d6a-4bd2-b5d9-9d3fb51c0d39":{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique string (UUID recommended) to make this request idempotent. Safe to retry on network failures.","schema":{"type":"string","isRequired":false,"description":"A unique string (UUID recommended) to make this request idempotent. Safe to retry on network failures.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount","returnUrl"],"properties":{"amount":{"type":"integer","description":"Payment amount in **paisa**. Must be an integer between 1,000 (Rs. 10) and 100,000,000 (Rs. 1,000,000). eSewa, Khalti, and Fonepay reject anything below Rs. 10.","example":10000,"minimum":1000,"maximum":100000000,"isRequired":true,"uniqueKey":"amount","typeLabel":"integer"},"returnUrl":{"type":"string","format":"uri","description":"Your page URL. The customer is redirected here after payment (success or failure).","example":"https://yourapp.com/checkout/complete","isRequired":true,"uniqueKey":"returnUrl","typeLabel":"string\u003curi>"},"currency":{"type":"string","enum":["NPR"],"default":"NPR","description":"Must be `NPR`. Other currencies are not yet supported.","uniqueKey":"currency","typeLabel":"enum\u003cstring>"},"cancelUrl":{"oneOf":[{"type":"string","format":"uri","description":"Where the customer lands when they cancel - both at the provider and via the \"Cancel\" link on the hosted picker. **Optional.** When omitted, cancellations fall back to `returnUrl` with `?session_id=...\u0026status=cancelled` appended, and the hosted picker hides its Cancel link entirely.","example":"https://yourapp.com/checkout/cancelled","uniqueKey":"cancelUrl.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","description":"Where the customer lands when they cancel - both at the provider and via the \"Cancel\" link on the hosted picker. **Optional.** When omitted, cancellations fall back to `returnUrl` with `?session_id=...\u0026status=cancelled` appended, and the hosted picker hides its Cancel link entirely.","example":"https://yourapp.com/checkout/cancelled","uniqueKey":"cancelUrl.oneOf.1","typeLabel":"null"}],"uniqueKey":"cancelUrl","typeLabel":"string\u003curi> | null"},"embedOrigin":{"oneOf":[{"type":"string","format":"uri","description":"Render hosted checkout in an overlay on this origin. The origin must be registered under **Project -> Embed domains** for the request mode, and `flow` must be `hosted`. Live mode requires Growth or higher; sandbox is available on every plan. After the provider handoff, the customer returns through your `returnUrl`; confirm payment on your server before fulfillment.","example":"https://yourshop.com","uniqueKey":"embedOrigin.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","description":"Render hosted checkout in an overlay on this origin. The origin must be registered under **Project -> Embed domains** for the request mode, and `flow` must be `hosted`. Live mode requires Growth or higher; sandbox is available on every plan. After the provider handoff, the customer returns through your `returnUrl`; confirm payment on your server before fulfillment.","example":"https://yourshop.com","uniqueKey":"embedOrigin.oneOf.1","typeLabel":"null"}],"uniqueKey":"embedOrigin","typeLabel":"string\u003curi> | null"},"provider":{"type":"string","enum":["esewa","khalti","fonepay"],"description":"Pre-select a provider. Omit to let the customer choose on the hosted page. Required when `flow` is `redirect`.","uniqueKey":"provider","typeLabel":"enum\u003cstring>"},"flow":{"type":"string","enum":["hosted","redirect"],"default":"hosted","description":"`hosted` (default) renders the PayBridgeNP picker (provider pre-selected if set). `redirect` skips the picker and forwards straight to the provider - requires `provider`.","uniqueKey":"flow","typeLabel":"enum\u003cstring>"},"description":{"oneOf":[{"type":"string","maxLength":200,"description":"Human-readable purchase description (max 200 chars). Providers that support it - like Khalti's `purchase_order_name` - surface this on their hosted checkout page. Falls back to a generic placeholder when omitted.","example":"Order #1001","uniqueKey":"description.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":200,"description":"Human-readable purchase description (max 200 chars). Providers that support it - like Khalti's `purchase_order_name` - surface this on their hosted checkout page. Falls back to a generic placeholder when omitted.","example":"Order #1001","uniqueKey":"description.oneOf.1","typeLabel":"null"}],"uniqueKey":"description","typeLabel":"string | null"},"metadata":{"oneOf":[{"type":"object","additionalProperties":true,"description":"Arbitrary key-value data (max 8 KB). Returned on the payment object and in webhook payloads.","example":{"order_id":"order_123","customer_id":"cust_456"},"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"type":"null","additionalProperties":true,"description":"Arbitrary key-value data (max 8 KB). Returned on the payment object and in webhook payloads.","example":{"order_id":"order_123","customer_id":"cust_456"},"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"object | null"},"customer":{"oneOf":[{"type":"object","description":"Optional customer details pre-filled on the checkout page.","properties":{"name":{"type":"string","example":"Aarav Sharma","uniqueKey":"customer.oneOf.0.name","typeLabel":"string"},"email":{"type":"string","format":"email","example":"aarav@example.com","uniqueKey":"customer.oneOf.0.email","typeLabel":"string\u003cemail>"},"phone":{"type":"string","example":"9801234567","uniqueKey":"customer.oneOf.0.phone","typeLabel":"string"},"address":{"oneOf":[{"type":"object","description":"Customer address. When provided, `line1` and `city` are required and the rest are optional. Pre-fills the shipping-address form on the hosted page, and is returned as `customer_address` in webhook event payloads.","required":["line1","city"],"properties":{"line1":{"type":"string","maxLength":200,"example":"Thamel Road","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.line1","typeLabel":"string"},"city":{"type":"string","maxLength":100,"example":"Kathmandu","isRequired":true,"uniqueKey":"customer.oneOf.0.address.oneOf.0.city","typeLabel":"string"},"line2":{"oneOf":[{"type":"string","maxLength":200,"example":"Apt 4B","uniqueKey":"customer.oneOf.0.address.oneOf.0.line2.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":200,"example":"Apt 4B","uniqueKey":"customer.oneOf.0.address.oneOf.0.line2.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address.oneOf.0.line2","typeLabel":"string | null"},"state":{"oneOf":[{"type":"string","maxLength":100,"example":"Bagmati","uniqueKey":"customer.oneOf.0.address.oneOf.0.state.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"example":"Bagmati","uniqueKey":"customer.oneOf.0.address.oneOf.0.state.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address.oneOf.0.state","typeLabel":"string | null"},"postalCode":{"oneOf":[{"type":"string","maxLength":30,"example":"44600","uniqueKey":"customer.oneOf.0.address.oneOf.0.postalCode.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":30,"example":"44600","uniqueKey":"customer.oneOf.0.address.oneOf.0.postalCode.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address.oneOf.0.postalCode","typeLabel":"string | null"},"country":{"oneOf":[{"type":"string","maxLength":100,"example":"Nepal","uniqueKey":"customer.oneOf.0.address.oneOf.0.country.oneOf.0","typeLabel":"string"},{"type":"null","maxLength":100,"example":"Nepal","uniqueKey":"customer.oneOf.0.address.oneOf.0.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address.oneOf.0.country","typeLabel":"string | null"}},"uniqueKey":"customer.oneOf.0.address.oneOf.0","typeLabel":"object"},{"type":"null","description":"Customer address. When provided, `line1` and `city` are required and the rest are optional. Pre-fills the shipping-address form on the hosted page, and is returned as `customer_address` in webhook event payloads.","required":["line1","city"],"properties":{"line1":{"type":"string","maxLength":200,"example":"Thamel Road"},"line2":{"oneOf":[{"type":"string","maxLength":200,"example":"Apt 4B"},{"type":"null","maxLength":200,"example":"Apt 4B"}]},"city":{"type":"string","maxLength":100,"example":"Kathmandu"},"state":{"oneOf":[{"type":"string","maxLength":100,"example":"Bagmati"},{"type":"null","maxLength":100,"example":"Bagmati"}]},"postalCode":{"oneOf":[{"type":"string","maxLength":30,"example":"44600"},{"type":"null","maxLength":30,"example":"44600"}]},"country":{"oneOf":[{"type":"string","maxLength":100,"example":"Nepal"},{"type":"null","maxLength":100,"example":"Nepal"}]}},"uniqueKey":"customer.oneOf.0.address.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer.oneOf.0.address","typeLabel":"object | null"}},"uniqueKey":"customer.oneOf.0","typeLabel":"object"},{"type":"null","description":"Optional customer details pre-filled on the checkout page.","properties":{"name":{"type":"string","example":"Aarav Sharma"},"email":{"type":"string","format":"email","example":"aarav@example.com"},"phone":{"type":"string","example":"9801234567"},"address":{"oneOf":[{"type":"object","description":"Customer address. When provided, `line1` and `city` are required and the rest are optional. Pre-fills the shipping-address form on the hosted page, and is returned as `customer_address` in webhook event payloads.","required":["line1","city"],"properties":{"line1":{"type":"string","maxLength":200,"example":"Thamel Road"},"line2":{"oneOf":[{"type":"string","maxLength":200,"example":"Apt 4B"},{"type":"null","maxLength":200,"example":"Apt 4B"}]},"city":{"type":"string","maxLength":100,"example":"Kathmandu"},"state":{"oneOf":[{"type":"string","maxLength":100,"example":"Bagmati"},{"type":"null","maxLength":100,"example":"Bagmati"}]},"postalCode":{"oneOf":[{"type":"string","maxLength":30,"example":"44600"},{"type":"null","maxLength":30,"example":"44600"}]},"country":{"oneOf":[{"type":"string","maxLength":100,"example":"Nepal"},{"type":"null","maxLength":100,"example":"Nepal"}]}}},{"type":"null","description":"Customer address. When provided, `line1` and `city` are required and the rest are optional. Pre-fills the shipping-address form on the hosted page, and is returned as `customer_address` in webhook event payloads.","required":["line1","city"],"properties":{"line1":{"type":"string","maxLength":200,"example":"Thamel Road"},"line2":{"oneOf":[{"type":"string","maxLength":200,"example":"Apt 4B"},{"type":"null","maxLength":200,"example":"Apt 4B"}]},"city":{"type":"string","maxLength":100,"example":"Kathmandu"},"state":{"oneOf":[{"type":"string","maxLength":100,"example":"Bagmati"},{"type":"null","maxLength":100,"example":"Bagmati"}]},"postalCode":{"oneOf":[{"type":"string","maxLength":30,"example":"44600"},{"type":"null","maxLength":30,"example":"44600"}]},"country":{"oneOf":[{"type":"string","maxLength":100,"example":"Nepal"},{"type":"null","maxLength":100,"example":"Nepal"}]}}}]}},"uniqueKey":"customer.oneOf.1","typeLabel":"null"}],"uniqueKey":"customer","typeLabel":"object | null"},"collectAddress":{"type":"boolean","default":false,"description":"When `true`, the hosted checkout page asks the customer for a shipping address (street and city required) before payment. The collected address is included as `customer_address` in webhook event payloads - `null` otherwise.","uniqueKey":"collectAddress","typeLabel":"boolean"},"buyerPolicy":{"oneOf":[{"type":"object","description":"Which buyer details the hosted page asks for, for this session only. Omitted keys use your project's defaults (dashboard Settings > Checkout). By default the customer must leave a mobile number or an email, and the name is optional. A field set to `off` is not asked for; a value you send in `customer` is still used.","properties":{"fields":{"type":"object","properties":{"name":{"type":"string","enum":["required","optional","off"],"uniqueKey":"buyerPolicy.oneOf.0.fields.name","typeLabel":"enum\u003cstring>"},"email":{"type":"string","enum":["required","optional","off"],"uniqueKey":"buyerPolicy.oneOf.0.fields.email","typeLabel":"enum\u003cstring>"},"phone":{"type":"string","enum":["required","optional","off"],"uniqueKey":"buyerPolicy.oneOf.0.fields.phone","typeLabel":"enum\u003cstring>"}},"uniqueKey":"buyerPolicy.oneOf.0.fields","typeLabel":"object"},"contactRequirement":{"type":"string","enum":["email_or_phone","none"],"description":"`email_or_phone` (default): the customer must leave a mobile number or an email. `none`: nothing is required unless a field says so.","uniqueKey":"buyerPolicy.oneOf.0.contactRequirement","typeLabel":"enum\u003cstring>"}},"uniqueKey":"buyerPolicy.oneOf.0","typeLabel":"object"},{"type":"null","description":"Which buyer details the hosted page asks for, for this session only. Omitted keys use your project's defaults (dashboard Settings > Checkout). By default the customer must leave a mobile number or an email, and the name is optional. A field set to `off` is not asked for; a value you send in `customer` is still used.","properties":{"fields":{"type":"object","properties":{"name":{"type":"string","enum":["required","optional","off"]},"email":{"type":"string","enum":["required","optional","off"]},"phone":{"type":"string","enum":["required","optional","off"]}}},"contactRequirement":{"type":"string","enum":["email_or_phone","none"],"description":"`email_or_phone` (default): the customer must leave a mobile number or an email. `none`: nothing is required unless a field says so."}},"uniqueKey":"buyerPolicy.oneOf.1","typeLabel":"null"}],"uniqueKey":"buyerPolicy","typeLabel":"object | null"},"customerLocks":{"oneOf":[{"type":"array","items":{"type":"string","enum":["name","email","phone"],"uniqueKey":"customerLocks.oneOf.0.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Contacts you already know for this customer, sent in `customer`, that the hosted page shows read-only and the customer cannot change. Each listed field must have a usable value (a Nepali mobile number for `phone`, a valid address for `email`).","uniqueKey":"customerLocks.oneOf.0","typeLabel":"enum\u003cstring>[]"},{"type":"null","items":{"type":"string","enum":["name","email","phone"]},"description":"Contacts you already know for this customer, sent in `customer`, that the hosted page shows read-only and the customer cannot change. Each listed field must have a usable value (a Nepali mobile number for `phone`, a valid address for `email`).","uniqueKey":"customerLocks.oneOf.1","typeLabel":"null"}],"uniqueKey":"customerLocks","typeLabel":"enum\u003cstring>[] | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"amount":10000,"returnUrl":"https://yourapp.com/checkout/complete","currency":"NPR","cancelUrl":"https://yourapp.com/checkout/cancelled","embedOrigin":"https://yourshop.com","flow":"hosted","description":"Order #1001","metadata":{"order_id":"order_123","customer_id":"cust_456"},"customer":{"name":"Aarav Sharma","email":"aarav@example.com","phone":"9801234567","address":{"line1":"Thamel Road","city":"Kathmandu","line2":"Apt 4B","state":"Bagmati","postalCode":"44600","country":"Nepal"}},"collectAddress":false,"buyerPolicy":{"fields":{}},"customerLocks":[]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a913c0ca-8eb1-4f03-b9ff-e2da489aa551":{"description":"Checkout session created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"cs_01j9x2k3m4n5p6q7r8s9t0u1v2","uniqueKey":"id","typeLabel":"string"},"livemode":{"type":"boolean","description":"`true` when created with a live key, `false` for sandbox.","uniqueKey":"livemode","typeLabel":"boolean"},"checkout_url":{"type":"string","format":"uri","example":"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2","description":"Redirect your customer to this URL to complete payment.","uniqueKey":"checkout_url","typeLabel":"string\u003curi>"},"flow":{"type":"string","enum":["hosted","redirect"],"description":"Echoes the requested `flow`. Defaults to `hosted` when omitted on creation.","uniqueKey":"flow","typeLabel":"enum\u003cstring>"},"provider":{"oneOf":[{"type":"string","enum":["esewa","khalti","fonepay","card"],"description":"Pre-selected provider, or `null` if the customer will pick on the hosted page. `card` is a card test payment (test mode only; cards are not available in live mode).","uniqueKey":"provider.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["esewa","khalti","fonepay","card"],"description":"Pre-selected provider, or `null` if the customer will pick on the hosted page. `card` is a card test payment (test mode only; cards are not available in live mode).","uniqueKey":"provider.oneOf.1","typeLabel":"null"}],"uniqueKey":"provider","typeLabel":"enum\u003cstring> | null"},"expires_at":{"type":"string","format":"date-time","uniqueKey":"expires_at","typeLabel":"string\u003cdate-time>"},"buyer_policy":{"type":"object","description":"Returned when the session is created: the buyer details the hosted page will ask for, resolved from your project defaults and this request's `buyerPolicy`, and the contacts locked by `customerLocks`.","properties":{"fields":{"type":"object","properties":{"name":{"type":"string","enum":["required","optional","off"],"uniqueKey":"buyer_policy.fields.name","typeLabel":"enum\u003cstring>"},"email":{"type":"string","enum":["required","optional","off"],"uniqueKey":"buyer_policy.fields.email","typeLabel":"enum\u003cstring>"},"phone":{"type":"string","enum":["required","optional","off"],"uniqueKey":"buyer_policy.fields.phone","typeLabel":"enum\u003cstring>"}},"uniqueKey":"buyer_policy.fields","typeLabel":"object"},"contact_requirement":{"type":"string","enum":["email_or_phone","none"],"uniqueKey":"buyer_policy.contact_requirement","typeLabel":"enum\u003cstring>"},"locks":{"type":"array","items":{"type":"string","enum":["name","email","phone"],"uniqueKey":"buyer_policy.locks.items.[INDEX]","typeLabel":"enum\u003cstring>"},"uniqueKey":"buyer_policy.locks","typeLabel":"enum\u003cstring>[]"}},"uniqueKey":"buyer_policy","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":"cs_01j9x2k3m4n5p6q7r8s9t0u1v2","checkout_url":"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2","flow":"hosted","provider":null,"expires_at":"2026-03-30T14:30:00.000Z"},"examples":{"Example":{"title":"Example","value":{"id":"cs_01j9x2k3m4n5p6q7r8s9t0u1v2","checkout_url":"https://checkout.paybridgenp.com/checkout/cs_01j9x2k3m4n5p6q7r8s9t0u1v2","flow":"hosted","provider":null,"expires_at":"2026-03-30T14:30:00.000Z"}}},"exampleType":"examples"}},"exampleType":"examples"},"0b21579c-baa8-4d98-95b6-36de5933e8a1":{"description":"Validation error.","content":{"application/json":{"schema":{"type":"object","description":"All error responses share a single nested envelope:\n\n```json\n{\n \"error\": {\n \"message\": \"Human-readable explanation.\",\n \"type\": \"authentication_error\",\n \"code\": \"api_key_invalid\",\n \"request_id\": \"req_...\"\n }\n}\n```\n\nThe `type` field gives a broad category useful for SDK error class hierarchies. The `code` field is fine-grained and stable for programmatic branching. `request_id` is the same value as the `X-Request-Id` response header - quote it in support requests so we can find the exact request in logs.\n\nSome error types include extra detail objects (e.g. `error.suspension` on `account_suspended`, `error.pause` on `token_paused`).","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"Human-readable error message - safe to surface to a developer, may include the action they need to take.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["authentication_error","account_error","permission_error","invalid_request_error","idempotency_error","rate_limit_error","api_error"],"description":"Broad category used by SDKs to instantiate a typed exception (e.g. `AuthenticationError`, `InvalidRequestError`).","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Specific, stable identifier for programmatic handling. Common values:\n\n- `api_key_missing` - Authorization header absent or empty (401).\n- `api_key_invalid` - key not recognised (401).\n- `api_key_revoked` - key was explicitly revoked (401).\n- `api_key_expired` - key passed its expiration timestamp (401).\n- `api_key_must_be_secret` - endpoint requires `sk_...`; a publishable `pk_...` was sent (403).\n- `account_suspended` - merchant account is suspended (403); see `error.suspension`.\n- `token_paused` - MCP token paused (423); see `error.pause`.\n- `forbidden` - permission check failed (403).\n- `not_found` - resource not found (404).\n- `idempotency_conflict` - concurrent request with same Idempotency-Key (409).\n- `idempotency_key_already_used` - the Idempotency-Key was already used for a different request: another endpoint or method, or on invoice endpoints a different body (409).\n- `rate_limited` - rate-limit window exhausted (429).","uniqueKey":"error.code","typeLabel":"string"},"request_id":{"type":"string","description":"Same value as the `X-Request-Id` response header. Quote in support requests for fastest triage.","example":"req_2Je91NlWKuXkdXUJOK9gaHNW","uniqueKey":"error.request_id","typeLabel":"string"},"detail":{"type":"string","description":"Optional provider or validation detail. Refund failures use this for the provider's readable reason.","uniqueKey":"error.detail","typeLabel":"string"},"refund":{"type":"object","properties":{"id":{"type":"string","example":"ref_01j9x2k3m4n5p6q7r8s9t0u1v2","uniqueKey":"error.refund.id","typeLabel":"string"},"livemode":{"type":"boolean","description":"`true` when created with a live key, `false` for sandbox.","uniqueKey":"error.refund.livemode","typeLabel":"boolean"},"paymentId":{"type":"string","example":"pay_01j9x2k3m4n5p6q7r8s9t0u1v2","uniqueKey":"error.refund.paymentId","typeLabel":"string"},"projectId":{"type":"string","uniqueKey":"error.refund.projectId","typeLabel":"string"},"mode":{"type":"string","enum":["sandbox","live"],"uniqueKey":"error.refund.mode","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","description":"Refunded amount in paisa.","example":10000,"uniqueKey":"error.refund.amount","typeLabel":"integer"},"currency":{"type":"string","example":"NPR","uniqueKey":"error.refund.currency","typeLabel":"string"},"reason":{"type":"string","enum":["customer_request","duplicate","fraudulent","other"],"uniqueKey":"error.refund.reason","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["processing","succeeded","failed","requires_action"],"description":"`succeeded` - refund processed. `requires_action` - eSewa: must be processed manually via merchant portal. `failed` - provider rejected the refund.","uniqueKey":"error.refund.status","typeLabel":"enum\u003cstring>"},"providerRefundId":{"oneOf":[{"type":"string","description":"Provider's refund reference (Khalti only).","uniqueKey":"error.refund.providerRefundId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider's refund reference (Khalti only).","uniqueKey":"error.refund.providerRefundId.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.providerRefundId","typeLabel":"string | null"},"failureReason":{"oneOf":[{"type":"string","description":"Set when status is `failed` or `requires_action`.","uniqueKey":"error.refund.failureReason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set when status is `failed` or `requires_action`.","uniqueKey":"error.refund.failureReason.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.failureReason","typeLabel":"string | null"},"notes":{"oneOf":[{"type":"string","uniqueKey":"error.refund.notes.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.refund.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.notes","typeLabel":"string | null"},"mobileNumber":{"oneOf":[{"type":"string","uniqueKey":"error.refund.mobileNumber.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.refund.mobileNumber.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.mobileNumber","typeLabel":"string | null"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"error.refund.createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","format":"date-time","uniqueKey":"error.refund.updatedAt","typeLabel":"string\u003cdate-time>"}},"description":"Optional refund record. Present when a refund failed definitively or is held because the provider outcome is uncertain.","uniqueKey":"error.refund","typeLabel":"object"},"suspension":{"type":"object","description":"Present only when `code === 'account_suspended'`.","properties":{"suspended_at":{"type":"string","format":"date-time","uniqueKey":"error.suspension.suspended_at","typeLabel":"string\u003cdate-time>"},"reason":{"oneOf":[{"type":"string","uniqueKey":"error.suspension.reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.suspension.reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.suspension.reason","typeLabel":"string | null"}},"uniqueKey":"error.suspension","typeLabel":"object"},"pause":{"type":"object","description":"Present only when `code === 'token_paused'`.","properties":{"paused_at":{"type":"string","format":"date-time","uniqueKey":"error.pause.paused_at","typeLabel":"string\u003cdate-time>"},"reason":{"oneOf":[{"type":"string","uniqueKey":"error.pause.reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.pause.reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.pause.reason","typeLabel":"string | null"}},"uniqueKey":"error.pause","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"authentication_error","code":"\u003cstring>","request_id":"req_2Je91NlWKuXkdXUJOK9gaHNW","detail":"\u003cstring>","refund":{"id":"ref_01j9x2k3m4n5p6q7r8s9t0u1v2","livemode":true,"paymentId":"pay_01j9x2k3m4n5p6q7r8s9t0u1v2","projectId":"\u003cstring>","mode":"sandbox","amount":10000,"currency":"NPR","reason":"customer_request","status":"processing","providerRefundId":"\u003cstring>","failureReason":"\u003cstring>","notes":"\u003cstring>","mobileNumber":"\u003cstring>","createdAt":"2023-11-07T05:31:56Z","updatedAt":"2023-11-07T05:31:56Z"},"suspension":{"suspended_at":"2023-11-07T05:31:56Z","reason":"\u003cstring>"},"pause":{"paused_at":"2023-11-07T05:31:56Z","reason":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"837183d7-476b-43de-b1ea-2436aeba2113":{"description":"Invalid or missing API key.","content":{"application/json":{"schema":{"type":"object","description":"All error responses share a single nested envelope:\n\n```json\n{\n \"error\": {\n \"message\": \"Human-readable explanation.\",\n \"type\": \"authentication_error\",\n \"code\": \"api_key_invalid\",\n \"request_id\": \"req_...\"\n }\n}\n```\n\nThe `type` field gives a broad category useful for SDK error class hierarchies. The `code` field is fine-grained and stable for programmatic branching. `request_id` is the same value as the `X-Request-Id` response header - quote it in support requests so we can find the exact request in logs.\n\nSome error types include extra detail objects (e.g. `error.suspension` on `account_suspended`, `error.pause` on `token_paused`).","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"Human-readable error message - safe to surface to a developer, may include the action they need to take.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","enum":["authentication_error","account_error","permission_error","invalid_request_error","idempotency_error","rate_limit_error","api_error"],"description":"Broad category used by SDKs to instantiate a typed exception (e.g. `AuthenticationError`, `InvalidRequestError`).","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Specific, stable identifier for programmatic handling. Common values:\n\n- `api_key_missing` - Authorization header absent or empty (401).\n- `api_key_invalid` - key not recognised (401).\n- `api_key_revoked` - key was explicitly revoked (401).\n- `api_key_expired` - key passed its expiration timestamp (401).\n- `api_key_must_be_secret` - endpoint requires `sk_...`; a publishable `pk_...` was sent (403).\n- `account_suspended` - merchant account is suspended (403); see `error.suspension`.\n- `token_paused` - MCP token paused (423); see `error.pause`.\n- `forbidden` - permission check failed (403).\n- `not_found` - resource not found (404).\n- `idempotency_conflict` - concurrent request with same Idempotency-Key (409).\n- `idempotency_key_already_used` - the Idempotency-Key was already used for a different request: another endpoint or method, or on invoice endpoints a different body (409).\n- `rate_limited` - rate-limit window exhausted (429).","uniqueKey":"error.code","typeLabel":"string"},"request_id":{"type":"string","description":"Same value as the `X-Request-Id` response header. Quote in support requests for fastest triage.","example":"req_2Je91NlWKuXkdXUJOK9gaHNW","uniqueKey":"error.request_id","typeLabel":"string"},"detail":{"type":"string","description":"Optional provider or validation detail. Refund failures use this for the provider's readable reason.","uniqueKey":"error.detail","typeLabel":"string"},"refund":{"type":"object","properties":{"id":{"type":"string","example":"ref_01j9x2k3m4n5p6q7r8s9t0u1v2","uniqueKey":"error.refund.id","typeLabel":"string"},"livemode":{"type":"boolean","description":"`true` when created with a live key, `false` for sandbox.","uniqueKey":"error.refund.livemode","typeLabel":"boolean"},"paymentId":{"type":"string","example":"pay_01j9x2k3m4n5p6q7r8s9t0u1v2","uniqueKey":"error.refund.paymentId","typeLabel":"string"},"projectId":{"type":"string","uniqueKey":"error.refund.projectId","typeLabel":"string"},"mode":{"type":"string","enum":["sandbox","live"],"uniqueKey":"error.refund.mode","typeLabel":"enum\u003cstring>"},"amount":{"type":"integer","description":"Refunded amount in paisa.","example":10000,"uniqueKey":"error.refund.amount","typeLabel":"integer"},"currency":{"type":"string","example":"NPR","uniqueKey":"error.refund.currency","typeLabel":"string"},"reason":{"type":"string","enum":["customer_request","duplicate","fraudulent","other"],"uniqueKey":"error.refund.reason","typeLabel":"enum\u003cstring>"},"status":{"type":"string","enum":["processing","succeeded","failed","requires_action"],"description":"`succeeded` - refund processed. `requires_action` - eSewa: must be processed manually via merchant portal. `failed` - provider rejected the refund.","uniqueKey":"error.refund.status","typeLabel":"enum\u003cstring>"},"providerRefundId":{"oneOf":[{"type":"string","description":"Provider's refund reference (Khalti only).","uniqueKey":"error.refund.providerRefundId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider's refund reference (Khalti only).","uniqueKey":"error.refund.providerRefundId.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.providerRefundId","typeLabel":"string | null"},"failureReason":{"oneOf":[{"type":"string","description":"Set when status is `failed` or `requires_action`.","uniqueKey":"error.refund.failureReason.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set when status is `failed` or `requires_action`.","uniqueKey":"error.refund.failureReason.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.failureReason","typeLabel":"string | null"},"notes":{"oneOf":[{"type":"string","uniqueKey":"error.refund.notes.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.refund.notes.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.notes","typeLabel":"string | null"},"mobileNumber":{"oneOf":[{"type":"string","uniqueKey":"error.refund.mobileNumber.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.refund.mobileNumber.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.refund.mobileNumber","typeLabel":"string | null"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"error.refund.createdAt","typeLabel":"string\u003cdate-time>"},"updatedAt":{"type":"string","format":"date-time","uniqueKey":"error.refund.updatedAt","typeLabel":"string\u003cdate-time>"}},"description":"Optional refund record. Present when a refund failed definitively or is held because the provider outcome is uncertain.","uniqueKey":"error.refund","typeLabel":"object"},"suspension":{"type":"object","description":"Present only when `code === 'account_suspended'`.","properties":{"suspended_at":{"type":"string","format":"date-time","uniqueKey":"error.suspension.suspended_at","typeLabel":"string\u003cdate-time>"},"reason":{"oneOf":[{"type":"string","uniqueKey":"error.suspension.reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.suspension.reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.suspension.reason","typeLabel":"string | null"}},"uniqueKey":"error.suspension","typeLabel":"object"},"pause":{"type":"object","description":"Present only when `code === 'token_paused'`.","properties":{"paused_at":{"type":"string","format":"date-time","uniqueKey":"error.pause.paused_at","typeLabel":"string\u003cdate-time>"},"reason":{"oneOf":[{"type":"string","uniqueKey":"error.pause.reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"error.pause.reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.pause.reason","typeLabel":"string | null"}},"uniqueKey":"error.pause","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"authentication_error","code":"\u003cstring>","request_id":"req_2Je91NlWKuXkdXUJOK9gaHNW","detail":"\u003cstring>","refund":{"id":"ref_01j9x2k3m4n5p6q7r8s9t0u1v2","livemode":true,"paymentId":"pay_01j9x2k3m4n5p6q7r8s9t0u1v2","projectId":"\u003cstring>","mode":"sandbox","amount":10000,"currency":"NPR","reason":"customer_request","status":"processing","providerRefundId":"\u003cstring>","failureReason":"\u003cstring>","notes":"\u003cstring>","mobileNumber":"\u003cstring>","createdAt":"2023-11-07T05:31:56Z","updatedAt":"2023-11-07T05:31:56Z"},"suspension":{"suspended_at":"2023-11-07T05:31:56Z","reason":"\u003cstring>"},"pause":{"paused_at":"2023-11-07T05:31:56Z","reason":"\u003cstring>"}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"84af0c48-42cd-49c5-9257-62f69055fcee":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Your PayBridgeNP API key. Obtain one from the dashboard under Settings → API Keys. Prefix: `sk_test_` for testing, `sk_live_` for production.","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"e37f6421-70de-48c7-b9fc-5ced90b42b39":{"url":"https://api.paybridgenp.com","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Your PayBridgeNP API key. Obtain one from the dashboard under Settings → API Keys. Prefix: `sk_test_` for testing, `sk_live_` for production.","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your PayBridgeNP API key. Obtain one from the dashboard under Settings → API Keys. Prefix: `sk_test_` for testing, `sk_live_` for production.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"paybridgenp","siteName":"PayBridgeNP","title":"Create a checkout session - PayBridgeNP","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-30T05:53:34.801Z","originalFileLocation":"api-reference/checkout/create-session.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=\"Creates a new checkout session and returns a checkout_url to redirect your customer to. Use hosted (default) to let the customer choose a provider, or redirect with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment. Idempotency: Pass an Idempotency-Key header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PayBridgeNP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_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/paybridgenp/AAUhk-xvTWUvsSUY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a checkout session - PayBridgeNP\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new checkout session and returns a checkout_url to redirect your customer to. Use hosted (default) to let the customer choose a provider, or redirect with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment. Idempotency: Pass an Idempotency-Key header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PayBridgeNP Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.paybridgenp.com/api-reference/checkout/create-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://paybridgenp.mintlify.site/_mintlify/api/og/v2?division=Checkout\u0026amp;title=Create+a+checkout+session\u0026amp;description=Creates+a+new+checkout+session+and+returns+a+%60checkout_url%60+to+redirect+your+customer+to.%0A%0AUse+%60hosted%60+%28default%29+to+let+the+customer+choose+a+provider%2C+or+%60red\u0026amp;theme=2c4bed335107db3779bd0274\u0026amp;signature=37b56c462f2aabf73c31f932e10a350c01c432657817af9bcdb32c1273c31094\">\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 checkout session - PayBridgeNP\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new checkout session and returns a checkout_url to redirect your customer to. Use hosted (default) to let the customer choose a provider, or redirect with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment. Idempotency: Pass an Idempotency-Key header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://paybridgenp.mintlify.site/_mintlify/api/og/v2?division=Checkout\u0026amp;title=Create+a+checkout+session\u0026amp;description=Creates+a+new+checkout+session+and+returns+a+%60checkout_url%60+to+redirect+your+customer+to.%0A%0AUse+%60hosted%60+%28default%29+to+let+the+customer+choose+a+provider%2C+or+%60red\u0026amp;theme=2c4bed335107db3779bd0274\u0026amp;signature=37b56c462f2aabf73c31f932e10a350c01c432657817af9bcdb32c1273c31094\">\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/paybridgenp/AAUhk-xvTWUvsSUY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PayBridgeNP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1f5ff7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.paybridgenp.com/api-reference/checkout/create-session\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/checkout/create-session.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://paybridgenp.com/#organization\",\"name\":\"PayBridgeNP\",\"url\":\"https://paybridgenp.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.paybridgenp.com/logo/light.svg\"},\"sameAs\":[\"https://github.com/paybridgenp\",\"https://linkedin.com/company/paybridgenp\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.paybridgenp.com#website\",\"name\":\"PayBridgeNP\",\"url\":\"https://docs.paybridgenp.com\",\"publisher\":{\"@id\":\"https://paybridgenp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session#webpage\",\"url\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session\",\"name\":\"Create a checkout session\",\"description\":\"Creates a new checkout session and returns a checkout_url to redirect your customer to. Use hosted (default) to let the customer choose a provider, or redirect with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment. Idempotency: Pass an Idempotency-Key header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.\",\"dateModified\":\"2026-08-30T05:53:34.801Z\",\"isPartOf\":{\"@id\":\"https://docs.paybridgenp.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PayBridgeNP\",\"item\":\"https://docs.paybridgenp.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a checkout session\",\"item\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session#apireference\",\"headline\":\"Create a checkout session\",\"name\":\"Create a checkout session\",\"description\":\"Creates a new checkout session and returns a checkout_url to redirect your customer to. Use hosted (default) to let the customer choose a provider, or redirect with a provider to skip the picker. The browser return is navigation only; verify payment status, amount, and currency on your server before fulfillment. Idempotency: Pass an Idempotency-Key header to safely retry failed requests without creating duplicate sessions. The key is scoped to your project and expires after 24 hours.\",\"url\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session\",\"mainEntityOfPage\":{\"@id\":\"https://docs.paybridgenp.com/api-reference/checkout/create-session#webpage\"},\"dateModified\":\"2026-08-30T05:53:34.801Z\",\"publisher\":{\"@id\":\"https://paybridgenp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.paybridgenp.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PayBridgeNP\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"PayBridgeNP\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/checkout/create-session.md","siteName":"PayBridgeNP","nav":{"global":null,"tabs":[{"tab":"Payments","icon":"credit-card","pages":[{"title":"Payments","href":"/home"}]},{"tab":"API Reference","icon":"square-terminal","groups":[{"group":"Overview","pages":[{"title":"API overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Errors","description":"HTTP status codes, error envelope shape, and codes returned by the PayBridgeNP API.","href":"/api-reference/errors"}]},{"group":"Checkout","pages":[{"openapi":"POST /v1/checkout","title":"Create a checkout session","href":"/api-reference/checkout/create-session"},{"openapi":"GET /v1/sessions","title":"List checkout sessions","description":"Returns checkout sessions for the authenticated project, newest first. Read-only - sessions are created via `POST /v1/checkout`. Requires the `sessions:read` scope.","href":"/api-reference/checkout/list-sessions"},{"openapi":"GET /v1/sessions/{id}","title":"Get a checkout session","href":"/api-reference/checkout/get-session"},{"openapi":"POST /v1/checkout/{id}/expire","title":"Expire a checkout session","href":"/api-reference/checkout/expire-session"}]},{"group":"Payment Links","pages":[{"openapi":"POST /v1/payment-links","title":"Create a payment link","href":"/api-reference/payment-links/create-payment-link"},{"openapi":"GET /v1/payment-links","title":"List payment links","href":"/api-reference/payment-links/list-payment-links"},{"openapi":"GET /v1/payment-links/{id}","title":"Get a payment link","href":"/api-reference/payment-links/get-payment-link"},{"openapi":"PATCH /v1/payment-links/{id}","title":"Update a payment link","href":"/api-reference/payment-links/update-payment-link"},{"openapi":"POST /v1/payment-links/{id}/cancel","title":"Cancel a payment link","href":"/api-reference/payment-links/cancel-payment-link"},{"openapi":"DELETE /v1/payment-links/{id}","title":"Delete a payment link","href":"/api-reference/payment-links/delete-payment-link"}]},{"group":"One-time Invoices","pages":[{"sidebarTitle":"Create a draft","openapi":"POST /v1/invoices","title":"Create a one-time invoice draft","href":"/api-reference/invoices/create-invoice"},{"openapi":"GET /v1/invoices","title":"List one-time invoices","href":"/api-reference/invoices/list-invoices"},{"openapi":"GET /v1/invoices/{id}","title":"Get a one-time invoice","href":"/api-reference/invoices/get-invoice"},{"sidebarTitle":"Update a draft","openapi":"PATCH /v1/invoices/{id}","title":"Update a one-time invoice draft","href":"/api-reference/invoices/update-invoice"},{"sidebarTitle":"Discard a draft","openapi":"POST /v1/invoices/{id}/discard","title":"Discard a one-time invoice draft","href":"/api-reference/invoices/discard-invoice"},{"sidebarTitle":"Finalise an invoice","openapi":"POST /v1/invoices/{id}/finalize","title":"Finalise a one-time invoice","href":"/api-reference/invoices/finalize-invoice"},{"sidebarTitle":"Send by email","openapi":"POST /v1/invoices/{id}/send","title":"Send a one-time invoice by email","href":"/api-reference/invoices/send-invoice"},{"sidebarTitle":"Void an invoice","openapi":"POST /v1/invoices/{id}/void","title":"Void an unpaid issued invoice","href":"/api-reference/invoices/void-invoice"},{"sidebarTitle":"Reduce the balance","openapi":"POST /v1/invoices/{id}/adjustments","title":"Reduce an invoice's remaining balance","href":"/api-reference/invoices/adjust-invoice"},{"sidebarTitle":"Create a checkout","openapi":"POST /v1/invoices/{id}/checkout","title":"Create or reuse an invoice checkout","href":"/api-reference/invoices/create-checkout"},{"sidebarTitle":"Correct an invoice","openapi":"POST /v1/invoices/{id}/correct","title":"Correct an unpaid issued invoice","href":"/api-reference/invoices/correct-invoice"},{"sidebarTitle":"Rotate the payment link","openapi":"POST /v1/invoices/{id}/link/rotate","title":"Rotate an invoice payment link","href":"/api-reference/invoices/rotate-link"},{"sidebarTitle":"List activity","openapi":"GET /v1/invoices/{id}/activity","title":"List one-time invoice activity","href":"/api-reference/invoices/list-activity"},{"sidebarTitle":"Download the PDF","openapi":"GET /v1/invoices/{id}/pdf","title":"Download a one-time invoice PDF","href":"/api-reference/invoices/download-pdf"}]},{"group":"Payments","pages":[{"openapi":"GET /v1/payments","title":"List payments","href":"/api-reference/payments/list-payments"},{"openapi":"GET /v1/payments/{id}","title":"Get a payment","href":"/api-reference/payments/get-payment"}]},{"group":"Direct QR","pages":[{"sidebarTitle":"Create a Fonepay QR","openapi":"POST /v1/qr/fonepay","title":"Create a Fonepay Direct-QR session","href":"/api-reference/qr/create-fonepay-qr"},{"sidebarTitle":"Refresh a Fonepay QR","openapi":"POST /v1/qr/{id}/refresh","title":"Refresh a Fonepay Direct-QR (same session)","href":"/api-reference/qr/refresh-fonepay-qr"}]},{"group":"Refunds","pages":[{"openapi":"POST /v1/refunds","title":"Create a refund","href":"/api-reference/refunds/create-refund"},{"openapi":"GET /v1/refunds","title":"List refunds","href":"/api-reference/refunds/list-refunds"},{"openapi":"GET /v1/refunds/{id}","title":"Get a refund","href":"/api-reference/refunds/get-refund"}]},{"group":"Webhooks","pages":[{"sidebarTitle":"Register an endpoint","openapi":"POST /v1/webhooks","title":"Register a webhook endpoint","href":"/api-reference/webhooks/register-endpoint"},{"openapi":"GET /v1/webhooks","title":"List webhook endpoints","href":"/api-reference/webhooks/list-endpoints"},{"sidebarTitle":"Update an endpoint","openapi":"PATCH /v1/webhooks/{id}","title":"Update a webhook endpoint","href":"/api-reference/webhooks/update-endpoint"},{"sidebarTitle":"Delete an endpoint","openapi":"DELETE /v1/webhooks/{id}","title":"Delete a webhook endpoint","href":"/api-reference/webhooks/delete-endpoint"},{"openapi":"GET /v1/webhooks/{id}/deliveries","title":"List delivery attempts","href":"/api-reference/webhooks/list-deliveries"}]},{"group":"Account","pages":[{"openapi":"GET /v1/account","title":"Get account","href":"/api-reference/account/get-account"}]},{"group":"Billing","pages":[{"group":"Plans","pages":[{"openapi":"POST /v1/billing/plans","title":"Create a billing plan","href":"/api-reference/billing/plans/create-plan"},{"openapi":"GET /v1/billing/plans","title":"List billing plans","href":"/api-reference/billing/plans/list-plans"},{"openapi":"GET /v1/billing/plans/{id}","title":"Get a billing plan","href":"/api-reference/billing/plans/get-plan"},{"openapi":"PATCH /v1/billing/plans/{id}","title":"Update a billing plan","href":"/api-reference/billing/plans/update-plan"}]},{"group":"Customers","pages":[{"openapi":"POST /v1/billing/customers","title":"Create a customer","href":"/api-reference/billing/customers/create-customer"},{"openapi":"GET /v1/billing/customers","title":"List customers","href":"/api-reference/billing/customers/list-customers"},{"openapi":"GET /v1/billing/customers/{id}","title":"Get a customer","href":"/api-reference/billing/customers/get-customer"},{"openapi":"PATCH /v1/billing/customers/{id}","title":"Update a customer","href":"/api-reference/billing/customers/update-customer"},{"openapi":"DELETE /v1/billing/customers/{id}","title":"Delete a customer","href":"/api-reference/billing/customers/delete-customer"},{"sidebarTitle":"Adjust credit balance","openapi":"POST /v1/billing/customers/{id}/credit","title":"Adjust a customer's credit balance","href":"/api-reference/billing/customers/add-credit"}]},{"group":"Subscriptions","pages":[{"openapi":"POST /v1/billing/subscriptions","title":"Create a subscription","href":"/api-reference/billing/subscriptions/create-subscription"},{"openapi":"GET /v1/billing/subscriptions","title":"List subscriptions","href":"/api-reference/billing/subscriptions/list-subscriptions"},{"openapi":"GET /v1/billing/subscriptions/{id}","title":"Get a subscription","href":"/api-reference/billing/subscriptions/get-subscription"},{"openapi":"POST /v1/billing/subscriptions/{id}/pause","title":"Pause a subscription","href":"/api-reference/billing/subscriptions/pause-subscription"},{"openapi":"POST /v1/billing/subscriptions/{id}/resume","title":"Resume a subscription","href":"/api-reference/billing/subscriptions/resume-subscription"},{"openapi":"POST /v1/billing/subscriptions/{id}/cancel","title":"Cancel a subscription","href":"/api-reference/billing/subscriptions/cancel-subscription"},{"openapi":"POST /v1/billing/subscriptions/{id}/change-plan","title":"Change subscription plan","href":"/api-reference/billing/subscriptions/change-plan"},{"sidebarTitle":"Preview proration","openapi":"GET /v1/billing/subscriptions/{id}/preview-proration","title":"Preview proration for a plan change","href":"/api-reference/billing/subscriptions/preview-proration"},{"openapi":"POST /v1/billing/subscriptions/{id}/end-trial","title":"End a trial immediately","href":"/api-reference/billing/subscriptions/end-trial"},{"openapi":"POST /v1/billing/subscriptions/{id}/extend-trial","title":"Extend a trial","href":"/api-reference/billing/subscriptions/extend-trial"},{"sidebarTitle":"Apply a coupon","openapi":"POST /v1/billing/subscriptions/{id}/apply-coupon","title":"Apply a coupon to a subscription","href":"/api-reference/billing/subscriptions/apply-coupon"},{"sidebarTitle":"Remove the discount","openapi":"DELETE /v1/billing/subscriptions/{id}/discount","title":"Remove a subscription's discount","href":"/api-reference/billing/subscriptions/remove-discount"},{"sidebarTitle":"Update quantity","openapi":"PATCH /v1/billing/subscriptions/{id}/quantity","title":"Update subscription quantity","href":"/api-reference/billing/subscriptions/update-quantity"},{"openapi":"POST /v1/billing/subscriptions/{id}/usage","title":"Report usage","href":"/api-reference/billing/subscriptions/report-usage"},{"openapi":"GET /v1/billing/subscriptions/{id}/usage","title":"Get usage summary","href":"/api-reference/billing/subscriptions/get-usage-summary"},{"openapi":"GET /v1/billing/subscriptions/{id}/usage/records","title":"List usage records","href":"/api-reference/billing/subscriptions/list-usage-records"},{"sidebarTitle":"List invoice items","openapi":"GET /v1/billing/subscriptions/{id}/invoice-items","title":"List pending invoice items","href":"/api-reference/billing/subscriptions/list-invoice-items"},{"sidebarTitle":"Add an invoice item","openapi":"POST /v1/billing/subscriptions/{id}/invoice-items","title":"Add a pending invoice item","href":"/api-reference/billing/subscriptions/create-invoice-item"},{"sidebarTitle":"Delete an invoice item","openapi":"DELETE /v1/billing/subscriptions/{id}/invoice-items/{itemId}","title":"Delete a pending invoice item","href":"/api-reference/billing/subscriptions/delete-invoice-item"}]},{"group":"Coupons","pages":[{"openapi":"POST /v1/billing/coupons","title":"Create a coupon","href":"/api-reference/billing/coupons/create-coupon"},{"openapi":"GET /v1/billing/coupons","title":"List coupons","href":"/api-reference/billing/coupons/list-coupons"},{"openapi":"GET /v1/billing/coupons/{id}","title":"Get a coupon","href":"/api-reference/billing/coupons/get-coupon"},{"openapi":"PATCH /v1/billing/coupons/{id}","title":"Update a coupon","href":"/api-reference/billing/coupons/update-coupon"},{"openapi":"DELETE /v1/billing/coupons/{id}","title":"Deactivate a coupon","href":"/api-reference/billing/coupons/deactivate-coupon"}]},{"group":"Promotion codes","pages":[{"openapi":"POST /v1/billing/promotion-codes","title":"Create a promotion code","href":"/api-reference/billing/promotion-codes/create-promotion-code"},{"openapi":"GET /v1/billing/promotion-codes","title":"List promotion codes","href":"/api-reference/billing/promotion-codes/list-promotion-codes"},{"openapi":"GET /v1/billing/promotion-codes/{id}","title":"Get a promotion code","href":"/api-reference/billing/promotion-codes/get-promotion-code"},{"openapi":"POST /v1/billing/promotion-codes/validate","title":"Validate a promotion code","href":"/api-reference/billing/promotion-codes/validate-promotion-code"},{"openapi":"PATCH /v1/billing/promotion-codes/{id}","title":"Deactivate a promotion code","href":"/api-reference/billing/promotion-codes/deactivate-promotion-code"}]},{"group":"Invoices","pages":[{"openapi":"GET /v1/billing/invoices","title":"List invoices","href":"/api-reference/billing/invoices/list-invoices"},{"openapi":"GET /v1/billing/invoices/{id}","title":"Get an invoice","href":"/api-reference/billing/invoices/get-invoice"},{"sidebarTitle":"Pay with Direct QR","openapi":"POST /v1/billing/invoices/{id}/qr","title":"Pay an invoice with a Fonepay Direct-QR","href":"/api-reference/billing/invoices/create-qr"},{"sidebarTitle":"Send a reminder","openapi":"POST /v1/invoices/{id}/remind","title":"Send a one-time invoice reminder","href":"/api-reference/billing/invoices/remind-one-time-invoice"}]},{"group":"Dunning","pages":[{"openapi":"POST /v1/billing/dunning/policies","title":"Create a dunning policy","href":"/api-reference/billing/dunning/create-policy"},{"openapi":"GET /v1/billing/dunning/policies","title":"List dunning policies","href":"/api-reference/billing/dunning/list-policies"},{"openapi":"GET /v1/billing/dunning/policies/{id}","title":"Get a dunning policy","href":"/api-reference/billing/dunning/get-policy"},{"openapi":"PATCH /v1/billing/dunning/policies/{id}","title":"Update a dunning policy","href":"/api-reference/billing/dunning/update-policy"},{"sidebarTitle":"Assign to a subscription","openapi":"POST /v1/billing/dunning/subscriptions/{id}/policy","title":"Assign a dunning policy to a subscription","href":"/api-reference/billing/dunning/assign-policy"},{"sidebarTitle":"Get invoice dunning","openapi":"GET /v1/billing/dunning/invoices/{id}/dunning","title":"Get invoice dunning status","href":"/api-reference/billing/dunning/get-invoice-dunning"},{"openapi":"POST /v1/billing/dunning/invoices/{id}/dunning/stop","title":"Stop dunning","href":"/api-reference/billing/dunning/stop-dunning"},{"openapi":"POST /v1/billing/dunning/invoices/{id}/dunning/retry-now","title":"Retry dunning now","href":"/api-reference/billing/dunning/retry-now"}]},{"group":"Settings","pages":[{"openapi":"GET /v1/billing/settings/tax","title":"Get tax settings","href":"/api-reference/billing/settings/get-tax"},{"openapi":"PATCH /v1/billing/settings/tax","title":"Update tax settings","href":"/api-reference/billing/settings/tax"}]}]},{"group":"Analytics","pages":[{"openapi":"GET /v1/analytics/overview","title":"Analytics overview","href":"/api-reference/analytics/overview"}]},{"group":"Providers","pages":[{"openapi":"GET /v1/providers","title":"List configured providers","href":"/api-reference/providers/list-providers"}]},{"group":"SMS","pages":[{"sidebarTitle":"Send a payment reminder","openapi":"POST /v1/sms/notify-pending-payment","title":"Send a pending-payment SMS reminder","href":"/api-reference/sms/notify-pending-payment"}]}]},{"tab":"Developer Tools","icon":"code","pages":[{"title":"Developer Tools","href":"/sdk/typescript"}]}]},"basePath":"","title":"Create a checkout session - PayBridgeNP","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BgGj2PGS.js","utils-BhNOqRKb.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BAgRNUZo.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CGkb0TPw.js","snippetPresets-ChLkL1a6.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-Ef10Jrbx.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DlVCnjU8.js","shallow-BA55zJxQ.js","getApiPlaygroundDisplay-DR09dKtp.js","CodeSnippet-BZ8J8Kll.js","CodeSnippets-CcguVheG.js","Page-C7x-eUfk.js","getPastedJson-D5UqeqBp.js","icon-DpD0l99C.js","MethodPill-Wg2NXsp_.js","DuplicateIcon-CCSyX8lh.js","createIcon-C4Ukv9HX.js","DynamicMarkdown-RhjEuCHC.js","SectionHeading-DL1MykRq.js","axios-vUo_bRtp.js","Markdown-BwQ4RMdp.js","dist-CiVXVcSh.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-Dic2Jtb2.js"]}