{"id":886,"date":"2025-06-08T10:39:47","date_gmt":"2025-06-08T10:39:47","guid":{"rendered":"https:\/\/lddpay.com\/?post_type=docs&#038;p=886"},"modified":"2025-06-08T10:40:25","modified_gmt":"2025-06-08T10:40:25","password":"","slug":"flow","status":"publish","type":"docs","link":"https:\/\/lddpay.com\/zh\/docs\/flow\/","title":{"rendered":"Flow"},"content":{"rendered":"<h2 class=\"wp-block-heading\"><a href=\"file:\/\/\/C:\/Users\/Administrator\/Downloads\/payfac-doc (1).htm#tag\/Flow\/operation\/FlowController_createSession\"><\/a>Request a Payment Session<\/h2>\n\n\n\n<p>Creates a payment session for Flow. The values you provide in the request will be used to determine the payment methods available to Flow. Some payment methods may require you to provide specific values for certain fields. You must supply the unmodified response body when you initialize Flow.<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Authorizations<\/summary>\n<p><em>bearer<\/em><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">HTTP: bearer<\/h5>\n\n\n\n<p><strong>HTTP Authorization Scheme: <\/strong><code>bearer<\/code><\/p>\n\n\n\n<p><strong>Bearer format: <\/strong><code>JWT<\/code><\/p>\n<\/details>\n\n\n\n<h5 class=\"wp-block-heading\">header Parameters<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Authorizationrequired<\/td><td>stringBearer token (API Key or OAuth2 Access Token).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Request Body schema: application\/json<\/h5>\n\n\n\n<p>Request body for creating a Flow payment session.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>amountrequired<\/td><td>number &gt;= 0 The payment amount in minor units. Provide 0 to perform a card verification.<\/td><\/tr><tr><td>currencyrequired<\/td><td>string = 3 characters The three-letter ISO currency code.<\/td><\/tr><tr><td>billingrequired<\/td><td>objectThe billing details.<\/td><\/tr><tr><td>success_urlrequired<\/td><td>string &lt;= 1024 characters Overrides the default success redirect URL for payment methods that require a redirect.<\/td><\/tr><tr><td>failure_urlrequired<\/td><td>string &lt;= 1024 characters Overrides the default failure redirect URL for payment methods that require a redirect.<\/td><\/tr><tr><td>payment_type<\/td><td>string Default: &#8220;Regular&#8221; Enum:&#8221;Regular&#8221;&#8221;Recurring&#8221;&#8221;MOTO&#8221;&#8221;Installment&#8221;&#8221;Unscheduled&#8221;Must be specified for card-not-present (CNP) payments.<\/td><\/tr><tr><td>billing_descriptor<\/td><td>objectA description of the purchase, displayed on the customer&#8217;s statement.<\/td><\/tr><tr><td>reference<\/td><td>string &lt;= 50 characters A reference to identify the payment (max 50 chars, Amex: 30, iDEAL: 35, Benefit: unique alphanumeric).<\/td><\/tr><tr><td>description<\/td><td>string &lt;= 100 characters A description for the payment (max 100 chars).<\/td><\/tr><tr><td>customer<\/td><td>objectThe customer&#8217;s details. Required if source.type is tamara.<\/td><\/tr><tr><td>shipping<\/td><td>objectThe shipping details.<\/td><\/tr><tr><td>recipient<\/td><td>objectInformation about the recipient of the payment&#8217;s funds.<\/td><\/tr><tr><td>processing<\/td><td>objectProcessing options.<\/td><\/tr><tr><td>instruction<\/td><td>objectDetails about the payment instruction.<\/td><\/tr><tr><td>processing_channel_id<\/td><td>string^(pc)_(\\w{26})$The processing channel to use for the payment.<\/td><\/tr><tr><td>expires_on<\/td><td>stringA timestamp specifying when the PaymentSession should expire, as an ISO 8601 code.<\/td><\/tr><tr><td>payment_method_configuration<\/td><td>objectConfigurations for payment method-specific settings.<\/td><\/tr><tr><td>enabled_payment_methods<\/td><td>Array of stringsSpecifies which payment method options to present to the customer.<\/td><\/tr><tr><td>disabled_payment_methods<\/td><td>Array of stringsSpecifies which payment method options to not present to the customer.<\/td><\/tr><tr><td>items<\/td><td>Array of objectsThe line items in the order.<\/td><\/tr><tr><td>amount_allocations<\/td><td>Array of objectsThe sub-entities that the payment is being processed on behalf of.<\/td><\/tr><tr><td>risk<\/td><td>objectConfigures the risk assessment performed during payment processing.<\/td><\/tr><tr><td>customer_retry<\/td><td>objectConfiguration for asynchronous retries.<\/td><\/tr><tr><td>display_name<\/td><td>string &lt;= 255 characters The merchant&#8217;s display name.<\/td><\/tr><tr><td>metadata<\/td><td>objectAllows you to store additional information about a transaction with custom fields (up to 18 fields, 255 chars each).<\/td><\/tr><tr><td>locale<\/td><td>string Default: &#8220;en-GB&#8221;Creates a translated version of the page in the specified language.<\/td><\/tr><tr><td>3ds<\/td><td>objectInformation required for 3D Secure authentication payments.<\/td><\/tr><tr><td>sender<\/td><td>objectThe sender of the payment.<\/td><\/tr><tr><td>capture<\/td><td>boolean Default: trueSpecifies whether to capture the payment, if applicable.<\/td><\/tr><tr><td>capture_on<\/td><td>stringA timestamp specifying when to capture the payment, as an ISO 8601 code.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Responses<\/h5>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>201 A Payment Session.<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>idrequired<\/td><td>stringThe Payment Session unique identifier.<\/td><\/tr><tr><td>status<\/td><td>stringThe status of the payment session.<\/td><\/tr><tr><td>payment_id<\/td><td>stringThe payment identifier associated with the session.<\/td><\/tr><tr><td>amount<\/td><td>numberThe payment amount in minor units.<\/td><\/tr><tr><td>currency<\/td><td>stringThe three-letter ISO currency code.<\/td><\/tr><tr><td>reference<\/td><td>stringA reference to identify the payment.<\/td><\/tr><tr><td>description<\/td><td>stringA description for the payment.<\/td><\/tr><tr><td>expires_on<\/td><td>stringA timestamp specifying when the PaymentSession should expire, as an ISO 8601 code.<\/td><\/tr><tr><td>customer<\/td><td>objectThe customer&#8217;s details.<\/td><\/tr><tr><td>billing<\/td><td>objectThe billing details.<\/td><\/tr><tr><td>products<\/td><td>Array of objectsThe products in the order.<\/td><\/tr><tr><td>payment_session_token<\/td><td>stringA unique token representing the payment session, which you must provide when you initialize Flow.<\/td><\/tr><tr><td>payment_session_secret<\/td><td>stringThe secret used by Flow to authenticate payment session requests.<\/td><\/tr><tr><td>_linksrequired<\/td><td>objectThe links related to the Payment Session.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<p>401 Unauthorized<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>422 Invalid data was sent.<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>request_idrequired<\/td><td>stringThe unique request identifier.<\/td><\/tr><tr><td>error_typerequired<\/td><td>stringThe error type.<\/td><\/tr><tr><td>error_codesrequired<\/td><td>Array of stringsThe error codes.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>429 Too many requests.<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>request_idrequired<\/td><td>stringThe unique request identifier.<\/td><\/tr><tr><td>error_typerequired<\/td><td>stringThe error type.<\/td><\/tr><tr><td>error_codesrequired<\/td><td>Array of stringsThe error codes.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<p>502 Bad gateway<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"file:\/\/\/C:\/Users\/Administrator\/Downloads\/payfac-doc (1).htm#tag\/Flow\/operation\/FlowController_submitSessionPayment\"><\/a>Submit a Payment Session Payment<\/h2>\n\n\n\n<p>Submit a payment attempt for a payment session. Request a payment via your created payment session. This request works with the Flow handleSubmit callback, where you can perform a customized payment submission. You must send the unmodified response body as the response of the handleSubmit callback.<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Authorizations<\/summary>\n<p><em>bearer<\/em><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">HTTP: bearer<\/h5>\n\n\n\n<p><strong>HTTP Authorization Scheme: <\/strong><code>bearer<\/code><\/p>\n\n\n\n<p><strong>Bearer format: <\/strong><code>JWT<\/code><\/p>\n<\/details>\n\n\n\n<h5 class=\"wp-block-heading\">header Parameters<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Authorizationrequired<\/td><td>stringBearer token (API Key or OAuth2 Access Token).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Request Body schema: application\/json<\/h5>\n\n\n\n<p>Request body for submitting a payment session payment.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>session_datarequired<\/td><td>stringA unique token representing the additional customer data captured by Flow, as received from the handleSubmit callback. Do not log or store this value.<\/td><\/tr><tr><td>amountrequired<\/td><td>number &gt;= 0 The payment amount in minor units. Provide 0 to perform a card verification.<\/td><\/tr><tr><td>reference<\/td><td>string &lt;= 50 characters A reference to identify the payment (max 50 chars, Amex: 30, iDEAL: 35, Benefit: unique alphanumeric).<\/td><\/tr><tr><td>items<\/td><td>Array of objectsThe line items in the order.<\/td><\/tr><tr><td>3ds<\/td><td>objectInformation required for 3D Secure authentication payments.<\/td><\/tr><tr><td>ip_address<\/td><td>string &lt;= 45 characters The customer&#8217;s IP address. Only IPv4 and IPv6 addresses are accepted.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Responses<\/h5>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>201 Payment processed successfully<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>idrequired<\/td><td>stringThe payment identifier.<\/td><\/tr><tr><td>statusrequired<\/td><td>stringThe payment&#8217;s status.<\/td><\/tr><tr><td>typerequired<\/td><td>Array of stringsThe payment method name.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>202 Payment asynchronous or further action required<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>idrequired<\/td><td>stringThe payment identifier.<\/td><\/tr><tr><td>statusrequired<\/td><td>stringThe payment&#8217;s status.<\/td><\/tr><tr><td>typerequired<\/td><td>stringThe payment method name.<\/td><\/tr><tr><td>actionrequired<\/td><td>objectInstruction for further payment action.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<p>401 Unauthorized<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>422 Invalid data was sent.<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>request_idrequired<\/td><td>stringThe unique request identifier.<\/td><\/tr><tr><td>error_typerequired<\/td><td>stringThe error type.<\/td><\/tr><tr><td>error_codesrequired<\/td><td>Array of stringsThe error codes.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>429 Too many requests or duplicate request detected<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>request_idrequired<\/td><td>stringThe unique request identifier.<\/td><\/tr><tr><td>error_typerequired<\/td><td>stringThe error type.<\/td><\/tr><tr><td>error_codesrequired<\/td><td>Array of stringsThe error codes.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<p>502 Bad gateway<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"file:\/\/\/C:\/Users\/Administrator\/Downloads\/payfac-doc (1).htm#tag\/Flow\/operation\/FlowController_getSessionDetails\"><\/a>Get Payment Session Details<\/h2>\n\n\n\n<p>Returns the details of the payment session with the specified identifier string.<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Authorizations<\/summary>\n<p><em>bearer<\/em><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">HTTP: bearer<\/h5>\n\n\n\n<p><strong>HTTP Authorization Scheme: <\/strong><code>bearer<\/code><\/p>\n\n\n\n<p><strong>Bearer format: <\/strong><code>JWT<\/code><\/p>\n<\/details>\n\n\n\n<h5 class=\"wp-block-heading\">path Parameters<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>idrequired<\/td><td>string<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">header Parameters<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Authorizationrequired<\/td><td>stringBearer token (API Key or OAuth2 Access Token).<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>200 Payment session retrieved successfully<\/summary>\n<h5 class=\"wp-block-heading\">Response Schema: application\/json<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>idrequired<\/td><td>stringThe Payment Session unique identifier.<\/td><\/tr><tr><td>status<\/td><td>stringThe status of the payment session.<\/td><\/tr><tr><td>payment_id<\/td><td>stringThe payment identifier associated with the session.<\/td><\/tr><tr><td>amount<\/td><td>numberThe payment amount in minor units.<\/td><\/tr><tr><td>currency<\/td><td>stringThe three-letter ISO currency code.<\/td><\/tr><tr><td>reference<\/td><td>stringA reference to identify the payment.<\/td><\/tr><tr><td>description<\/td><td>stringA description for the payment.<\/td><\/tr><tr><td>expires_on<\/td><td>stringA timestamp specifying when the PaymentSession should expire, as an ISO 8601 code.<\/td><\/tr><tr><td>customer<\/td><td>objectThe customer&#8217;s details.<\/td><\/tr><tr><td>billing<\/td><td>objectThe billing details.<\/td><\/tr><tr><td>products<\/td><td>Array of objectsThe products in the order.<\/td><\/tr><tr><td>payment_session_token<\/td><td>stringA unique token representing the payment session, which you must provide when you initialize Flow.<\/td><\/tr><tr><td>payment_session_secret<\/td><td>stringThe secret used by Flow to authenticate payment session requests.<\/td><\/tr><tr><td>_linksrequired<\/td><td>objectThe links related to the Payment Session.<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/details>\n\n\n\n<p>401 Unauthorized<br>404 Session not found<\/p>","protected":false},"excerpt":{"rendered":"<p>Request a Payment Session Creates a payment session for Flow. The values you provide in the request will be used [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[122],"doc_tag":[],"year_month":"2026-04","word_count":977,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"author_nicename":"admin","author_url":"https:\/\/lddpay.com\/zh\/author\/admin\/"},"doc_category_info":[{"term_name":"Temp Solution","term_url":"https:\/\/lddpay.com\/zh\/docs-category\/temp-solution\/"}],"doc_tag_info":[],"author_list":[{"ID":"3","user_login":"jony","display_name":"jony","id":"3"},{"ID":"2","user_login":"Merchantlogin","display_name":"Merchantlogin","id":"2"},{"ID":"1","user_login":"w2863431","display_name":"admin","id":"1"}],"_links":{"self":[{"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/docs\/886"}],"collection":[{"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/comments?post=886"}],"version-history":[{"count":1,"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/docs\/886\/revisions"}],"predecessor-version":[{"id":887,"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/docs\/886\/revisions\/887"}],"wp:attachment":[{"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/media?parent=886"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/doc_category?post=886"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/lddpay.com\/zh\/wp-json\/wp\/v2\/doc_tag?post=886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}