{"id":61210,"date":"2024-04-09T14:27:36","date_gmt":"2024-04-09T08:57:36","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=61210"},"modified":"2024-04-16T10:49:48","modified_gmt":"2024-04-16T05:19:48","slug":"integrating-paypal-payment-gateway-with-django-a-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/integrating-paypal-payment-gateway-with-django-a-step-by-step-guide\/","title":{"rendered":"Integrating PayPal Payment Gateway with Django: A Step-by-Step Guide"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In today&#8217;s digital age, providing users with convenient and secure payment options is crucial for the success of any online business. PayPal, being one of the most widely used payment gateways globally, offers a reliable solution for processing online transactions. Integrating PayPal into your Django web application can enhance user experience and streamline checkout. In this comprehensive guide, we&#8217;ll walk through the step-by-step process of integrating PayPal payments into a Django web application.<\/span><\/p>\n<h2><b><i>Step 1: Setting Up a PayPal Developer Account:<\/i><\/b><\/h2>\n<p><b>Here&#8217;s how you can set up a PayPal sandbox account:<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Go to the PayPal Developer website:<\/span><a href=\"https:\/\/developer.paypal.com\/\"><span style=\"font-weight: 400;\"> https:\/\/developer.paypal.com\/<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Log in with your PayPal account credentials or sign up for a new PayPal account if you don&#8217;t have one.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Once logged in, navigate to the Dashboard and the Sandbox &gt; Accounts section.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click on the &#8220;Create Account&#8221; button to create a new test account.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Follow the prompts to create both seller and buyer (customer) test accounts.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">After setting up your sandbox accounts, you can use the provided sandbox API credentials (Client ID and Secret) in your Django app to interact with the PayPal API in the sandbox environment for testing purposes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When deploying your app to production, remember to replace these sandbox API credentials with your live PayPal API credentials.<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-61207 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img1_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-61208 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img2_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-61206 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img3_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-61205 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img4_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<h2><b>Step 2: Configuring Django Settings:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">In your Django settings file (settings.py), add your PayPal client ID and secret key obtained from the PayPal Developer Dashboard:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">PAYPAL_CLIENT_ID = 'YOUR_CLIENT_ID'<\/span><span style=\"font-weight: 400;\">\r\n<\/span><span style=\"font-weight: 400;\">PAYPAL_SECRET_KEY = 'YOUR_SECRET_KEY'<\/span><span style=\"font-weight: 400;\">\r\n<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Replace &#8216;YOUR_CLIENT_ID&#8217; and &#8216;YOUR_SECRET_KEY&#8217; with the actual values obtained from your PayPal Developer account.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><b>Step 3: Creating the Checkout Page:<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Create a new HTML template named <\/span><span style=\"font-weight: 400;\">checkout.html<\/span><span style=\"font-weight: 400;\"> where users can review their order and proceed with PayPal payment.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Design the page layout according to your application&#8217;s UI\/UX requirements.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Include a button or link to initiate the PayPal payment process<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><b>Step 4: Integrating PayPal JavaScript SDK:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">In the <\/span><span style=\"font-weight: 400;\">checkout.html<\/span><span style=\"font-weight: 400;\"> template, include the PayPal JavaScript SDK script. This script provides functions for setting up and handling the PayPal payment button.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">&lt;script src=\"https:\/\/www.paypal.com\/sdk\/js?client-id=AT-9V4o_Ntnhs6TgvnfvTDbhVe3j4DHB11TYsY6DhZ5XEs2gpCKVPjyCLJiYo4katruRTE9x6yizxi7E&amp;currency=USD\"&gt;&lt;\/script&gt;<\/span>\r\n<span style=\"font-weight: 400;\">&lt;script&gt;<\/span>\r\n<span style=\"font-weight: 400;\">functioninitPayPalButton(){<\/span>\r\n<span style=\"font-weight: 400;\">paypal.Buttons({<\/span>\r\n<span style=\"font-weight: 400;\">style: {<\/span>\r\n<span style=\"font-weight: 400;\">shape: 'rect',<\/span>\r\n<span style=\"font-weight: 400;\">color: 'gold',<\/span>\r\n<span style=\"font-weight: 400;\">layout: 'vertical',<\/span>\r\n<span style=\"font-weight: 400;\">label: 'paypal',<\/span>\r\n<span style=\"font-weight: 400;\">},<\/span>\r\n\r\n<span style=\"font-weight: 400;\">createOrder:function(data,actions){\r\n<\/span><span style=\"font-weight: 400;\">return actions.order.create({\r\n<\/span><span style=\"font-weight: 400;\">purchase_units: [{\"amount\":{\"currency_code\": \"USD\", \"value\": '{{total_amount}}'}}]\r\n<\/span><span style=\"font-weight: 400;\">});\r\n<\/span><span style=\"font-weight: 400;\">},\r\n<\/span><span style=\"font-weight: 400;\">onApprove:function(data,actions){\r\n<\/span><span style=\"font-weight: 400;\">return actions.order.capture().then(function(orderData){\r\n<\/span><span style=\"font-size: 1rem;\">var paypalPaymentID = orderData.purchase_units[0].payments.captures[0].id;\r\n<\/span><span style=\"font-weight: 400;\">\/\/ Full available details\r\n<\/span><span style=\"font-weight: 400;\">console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));\r\n<\/span><span style=\"font-weight: 400;\">\/\/ Show a success message within this page, for example:\r\n<\/span><span style=\"font-weight: 400;\">constelement= document.getElementById('paypal-button-container');\r\n<\/span><span style=\"font-weight: 400;\">element.innerHTML = '';\r\n<\/span><span style=\"font-weight: 400;\">element.innerHTML = '&lt;h3&gt;Thank you for your payment!&lt;\/h3&gt;';\r\n<\/span><span style=\"font-weight: 400;\">document.getElementById('paypal-payment-id').value = paypalPaymentID;\r\n<\/span><span style=\"font-weight: 400;\">document.getElementById('myform').submit();\r\n<\/span><span style=\"font-weight: 400;\">\/\/ Or go to another URL: actions.redirect('thank_you.html');\r\n<\/span><span style=\"font-weight: 400;\">});\r\n<\/span><span style=\"font-weight: 400;\">},\r\n<\/span><span style=\"font-weight: 400;\">onError:function(err){\r\n<\/span><span style=\"font-weight: 400;\">console.log(err);\r\n<\/span><span style=\"font-weight: 400;\">}\r\n<\/span><span style=\"font-weight: 400;\">}).render('#paypal-button-container');\r\n<\/span><span style=\"font-weight: 400;\">}\r\n<\/span><span style=\"font-weight: 400;\">initPayPalButton();\r\n<\/span><span style=\"font-weight: 400;\">&lt;\/script&gt;<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h2><b>Step 5: Implementing Server-side Logic:<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">In your Django views, implement server-side logic to create and process PayPal orders In the <\/span><span style=\"font-weight: 400;\">views.py<\/span><span style=\"font-weight: 400;\">file<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">def payment_done(request):\r\n<\/span><span style=\"font-weight: 400;\">user = request.user\r\n<\/span><span style=\"font-weight: 400;\">paypal_transaction_id = request.GET.get(\"paypal-payment-id\")\r\n<\/span><span style=\"font-weight: 400;\">custid = request.GET.get(\"custid\")\r\n<\/span><span style=\"font-weight: 400;\">customer = Customer.objects.get(id=custid)\r\n<\/span><span style=\"font-weight: 400;\">cart_items = Cart.objects.filter(user=user)\r\n<\/span><span style=\"font-weight: 400;\"># Check if the payment was made with PayPal\r\n<\/span><span style=\"font-weight: 400;\">if paypal_transaction_id:\r\n<\/span><span style=\"font-weight: 400;\">for cart in cart_items:\r\n<\/span><span style=\"font-weight: 400;\">OrderPlaced.objects.create(\r\n<\/span><span style=\"font-weight: 400;\">user=user,\r\n<\/span><span style=\"font-weight: 400;\">customer=customer,\r\n<\/span><span style=\"font-weight: 400;\">product=cart.product,\r\n<\/span><span style=\"font-weight: 400;\">quantity=cart.quantity,\r\n<\/span><span style=\"font-weight: 400;\">transaction_id=paypal_transaction_id,\r\n<\/span><span style=\"font-weight: 400;\">)\r\n<\/span><span style=\"font-weight: 400;\">cart.delete()\r\n<\/span><span style=\"font-weight: 400;\">return redirect(\"orders\")\r\n<\/span><span style=\"font-weight: 400;\"># Handle the case where PayPal payment ID is not provided\r\n<\/span><span style=\"font-weight: 400;\">else:\r\n<\/span><span style=\"font-weight: 400;\">return HttpResponse(\"Invalid payment information\").<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h2><b>Step 6: Update URLs:<\/b><\/h2>\n<p><b>Configure URLs to map views in your Django app&#8217;s urls.py:<\/b><\/p>\n<pre><b>\r\n<\/b><i><span style=\"font-weight: 400;\">urlpatterns = [<\/span><\/i><i><span style=\"font-weight: 400;\">\r\n<\/span><\/i><i><span style=\"font-weight: 400;\">path('paymentdone\/', views.payment_done, name='payment_done'),<\/span><\/i><i><span style=\"font-weight: 400;\">\r\n<\/span><\/i><i><span style=\"font-weight: 400;\">]<\/span><\/i><\/pre>\n<p><span style=\"font-weight: 400;\">\u00a0Now Click on the Pay With<\/span><b> PayPal<\/b><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-61204 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img5_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<div id=\"attachment_61203\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-61203\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-61203 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img6_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-61203\" class=\"wp-caption-text\"><strong>Now enter your Paypal account credentials<\/strong><\/p><\/div>\n<div id=\"attachment_61202\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-61202\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-61202 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img7_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-61202\" class=\"wp-caption-text\"><strong>For the demo, we are using Paypal balance for payment<\/strong><\/p><\/div>\n<div id=\"attachment_61201\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-61201\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-61201 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img8_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-61201\" class=\"wp-caption-text\"><strong>Completed the payment process<\/strong><\/p><\/div>\n<div id=\"attachment_61200\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-61200\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-61200 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python-1024x500.png\" alt=\"\" width=\"625\" height=\"305\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python-768x375.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python-1536x750.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/img9_blog2_python.png 1912w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-61200\" class=\"wp-caption-text\"><strong>Successfully redirect to the orders page<\/strong><\/p><\/div>\n<p>Thank You<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s digital age, providing users with convenient and secure payment options is crucial for the success of any online business. PayPal, being one of the most widely used payment gateways globally, offers a reliable solution for processing online transactions. Integrating PayPal into your Django web application can enhance user experience and streamline checkout. In [&hellip;]<\/p>\n","protected":false},"author":1528,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":952},"categories":[1994,1],"tags":[4043,4647,709,1358],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/61210"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1528"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=61210"}],"version-history":[{"count":2,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/61210\/revisions"}],"predecessor-version":[{"id":61303,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/61210\/revisions\/61303"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=61210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=61210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=61210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}