Executes a payment using the SessionId you have from the initiateSession endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.
Here’s a list of possible error codes of this endpoint.
Code
Description
1
Missing or invalid api key
2
InvoiceValue is a required parameter.
3
Suppliers is not valid.
4
wrong supplier code.
5
An error meessage from the bank.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"DashPay API Documentation","colors":{"primary":"#1b75bc","light":"#1b75bc","dark":"#1b75bc"},"favicon":"/favicon.svg","logo":{"light":"https://mintcdn.com/dashu/5r5wSG5t3MSSkm2z/logo/light.svg?fit=max\u0026auto=format\u0026n=5r5wSG5t3MSSkm2z\u0026q=85\u0026s=b09bb49bb6104654f782df69a83c1266","dark":"https://mintcdn.com/dashu/5r5wSG5t3MSSkm2z/logo/dark.svg?fit=max\u0026auto=format\u0026n=5r5wSG5t3MSSkm2z\u0026q=85\u0026s=b7e64bf1d437db6bdc25e5f314b1d82d"},"api":{"playground":{"display":"interactive"},"mdx":{"server":"https://dashu.sa/api/external"}},"navbar":{"links":[{"label":"Support","href":"mailto:dashpay@dashu.sa"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashu.sa/login"}},"footer":{"socials":{"x":"https://x.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://www.linkedin.com/company/mintsearch"}},"navigation":{"global":{"anchors":[{"anchor":"DashPay Website","href":"https://dashu.sa","icon":"earth-americas"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dashu","hasAudioNarration":false,"actualSubdomain":"dashu","customDomains":["paydocs.dashu.sa"],"gitSource":{"type":"github","owner":"dashu-sa","repo":"dashpay-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c511a72b99776ad7df25","collectionId":"c901993d-1991-4115-940e-2ba6e061a748","schemaVersion":"v2"},"entitlements":{},"buildId":"6a20c511a72b99776ad7df25:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":8},{"language":"default","tag":"General Endpoints","count":5},{"language":"default","tag":"Embedded Integration","count":2},{"language":"default","tag":"Documentation","count":2},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Redirect Integration","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/executePayment","slug":"/api-reference/endpoint/executePayment","pageMetadata":{"title":"executePayment","description":"Executes a payment using the SessionId you have from the `initiateSession` endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.","api":"POST /executePayment","href":"/api-reference/endpoint/executePayment"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Executes a payment using the SessionId you have from the \", _jsx(_components.code, {\n children: \"initiateSession\"\n }), \" endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{body:`apiKey`,type:`string`,placeholder:`API Key`,required:true,id:`param-api-key`,children:_jsx(_components.p,{children:`The API Key of your account.`})}),`\n`,_jsx(ParamField,{body:`data`,type:`object`,required:true,id:`param-data`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsxs(ResponseField,{name:`SessionId`,type:`string`,id:`param-session-id`,children:[_jsxs(_components.p,{children:[`The SessionId you have from the `,_jsx(_components.code,{children:`initateSession`}),` endpoint.`]}),_jsxs(_components.p,{children:[`Sample: `,_jsx(_components.code,{children:`783851c4-b10f-4e40-bb2c-fcb657975ffb`}),`.`]})]}),_jsxs(ResponseField,{name:`InvoiceValue`,type:`string`,id:`param-invoice-value`,children:[_jsx(_components.p,{children:`The invoice total amount that should be paid by the customer.`}),_jsxs(_components.p,{children:[`Sample: `,_jsx(_components.code,{children:`313.14`}),`.`]})]}),_jsx(ParamField,{body:`Suppliers`,type:`array`,required:true,id:`param-suppliers`,children:_jsx(Expandable,{title:`properties`,defaultOpen:true,children:_jsxs(ResponseField,{name:`SupplierCode`,type:`integer`,required:true,id:`param-supplier-code`,children:[_jsx(_components.p,{children:`Your Supplier Code (you’ll get it after joining DashPay)`}),_jsxs(_components.p,{children:[`Sample: `,_jsx(_components.code,{children:`123`}),`.`]})]})})})]})}),`\n`,_jsx(ParamField,{body:`test`,type:`boolean`,initialValue:true,id:`param-test`,children:_jsxs(_components.p,{children:[`Set this property to `,_jsx(_components.code,{children:`true`}),` to send the request to the development\nenvironment.`]})}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`response-properties`,children:`Response properties`}),`\n`,_jsx(ResponseField,{name:`IsSuccess`,type:`boolean`,required:true,id:`param-is-success`,children:_jsx(_components.p,{children:`The response status.`})}),`\n`,_jsx(ResponseField,{name:`Message`,type:`string`,required:true,id:`param-message`,children:_jsx(_components.p,{children:`The description of the response status.`})}),`\n`,_jsx(ResponseField,{name:`ValidationErrors`,type:`array|null`,required:true,id:`param-validation-errors`,children:_jsx(_components.p,{children:`List of validation errors (if any).`})}),`\n`,_jsx(ResponseField,{name:`Data`,type:`object`,required:true,id:`param-data-1`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsx(ResponseField,{name:`InvoiceId`,type:`integer`,required:true,id:`param-invoice-id`,children:_jsx(_components.p,{children:`A unique integer value of the created invoice.`})}),_jsx(ResponseField,{name:`IsDirectPayment`,type:`boolean`,required:true,id:`param-is-direct-payment`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` or `,_jsx(_components.code,{children:`false`}),` to indicate if this URL for Direct Payment method.`]})}),_jsx(ResponseField,{name:`PaymentURL`,type:`string`,required:true,id:`param-payment-url`,children:_jsx(_components.p,{children:`The URL that you should redirect the customer to OR submit the card\ndetails to process the payment.`})}),_jsx(ResponseField,{name:`CustomerReference`,type:`string`,required:true,id:`param-customer-reference`,children:_jsx(_components.p,{children:`Refers to the order or transaction ID in your system that you have sent in\nthe request earlier.`})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsx(_components.p,{children:`Here’s a list of possible error codes of this endpoint.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.strong,{children:`Code`})}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`Description`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:`Missing or invalid api key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`InvoiceValue`}),` is a required parameter.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Suppliers`}),` is not valid.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{children:`wrong supplier code.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`5`}),_jsx(_components.td,{children:`An error meessage from the bank.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"executePayment","description":"Executes a payment using the SessionId you have from the `initiateSession` endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.","api":"POST /executePayment","href":"/api-reference/endpoint/executePayment"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsx(ParamField,{body:`apiKey`,type:`string`,placeholder:`API Key`,required:true,id:`param-api-key`,children:_jsx(_components.p,{children:`The API Key of your account.`})}),`\n`,_jsx(ParamField,{body:`data`,type:`object`,required:true,id:`param-data`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsxs(ResponseField,{name:`SessionId`,type:`string`,id:`param-session-id`,children:[_jsxs(_components.p,{children:[`The SessionId you have from the `,_jsx(_components.code,{children:`initateSession`}),` endpoint.`]}),_jsxs(_components.p,{children:[`Sample: `,_jsx(_components.code,{children:`783851c4-b10f-4e40-bb2c-fcb657975ffb`}),`.`]})]}),_jsxs(ResponseField,{name:`InvoiceValue`,type:`string`,id:`param-invoice-value`,children:[_jsx(_components.p,{children:`The invoice total amount that should be paid by the customer.`}),_jsxs(_components.p,{children:[`Sample: `,_jsx(_components.code,{children:`313.14`}),`.`]})]}),_jsx(ParamField,{body:`Suppliers`,type:`array`,required:true,id:`param-suppliers`,children:_jsx(Expandable,{title:`properties`,defaultOpen:true,children:_jsxs(ResponseField,{name:`SupplierCode`,type:`integer`,required:true,id:`param-supplier-code`,children:[_jsx(_components.p,{children:`Your Supplier Code (you’ll get it after joining DashPay)`}),_jsxs(_components.p,{children:[`Sample: `,_jsx(_components.code,{children:`123`}),`.`]})]})})})]})}),`\n`,_jsx(ParamField,{body:`test`,type:`boolean`,initialValue:true,id:`param-test`,children:_jsxs(_components.p,{children:[`Set this property to `,_jsx(_components.code,{children:`true`}),` to send the request to the development\nenvironment.`]})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`Success`,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"IsSuccess\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invoice Created Successfully!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ValidationErrors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"InvoiceId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`927972`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"IsDirectPayment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"PaymentURL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://demo.MyFatoorah.com/Ar/KWT/PayInvoice/Checkout?invoiceKey=0106292797237\u0026paymentGatewayId=20\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"CustomerReference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"noshipping-nosupplier\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Error`,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"test\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"Error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SessionId is invalid!\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`response-properties`,children:`Response properties`}),`\n`,_jsx(ResponseField,{name:`IsSuccess`,type:`boolean`,required:true,id:`param-is-success`,children:_jsx(_components.p,{children:`The response status.`})}),`\n`,_jsx(ResponseField,{name:`Message`,type:`string`,required:true,id:`param-message`,children:_jsx(_components.p,{children:`The description of the response status.`})}),`\n`,_jsx(ResponseField,{name:`ValidationErrors`,type:`array|null`,required:true,id:`param-validation-errors`,children:_jsx(_components.p,{children:`List of validation errors (if any).`})}),`\n`,_jsx(ResponseField,{name:`Data`,type:`object`,required:true,id:`param-data-1`,children:_jsxs(Expandable,{title:`properties`,defaultOpen:true,children:[_jsx(ResponseField,{name:`InvoiceId`,type:`integer`,required:true,id:`param-invoice-id`,children:_jsx(_components.p,{children:`A unique integer value of the created invoice.`})}),_jsx(ResponseField,{name:`IsDirectPayment`,type:`boolean`,required:true,id:`param-is-direct-payment`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` or `,_jsx(_components.code,{children:`false`}),` to indicate if this URL for Direct Payment method.`]})}),_jsx(ResponseField,{name:`PaymentURL`,type:`string`,required:true,id:`param-payment-url`,children:_jsx(_components.p,{children:`The URL that you should redirect the customer to OR submit the card\ndetails to process the payment.`})}),_jsx(ResponseField,{name:`CustomerReference`,type:`string`,required:true,id:`param-customer-reference`,children:_jsx(_components.p,{children:`Refers to the order or transaction ID in your system that you have sent in\nthe request earlier.`})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsx(_components.p,{children:`Here’s a list of possible error codes of this endpoint.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.strong,{children:`Code`})}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`Description`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:`Missing or invalid api key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`InvoiceValue`}),` is a required parameter.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Suppliers`}),` is not valid.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{children:`wrong supplier code.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`5`}),_jsx(_components.td,{children:`An error meessage from the bank.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"executePayment","description":"Executes a payment using the SessionId you have from the `initiateSession` endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.","api":"POST /executePayment","href":"/api-reference/endpoint/executePayment"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Query Parameters","slug":"query-parameters","depth":3,"children":[]},{"title":"Response properties","slug":"response-properties","depth":3,"children":[]},{"title":"Error Codes","slug":"error-codes","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"Success","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"IsSuccess\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"Message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invoice Created Successfully!\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"ValidationErrors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"Data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"InvoiceId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">927972\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"IsDirectPayment\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"PaymentURL\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://demo.MyFatoorah.com/Ar/KWT/PayInvoice/Checkout?invoiceKey=0106292797237\u0026#x26;paymentGatewayId=20\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"CustomerReference\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"noshipping-nosupplier\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Error","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"test\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"Name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SessionId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"Error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SessionId is invalid!\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"executePayment","path":"/executePayment","servers":[{"url":"https://dashu.sa/api/external"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"apiKey":[{"type":"string","description":"The API Key of your account.","required":true,"placeholder":"API Key"}],"data":[{"type":"object","properties":{"Suppliers":[{"type":"array","items":[{"type":"object","properties":{}}],"required":true}]},"required":true}],"test":[{"type":"boolean","description":"Set this property to `true` to send the request to the development environment."}]}}],"examples":{"example":{"value":{"apiKey":"\u003cstring>","data":{"Suppliers":[{}]},"test":true}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"IsSuccess":[{"type":"boolean","description":"The response status.","required":true}],"Message":[{"type":"string","description":"The description of the response status.","required":true}],"ValidationErrors":[{"type":"object","properties":{},"description":"List of validation errors (if any).","required":true}],"Data":[{"type":"object","properties":{"InvoiceId":[{"type":"integer","description":"A unique integer value of the created invoice.","required":true}],"IsDirectPayment":[{"type":"boolean","description":"`true` or `false` to indicate if this URL for Direct Payment method.","required":true}],"PaymentURL":[{"type":"string","description":"The URL that you should redirect the customer to OR submit the card details to process the payment.","required":true}],"CustomerReference":[{"type":"string","description":"Refers to the order or transaction ID in your system that you have sent in the request earlier.","required":true}]},"required":true}]}}],"examples":{"example":{"value":{"IsSuccess":true,"Message":"\u003cstring>","ValidationErrors":{},"Data":{"InvoiceId":123,"IsDirectPayment":true,"PaymentURL":"\u003cstring>","CustomerReference":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/dashu/b0c57b70ab27a5a6/.github/format/plugin-php/src/clean.js","/_mintlify/custom/dashu/0ff733e693d8ee3d/.github/format/plugin-php/src/comments.js","/_mintlify/custom/dashu/0f53ad38c7a9ffc2/.github/format/plugin-php/src/index.js","/_mintlify/custom/dashu/c56a6eaa5bd6dbff/.github/format/plugin-php/src/module.js","/_mintlify/custom/dashu/e0ec5d34b617c26c/.github/format/plugin-php/src/needs-parens.js","/_mintlify/custom/dashu/2db4c3f15bbd4af6/.github/format/plugin-php/src/options.js","/_mintlify/custom/dashu/72c8a3867eed0bce/.github/format/plugin-php/src/parser.js","/_mintlify/custom/dashu/b912973af510c005/.github/format/plugin-php/src/pragma.js","/_mintlify/custom/dashu/305805b8b305f752/.github/format/plugin-php/src/printer.js","/_mintlify/custom/dashu/2e1430ec8187c62e/.github/format/plugin-php/src/util.js","/_mintlify/custom/dashu/d68a44dd4e8fdcb5/.github/format/plugin-php/standalone.js"],"subdomain":"dashu","siteName":"DashPay API Documentation","title":"executePayment - DashPay API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T02:43:53.374Z","originalFileLocation":"api-reference/endpoint/executePayment.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=\"Executes a payment using the SessionId you have from the initiateSession endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.\">\u003cmeta data-mint-head name=\"application-name\" content=\"DashPay API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_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/dashu/UThAPjnlgRlGtOHj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"executePayment - DashPay API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Executes a payment using the SessionId you have from the initiateSession endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DashPay API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dashu.mintlify.app/_mintlify/api/og/v2?division=Embedded+Integration\u0026amp;title=executePayment\u0026amp;description=Executes+a+payment+using+the+SessionId+you+have+from+the+%60initiateSession%60+endpoint.+This+endpoint+will+return+a+payment+URL+to+redirect+your+customers+to+the+p\u0026amp;theme=1e9265a35ddb093207085dad\u0026amp;signature=b3868f0de483d62344f2f904934ce4d190d16bb6ba85ad28722f2bb9801cce62\">\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=\"executePayment - DashPay API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Executes a payment using the SessionId you have from the initiateSession endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dashu.mintlify.app/_mintlify/api/og/v2?division=Embedded+Integration\u0026amp;title=executePayment\u0026amp;description=Executes+a+payment+using+the+SessionId+you+have+from+the+%60initiateSession%60+endpoint.+This+endpoint+will+return+a+payment+URL+to+redirect+your+customers+to+the+p\u0026amp;theme=1e9265a35ddb093207085dad\u0026amp;signature=b3868f0de483d62344f2f904934ce4d190d16bb6ba85ad28722f2bb9801cce62\">\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/dashu/UThAPjnlgRlGtOHj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DashPay API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1b75bc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/executePayment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://paydocs.dashu.sa/#organization\",\"name\":\"DashPay API Documentation\",\"url\":\"https://paydocs.dashu.sa\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dashu/5r5wSG5t3MSSkm2z/logo/light.svg?fit=max\u0026auto=format\u0026n=5r5wSG5t3MSSkm2z\u0026q=85\u0026s=b09bb49bb6104654f782df69a83c1266\"}},{\"@type\":\"WebSite\",\"@id\":\"https://paydocs.dashu.sa#website\",\"name\":\"DashPay API Documentation\",\"url\":\"https://paydocs.dashu.sa\",\"publisher\":{\"@id\":\"https://paydocs.dashu.sa/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment#webpage\",\"url\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment\",\"name\":\"executePayment\",\"description\":\"Executes a payment using the SessionId you have from the initiateSession endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.\",\"dateModified\":\"2026-01-07T02:43:53.374Z\",\"isPartOf\":{\"@id\":\"https://paydocs.dashu.sa#website\"},\"breadcrumb\":{\"@id\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Embedded Integration\",\"item\":\"https://paydocs.dashu.sa/api-reference/endpoint/initiateSession\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"executePayment\",\"item\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment#apireference\",\"headline\":\"executePayment\",\"name\":\"executePayment\",\"description\":\"Executes a payment using the SessionId you have from the initiateSession endpoint. This endpoint will return a payment URL to redirect your customers to the payment page.\",\"url\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment\",\"mainEntityOfPage\":{\"@id\":\"https://paydocs.dashu.sa/api-reference/endpoint/executePayment#webpage\"},\"dateModified\":\"2026-01-07T02:43:53.374Z\",\"publisher\":{\"@id\":\"https://paydocs.dashu.sa/#organization\"},\"isPartOf\":{\"@id\":\"https://paydocs.dashu.sa#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DashPay API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"DashPay API Documentation","nav":{"global":{"anchors":[{"anchor":"DashPay Website","href":"https://dashu.sa","icon":"earth-americas"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Redirect Integration","pages":[{"title":"Initiate Session","api":"POST /initSession","href":"/api-reference/endpoint/initSession"}]},{"group":"Embedded Integration","pages":[{"title":"Initiate Session","description":"Initiate new session for a payment. This endpoint will help you get the SessionId that will be used to execute the payment later.","api":"POST /initiateSession","href":"/api-reference/endpoint/initiateSession"},{"title":"executePayment","api":"POST /executePayment","href":"/api-reference/endpoint/executePayment"}]},{"group":"General Endpoints","pages":[{"title":"Payment Inquiry","description":"Using this endpoint you'll have the ability to get the complete information about a specific invoice or payment using it's identifier (e.g: InvoiceId)","api":"POST /paymentInquiry","href":"/api-reference/endpoint/paymentInquiry"},{"title":"Make Refund","api":"POST /makeRefund","href":"/api-reference/endpoint/refund"},{"title":"Get Deposits","api":"GET /getDeposits","href":"/api-reference/endpoint/getDeposits"},{"title":"Get Deposit Details","api":"GET /getDepositDetails","href":"/api-reference/endpoint/getDepositsDetails"},{"title":"Get Transactions","api":"GET /getTransactions","href":"/api-reference/endpoint/getTransactions"}]}]}]},"basePath":"","title":"executePayment - DashPay API Documentation","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js"]}