{"info":{"_postman_id":"7528edc6-4694-494a-9361-f2c6e34b7e21","name":"Payment-API DOCUMENTATION FOR PUBLIC TO INGERATE WITH THERE WEBSITES","description":"<html><head></head><body><p>To use Dowell Payment API Services, you need to follow these steps:</p>\n<ol>\n<li>Login into Dowell API Service Website to activate DOWELL PAYMENTS API and obtain your API KEY, use the link below <a href=\"https://\">https://ll05-ai-dowell.github.io/100105-DowellApiKeySystem/</a></li>\n<li>Then set the API KEY as part of the url parameter as shown below. Replace with your actual API key. The URL format: <code>https://100088.pythonanywhere.com/api/stripe/initialize/public/api_key</code></li>\n</ol>\n<p><strong>PAYMENT OPTIONS</strong></p>\n<p>We currently have two payment option which are Stripe and Paypal.</p>\n<p>Stripe supports paying in local currency across more than 135 countries.</p>\n<p>PayPal supports paying in local currency in 25 countries.</p>\n<p><strong>And also Paypal only supported price of 2 decimal point at most as part of the request body While Stripe only support whole number</strong></p>\n<p><em><strong>To use the stripe endpoint kindly follow the step below.</strong></em></p>\n<ul>\n<li>Make a post request with stripe key, price, currency_code, product name and callbacke URL to the Stripe endpoint to Initialize the payment at the server side, Also check the example below for more clarification.</li>\n</ul>\n<p><strong>Note that the stripe key must be attached to the user stripe account that will be credited</strong></p>\n<ul>\n<li>Note that the callback URL is where you user will be returned to after completing the payment process.</li>\n<li>A response body that contain approval_url and payment_id will be returned.</li>\n</ul>\n<p><strong>Please be aware that the payment ID can also be obtained from the callback URL as a query parameter when the user is redirected back to the callback URL.</strong></p>\n<p><strong>Example</strong> :<a href=\"https://www.google.com/?token=971db619-24a0-42ac-a8fe-0cf97de3b96b\">https://www.google.com/?token=971db619-24a0-42ac-a8fe-0cf97de3b96b</a>,</p>\n<p><strong>where</strong> <strong><code>token</code></strong> <strong>is the query params and</strong> <a href=\"https://www.google.com/?token=971db619-24a0-42ac-a8fe-0cf97de3b96b\"><b>971db619-24a0-42ac-a8fe-0cf97de3b96b</b></a> <strong>is the payment id</strong></p>\n<ul>\n<li>Complete the payment by redirecting the user to the approval_url.</li>\n<li>Make a post request with the payment_id to verify the status of the payment.</li>\n<li>You will ge a response message of succeeded if the payment was successful.</li>\n</ul>\n<p><em><strong>To use the paypal endpoint kindly follow the step below.</strong></em></p>\n<ul>\n<li>Make a post request with Paypal_Client_Id, Paypal_Secret_Key, price, currency_code, product name, callback URL and mode to the Paypal endpoint to Initialize the payment at the server side, Also check the example below for more clarification.</li>\n</ul>\n<p><strong>Note that the Paypal_Client_id and Paypal_Secret_key must be attached to the user paypal account that will be credited</strong></p>\n<ul>\n<li>Set the mode to sandbox incase you wanted to test the API and make sure that your Paypal_Client_Id and Paypal_Secret_Key is attached to your sanbox app in your paypal account</li>\n<li>Set the mode to live incase you wanted to switch to live mode and make sure that your Paypal_Client_Id and Paypal_Secret_key is attached to your live app in your paypal account</li>\n<li>Note that the callback URL is where you user will be returned to after completing the payment process.</li>\n<li>A response body that contain approval_url and payment_id will be returned.</li>\n<li>Complete the payment by redirecting the user to the approval_url.</li>\n<li>Make a post request with the payment_id to verify the status of the payment.</li>\n<li>You will ge a response message of succeeded and the payer details if the payment was successful.</li>\n</ul>\n<p>If you are integrating this Payment API with an Android app or IOS app, you don't need to provide the callback url, A default callback url will be set which is this <a href=\"https://\">https://100088.pythonanywhere.com/api/success</a>, Inside your webview keep track of the changes in the url and return the user to a page inside you app and perform the verification, But if you are integrating the Payment API with a website (Frontend) you need to provide the callback url as a page in your website where you will perform the verification.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"20868747","collectionId":"7528edc6-4694-494a-9361-f2c6e34b7e21","publishedId":"2s93mAVLjQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-05-31T17:36:26.000Z"},"item":[{"name":"initialize Payment (Stripe)","id":"b65ae56a-60a8-4f07-86c8-3d5913e9faff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"stripe_key\":\"sk_*****************************************************************\",\n  \"price\": 500,\n  \"product\": \"product name\",\n  \"currency_code\":\"usd\",\n  \"callback_url\":\"https://www.google.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/stripe/initialize/public/e7fa3cc2-******************","description":"<p>The response body contains a URL for a QR code image as well. Users will scan this QR code to complete the payment process. Once the user successfully completes the payment, they will be redirected to your callback URL with the payment ID attached as a query parameter for further verification.</p>\n","urlObject":{"protocol":"https","path":["api","stripe","initialize","public","e7fa3cc2-******************"],"host":["100088","pythonanywhere","com"],"query":[],"variable":[]}},"response":[{"id":"b0643757-38ae-4a7c-9325-e49cf6621b62","name":"initialize Payment (Stripe)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"stripe_key\":\"sk_test_************\",\n  \"price\": 500,\n  \"product\": \"product name\",\n  \"currency_code\":\"usd\",\n  \"callback_url\":\"https://www.google.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/stripe/initialize/public/e7fa******************"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 14 Oct 2023 14:47:02 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Vary","value":"Accept, Cookie, Origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"X-Clacks-Overhead","value":"GNU Terry Pratchett"},{"key":"Content-Encoding","value":"gzip"},{"key":"Server","value":"PythonAnywhere"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"approval_url\": \"https://checkout.stripe.com/c/pay/cs_test_a1E6GnOpKeYcZfOLOK0a3H65bzEG5poJIG2lxOhb4rY8zAswUs1dNkcmmU#fidkdWxOYHwnPyd1blpxYHZxWjA0SWxOUGtAT25CS3FtY2d%2FNXBpUGlJUEs3Y11MSW1rX0JGZlZfV11pbmlHVVJLdVxwaVB8NHFcNHQ2XE1uc2Y1SkZWPWJ1Q01XUV0xXUp9ZnBHNktyMmBvNTVET0xjPF1OYCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl\",\n    \"qr_image_url\": \"https://100088.pythonanywhere.com/media/qrcodes/abb11d5d-bf2b-4e8d-92d3-7c5dfa3588f6/qrcode.png\",\n    \"payment_id\": \"abb11d5d-bf2b-4e8d-92d3-7c5dfa3588f6\"\n}"}],"_postman_id":"b65ae56a-60a8-4f07-86c8-3d5913e9faff"},{"name":"verify Payment (Stripe)","id":"b811e24c-c683-4e8d-bf83-26bf6e98c1af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"stripe_key\":\"sk_*****************************************************************\",\n  \"id\": \"b7ce79cd-4e31-47ec-8b9d-bb85788d54c1\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/verify/payment/stripe/public/e7fa3cc2-*********************","urlObject":{"protocol":"https","path":["api","verify","payment","stripe","public","e7fa3cc2-*********************"],"host":["100088","pythonanywhere","com"],"query":[],"variable":[]}},"response":[{"id":"7e34d9e4-236a-414c-95dd-6f122ef4ea44","name":"verify Payment (Stripe)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"stripe_key\":\"sk_*****************************************************************\",\n  \"id\": \"b7ce79cd-4e31-47ec-8b9d-bb85788d54c1\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/verify/payment/stripe/public/e7fa3cc2-*********************"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 16 Aug 2023 09:33:18 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"22"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept, Cookie, Origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"X-Clacks-Overhead","value":"GNU Terry Pratchett"},{"key":"Server","value":"PythonAnywhere"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"succeeded\"\n}"}],"_postman_id":"b811e24c-c683-4e8d-bf83-26bf6e98c1af"},{"name":"initialize Payment (Paypal)","id":"b2b1fdcb-aacc-4cb9-bc5d-78011d9f5353","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"paypal_client_id\":\"AV******************************************************\",\n  \"paypal_secret_key\":\"EL*****************************************************\",\n  \"price\": 500,\n  \"product\": \"product name\",\n  \"currency_code\":\"usd\",\n  \"callback_url\":\"https://www.google.com\",\n  \"mode\":\"sandbox\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/paypal/initialize/public/e7fa3cc2-******************","description":"<p>The response body contains a URL for a QR code image as well. Users will scan this QR code to complete the payment process. Once the user successfully completes the payment, they will be redirected to your callback URL with the payment ID attached as a query parameter for further verification.</p>\n","urlObject":{"protocol":"https","path":["api","paypal","initialize","public","e7fa3cc2-******************"],"host":["100088","pythonanywhere","com"],"query":[],"variable":[]}},"response":[{"id":"bad573e9-7496-4bf2-a64e-fc621d909416","name":"initialize Payment (Paypal)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"paypal_client_id\":\"AVJXJ*********\",\n  \"paypal_secret_key\":\"ELsN*********\",\n  \"price\": 500,\n  \"product\": \"product name\",\n  \"currency_code\":\"usd\",\n  \"callback_url\":\"https://www.google.com\",\n  \"mode\":\"sandbox\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/paypal/initialize/public/e7fa3*****************"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 14 Oct 2023 14:48:07 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"227"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept, Cookie, Origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"X-Clacks-Overhead","value":"GNU Terry Pratchett"},{"key":"Server","value":"PythonAnywhere"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"approval_url\": \"https://www.sandbox.paypal.com/checkoutnow?token=4C6335208N130692X\",\n    \"qr_image_url\": \"https://100088.pythonanywhere.com/media/qrcodes/4C6335208N130692X/qrcode.png\",\n    \"payment_id\": \"4C6335208N130692X\"\n}"}],"_postman_id":"b2b1fdcb-aacc-4cb9-bc5d-78011d9f5353"},{"name":"verify Payment (Paypal)","id":"506156d6-0f1c-4212-b7c5-1d8ceb964e1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"paypal_client_id\":\"AV***********************************\",\n  \"paypal_secret_key\":\"E********************************\",\n  \"id\": \"14A57733SF807430B\",\n  \"mode\":\"sandbox\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/verify/payment/paypal/public/e7fa3cc2-*******************","urlObject":{"protocol":"https","path":["api","verify","payment","paypal","public","e7fa3cc2-*******************"],"host":["100088","pythonanywhere","com"],"query":[],"variable":[]}},"response":[{"id":"f4e82588-7f1a-43c2-a301-7e567fe82969","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"paypal_client_id\":\"AV********************************************\",\n  \"paypal_secret_key\":\"EL************************************\",\n  \"id\": \"18H951148H925290N\",\n  \"mode\":\"sandbox\"\n}","options":{"raw":{"language":"json"}}},"url":"https://100088.pythonanywhere.com/api/verify/payment/paypal/public/e801cc0f-6aaf-***********"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 21 Jul 2023 10:00:27 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Vary","value":"Accept, Cookie, Origin"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"X-Clacks-Overhead","value":"GNU Terry Pratchett"},{"key":"Content-Encoding","value":"gzip"},{"key":"Server","value":"PythonAnywhere"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"succeeded\"\n}"}],"_postman_id":"506156d6-0f1c-4212-b7c5-1d8ceb964e1f"}]}