{"id":11932,"date":"2023-08-05T08:24:57","date_gmt":"2023-08-05T08:24:57","guid":{"rendered":"https:\/\/wooshpay.com\/?post_type=docs&#038;p=11932"},"modified":"2023-08-09T07:32:21","modified_gmt":"2023-08-09T07:32:21","password":"","slug":"wooshpay-js-sdk","status":"publish","type":"docs","link":"https:\/\/wooshpay.com\/it\/docs\/wooshpay-js-sdk\/","title":{"rendered":"WooshPay JS SDK"},"content":{"rendered":"<p>Scoprite come incorporare un modulo di pagamento WooshPay personalizzato nel vostro sito web o nella vostra applicazione. Il codice lato client e server crea un modulo di pagamento con elementi per completare il pagamento con vari metodi di pagamento.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-plus-font-size\" id=\"h-payment-flow\">Flusso di pagamento<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/api.apifox.cn\/api\/v1\/projects\/1296482\/resources\/362142\/image-preview\" alt=\"flusso di pagamento wooshpay\"\/><\/figure>\n\n\n\n<p>Le fasi di utilizzo dell'SDK WooshPay sono poche:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-create-a-paymentintent\">Creare un Intento di pagamento<\/h3>\n\n\n\n<p>Aggiungere un endpoint sul server che crei un PaymentIntent. Un PaymentIntent segue il ciclo di vita del pagamento del cliente, tenendo traccia di tutti i tentativi di pagamento falliti e assicurando che il cliente venga addebitato una sola volta. Restituire il segreto del cliente del PaymentIntent (il numero del PaymentIntent in questo caso) nella risposta per terminare il pagamento sul cliente. Abilitiamo le carte per impostazione predefinita.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Caricare wooshpay.js<\/h3>\n\n\n\n<p>Utilizzate wooshpay.js per rimanere conformi alla normativa PCI, assicurando che i dati di pagamento siano inviati direttamente a WooshPay senza toccare il vostro server. Caricare sempre wooshpay.js da js.wooshpay.com per rimanere conformi. Non includete lo script in un bundle o ospitatelo voi stessi.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-initialize-wooshpay-elements\"> Inizializzare gli elementi WooshPay<\/h3>\n\n\n\n<p>Inizializzare la libreria WooshPay Elements UI con il segreto del cliente. Elements gestisce i componenti dell'interfaccia utente necessari per raccogliere i dati di pagamento.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-complete-the-payment-on-the-client\">Completare il pagamento sul cliente<\/h3>\n\n\n\n<p>Completare il pagamento<br>Chiamata <code>confermaPagamento()<\/code>passando il PaymentElement e un return_url per indicare dove WooshPay deve reindirizzare l'utente dopo aver completato il pagamento. Per i pagamenti che richiedono l'autenticazione, WooshPay visualizza un modale per l'autenticazione 3D Secure o reindirizza il cliente a una pagina di autenticazione, a seconda del metodo di pagamento. Dopo che il cliente ha completato il processo di autenticazione, viene reindirizzato alla pagina <code>indirizzo_di_ritorno<\/code>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-plus-font-size\" id=\"h-handle-errors\">Gestire gli errori<\/h2>\n\n\n\n<p>Se si verificano errori immediati (ad esempio, la carta del cliente viene rifiutata), wooshpay.js restituisce un errore. Mostrate il messaggio di errore al cliente, in modo che possa riprovare.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\" id=\"h-show-a-payment-status-message\">Mostra un messaggio sullo stato del pagamento<\/h2>\n\n\n\n<p>Quando l'WooshPay reindirizza il cliente all'indirizzo <code>indirizzo_di_ritorno<\/code>, il <code>segreto_intento_di_pagamento_del_cliente<\/code>\u00e8 aggiunto da wooshpay.js. Utilizzarlo per recuperare il PaymentIntent e determinare cosa mostrare al cliente.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading has-medium-plus-font-size\" id=\"h-get-a-demo\">Richiedi una demo<\/h2>\n\n\n\n<p>Si pu\u00f2 scaricare da qui <a href=\"https:\/\/appletservice.oss-cn-hangzhou.aliyuncs.com\/wooshpay_java_demo.zip\">JS SDK Demo scaricare<\/a><\/p>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Learn how to embed a custom WooshPay payment form in your website or application. The client- and server-side code builds a checkout form with Elements to complete a payment using various payment methods. Payment Flow There are few steps of using WooshPay SDK: Create a PaymentIntent Add an endpoint on your server that creates a [&hellip;]<\/p>","protected":false},"author":6,"featured_media":11934,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"doc_category":[315],"doc_tag":[320,318,319],"class_list":["post-11932","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-online-payments","doc_tag-get-a-demo","doc_tag-js-sdk","doc_tag-payment-flow"],"year_month":"2026-04","word_count":333,"total_views":"2267","reactions":{"happy":"34","normal":"36","sad":"34"},"author_info":{"name":"zhaozixu","author_nicename":"zhaozixu","author_url":"https:\/\/wooshpay.com\/it\/author\/zhaozixu\/"},"doc_category_info":[{"term_name":"Online Payments","term_url":"https:\/\/wooshpay.com\/it\/docs-category\/online-payments\/"}],"doc_tag_info":[{"term_name":"Get a demo","term_url":"https:\/\/wooshpay.com\/it\/docs-tag\/get-a-demo\/"},{"term_name":"js sdk","term_url":"https:\/\/wooshpay.com\/it\/docs-tag\/js-sdk\/"},{"term_name":"Payment Flow","term_url":"https:\/\/wooshpay.com\/it\/docs-tag\/payment-flow\/"}],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.8 (Yoast SEO v24.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WooshPay JS SDK - WooshPay<\/title>\n<meta name=\"description\" content=\"Learn how to embed a custom WooshPay payment form in your website or application. The client- and server-side code builds a checkout form with Elements to complete a payment using various payment methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wooshpay.com\/it\/docs\/wooshpay-js-sdk\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WooshPay JS SDK\" \/>\n<meta property=\"og:description\" content=\"Learn how to embed a custom WooshPay payment form in your website or application. The client- and server-side code builds a checkout form with Elements to complete a payment using various payment methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wooshpay.com\/it\/docs\/wooshpay-js-sdk\/\" \/>\n<meta property=\"og:site_name\" content=\"WooshPay\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-09T07:32:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png\" \/>\n\t<meta property=\"og:image:width\" content=\"935\" \/>\n\t<meta property=\"og:image:height\" content=\"395\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/\",\"url\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/\",\"name\":\"WooshPay JS SDK - WooshPay\",\"isPartOf\":{\"@id\":\"https:\/\/www.wooshpay.com\/zh\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png\",\"datePublished\":\"2023-08-05T08:24:57+00:00\",\"dateModified\":\"2023-08-09T07:32:21+00:00\",\"description\":\"Learn how to embed a custom WooshPay payment form in your website or application. The client- and server-side code builds a checkout form with Elements to complete a payment using various payment methods.\",\"breadcrumb\":{\"@id\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#primaryimage\",\"url\":\"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png\",\"contentUrl\":\"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png\",\"width\":935,\"height\":395,\"caption\":\"wooshpay paymen flow\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.wooshpay.com\/zh\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docs\",\"item\":\"https:\/\/wooshpay.com\/fr\/docs\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WooshPay JS SDK\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wooshpay.com\/zh\/#website\",\"url\":\"https:\/\/www.wooshpay.com\/zh\/\",\"name\":\"WooshPay\",\"description\":\"One-stop payment platform\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wooshpay.com\/zh\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"WooshPay JS SDK - WooshPay","description":"Scoprite come incorporare un modulo di pagamento WooshPay personalizzato nel vostro sito web o nella vostra applicazione. Il codice lato client e server crea un modulo di pagamento con elementi per completare il pagamento con vari metodi di pagamento.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wooshpay.com\/it\/docs\/wooshpay-js-sdk\/","og_locale":"it_IT","og_type":"article","og_title":"WooshPay JS SDK","og_description":"Learn how to embed a custom WooshPay payment form in your website or application. The client- and server-side code builds a checkout form with Elements to complete a payment using various payment methods.","og_url":"https:\/\/wooshpay.com\/it\/docs\/wooshpay-js-sdk\/","og_site_name":"WooshPay","article_modified_time":"2023-08-09T07:32:21+00:00","og_image":[{"width":935,"height":395,"url":"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/","url":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/","name":"WooshPay JS SDK - WooshPay","isPartOf":{"@id":"https:\/\/www.wooshpay.com\/zh\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#primaryimage"},"image":{"@id":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#primaryimage"},"thumbnailUrl":"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png","datePublished":"2023-08-05T08:24:57+00:00","dateModified":"2023-08-09T07:32:21+00:00","description":"Scoprite come incorporare un modulo di pagamento WooshPay personalizzato nel vostro sito web o nella vostra applicazione. Il codice lato client e server crea un modulo di pagamento con elementi per completare il pagamento con vari metodi di pagamento.","breadcrumb":{"@id":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#primaryimage","url":"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png","contentUrl":"https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png","width":935,"height":395,"caption":"wooshpay paymen flow"},{"@type":"BreadcrumbList","@id":"https:\/\/wooshpay.com\/fr\/docs\/wooshpay-js-sdk\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wooshpay.com\/zh\/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https:\/\/wooshpay.com\/fr\/docs\/"},{"@type":"ListItem","position":3,"name":"WooshPay JS SDK"}]},{"@type":"WebSite","@id":"https:\/\/www.wooshpay.com\/zh\/#website","url":"https:\/\/www.wooshpay.com\/zh\/","name":"WooshPay","description":"Piattaforma di pagamento unica","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wooshpay.com\/zh\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"}]}},"uagb_featured_image_src":{"full":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png",935,395,false],"thumbnail":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow-150x150.png",150,150,true],"medium":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow-300x127.png",300,127,true],"medium_large":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow-768x324.png",768,324,true],"large":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png",935,395,false],"1536x1536":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png",935,395,false],"2048x2048":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow.png",935,395,false],"trp-custom-language-flag":["https:\/\/wooshpay-official-img.oss-accelerate.aliyuncs.com\/wp-content\/uploads\/2023\/08\/wooshpay-paymen-flow-18x8.png",18,8,true]},"uagb_author_info":{"display_name":"zhaozixu","author_link":"https:\/\/wooshpay.com\/it\/author\/zhaozixu\/"},"uagb_comment_info":0,"uagb_excerpt":"Learn how to embed a custom WooshPay payment form in your website or application. The client- and server-side code builds a checkout form with Elements to complete a payment using various payment methods. Payment Flow There are few steps of using WooshPay SDK: Create a PaymentIntent Add an endpoint on your server that creates a&hellip;","_links":{"self":[{"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/docs\/11932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/comments?post=11932"}],"version-history":[{"count":0,"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/docs\/11932\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/media\/11934"}],"wp:attachment":[{"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/media?parent=11932"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/doc_category?post=11932"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wooshpay.com\/it\/wp-json\/wp\/v2\/doc_tag?post=11932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}