{"info":{"_postman_id":"4c2aec4c-bfea-42af-9e90-f16ebec9d597","name":"pay","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"8955262","collectionId":"4c2aec4c-bfea-42af-9e90-f16ebec9d597","publishedId":"UVsJy7kC","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"666","highlight":"00BFFF"},"publishDate":"2022-03-14T17:10:42.000Z"},"item":[{"name":"Checkout","id":"f741f1f3-2841-4b8a-9515-14246ff8177f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://p.yzhan.co/checkout?app_id=2021122412586601&request_time=2021-12-15 02:38:44&notify_url=https://p.yzhan.co/api/test/notify-url&cancel_url=https://p.yzhan.co/api/test/cancel-url&return_url=https://p.yzhan.co/api/test/return-url&product={\"name\":\"Product Name\",\"description\":\"Product Description\",\"type\":\"DIGITAL\",\"category\":\"AC_REFRIGERATION_REPAIR\",\"image_url\":\"https://image.com/url\",\"url\":\"https://url.com/url\",\"status\":\"ACTIVE\",\"list\":[{\"name\":\"Prodcut Name 1\",\"description\":\"Product Description 1\"},{\"name\":\"Prodcut Name 2\",\"description\":\"Product Description 2\"}]}&channel={\"env\":\"sandbox\",\"ability\":\"\"}&out_trade_no=20211215023844979652579806&total_amount=0.01&currency=USD&plan={\"name\":\"Plan Name\",\"description\":\"Plan Description\",\"status\":\"ACTIVE\",\"billing_cycles\":[{\"frequency\":{\"interval_unit\":\"day\",\"interval_count\":1},\"pricing_scheme\":{\"fixed_price\":{\"value\":\"0.01\",\"currency_code\":\"USD\"}},\"tenure_type\":\"REGULAR\",\"sequence\":1,\"total_cycles\":0}],\"payment_preferences\":{\"auto_bill_outstanding\":true}}&customer={\"name\":{\"first_name\": \"Chao\", \"last_name\": \"Wang\"},\"description\":\"Customer Description\",\"email\":\"m126@126.com\"}&sign=56b7c590b414f03e33fade6df14d02e7","urlObject":{"protocol":"https","path":["checkout"],"host":["p","yzhan","co"],"query":[{"description":{"content":"<p>APP ID：Generated after user creates app</p>\n","type":"text/plain"},"key":"app_id","value":"2021122412586601"},{"description":{"content":"<p>Request Time: Y-m-d H:i:s</p>\n","type":"text/plain"},"key":"request_time","value":"2021-12-15 02:38:44"},{"description":{"content":"<p>Noitfy Url: Url for asynchronous notification of payment results</p>\n","type":"text/plain"},"key":"notify_url","value":"https://p.yzhan.co/api/test/notify-url"},{"description":{"content":"<p>Cancel Url: Url returned after the user cancels the payment. Some channels, such as PayPal support</p>\n","type":"text/plain"},"key":"cancel_url","value":"https://p.yzhan.co/api/test/cancel-url"},{"description":{"content":"<p>Return Url: Synchronous return url after payment</p>\n","type":"text/plain"},"key":"return_url","value":"https://p.yzhan.co/api/test/return-url"},{"description":{"content":"<p>Products to checkout or subscribe<br />Create Product:<br />{\"name\":\"Product Name\",\"description\":\"Product Description\",\"type\":\"DIGITAL\",\"category\":\"AC_REFRIGERATION_REPAIR\",\"image_url\":\"<a href=\"https://image.com/url%22,%22url%22:%22https://url.com/url%22,%22list%22:%5B%7B%22name%22:%22Product\">https://image.com/url\",\"url\":\"https://url.com/url\",\"list\":[{\"name\":\"Product</a> Name 1\",\"description\":\"Product Description 1\"},{\"name\":\"Product Name 2\",\"description\":\"Product Description 2\"},{\"name\":\"Product Name 3\",\"description\":\"Product Description 3\"}]}  </p>\n<p>Update Prodcut By id:<br />{\"id\":2,\"name\":\"Product Name\",\"description\":\"Product Description\",\"email\":\"PHYSICAL\",\"category\":\"AC_REFRIGERATION_REPAIR\",\"image_url\":\"<a href=\"https://image.com/url%22,%22url%22:%22https://url.com/url%22,%22list%22:%5B%7B%22name%22:%22Product\">https://image.com/url\",\"url\":\"https://url.com/url\",\"list\":[{\"name\":\"Product</a> Name 1\",\"description\":\"Product Description 1\"},{\"name\":\"Product Name 2\",\"description\":\"Product Description 2\"},{\"name\":\"Product Name 3\",\"description\":\"Product Description 3\"}]}  </p>\n<p>Get Prodcut By id:<br />{\"id\":1}.</p>\n","type":"text/plain"},"key":"product","value":"{\"name\":\"Product Name\",\"description\":\"Product Description\",\"type\":\"DIGITAL\",\"category\":\"AC_REFRIGERATION_REPAIR\",\"image_url\":\"https://image.com/url\",\"url\":\"https://url.com/url\",\"status\":\"ACTIVE\",\"list\":[{\"name\":\"Prodcut Name 1\",\"description\":\"Product Description 1\"},{\"name\":\"Prodcut Name 2\",\"description\":\"Product Description 2\"}]}"},{"description":{"content":"<p>env: production | sandbox<br />ability: checkout | subscribe</p>\n","type":"text/plain"},"key":"channel","value":"{\"env\":\"sandbox\",\"ability\":\"\"}"},{"description":{"content":"<p>Checkout Required<br />Order number, please ensure it is unique in the app, <strong>wil return</strong></p>\n","type":"text/plain"},"key":"out_trade_no","value":"20211215023844979652579806"},{"description":{"content":"<p>Checkout Required<br />[0.01, 999999999]\nDisplay on checkout page<br />This value  is used to checkout<br />Plan of porducts is used to subscribe </p>\n","type":"text/plain"},"key":"total_amount","value":"0.01"},{"description":{"content":"<p>Checkout Required<br />USD | CNY<br />Display on checkout page<br />This value  is used to checkout<br />Plan of porducts is used to subscribe </p>\n","type":"text/plain"},"key":"currency","value":"USD"},{"description":{"content":"<p>Subscribe Required<br />Subscription Plan\nDisplay on checkout page<br />This value  is used to subscribe    </p>\n<p>Create Plan:<br />{\"name\":\"Plan Name\",\"description\":\"Plan Description\",\"status\":\"ACTIVE\",\"billing_cycles\":[{\"frequency\":{\"interval_unit\":\"month\",\"interval_count\":1},\"pricing_scheme\":{\"fixed_price\":{\"value\":\"0.01\",\"currency_code\":\"USD\"}},\"tenure_type\":\"REGULAR\",\"sequence\":1,\"total_cycles\":0}],\"payment_preferences\":{\"auto_bill_outstanding\":true}}   </p>\n<p>Update Plan By id:<br />{\"id\":2,\"name\":\"Plan Name\",\"description\":\"Plan Description\",\"status\":\"ACTIVE\",\"billing_cycles\":[{\"frequency\":{\"interval_unit\":\"month\",\"interval_count\":1},\"pricing_scheme\":{\"fixed_price\":{\"value\":\"0.01\",\"currency_code\":\"USD\"}},\"tenure_type\":\"REGULAR\",\"sequence\":1,\"total_cycles\":0}],\"payment_preferences\":{\"auto_bill_outstanding\":true}} </p>\n<p> Get Plan By id:<br />{\"id\":1}</p>\n","type":"text/plain"},"key":"plan","value":"{\"name\":\"Plan Name\",\"description\":\"Plan Description\",\"status\":\"ACTIVE\",\"billing_cycles\":[{\"frequency\":{\"interval_unit\":\"day\",\"interval_count\":1},\"pricing_scheme\":{\"fixed_price\":{\"value\":\"0.01\",\"currency_code\":\"USD\"}},\"tenure_type\":\"REGULAR\",\"sequence\":1,\"total_cycles\":0}],\"payment_preferences\":{\"auto_bill_outstanding\":true}}"},{"description":{"content":"<p>Subscribe Required<br />Subscription Customer<br />Display on checkout page<br />This value  is used to subscribe   </p>\n<p>Create Customer:<br />{\"name\":{\"first_name\": \"Chao\", \"last_name\": \"Wang\"},\"description\":\"Customer Description\",\"email\":\"<a href=\"mailto:new_customer_email@126.com\">new_customer_email@126.com</a>\",\"area_code\":\"86\",\"phone\":\"13036888204\"}      </p>\n<p>Update Customer By id:<br />{\"id\":2,\"name\":{\"first_name\": \"Chao\", \"last_name\": \"Wang\"},\"description\":\"Customer Description\",\"email\":\"<a href=\"mailto:change_customer_email@126.com\">change_customer_email@126.com</a>\",\"area_code\":\"86\",\"phone\":\"18636138869\"}</p>\n<p>Get Customer By id:<br />{“id”:1}. </p>\n","type":"text/plain"},"key":"customer","value":"{\"name\":{\"first_name\": \"Chao\", \"last_name\": \"Wang\"},\"description\":\"Customer Description\",\"email\":\"m126@126.com\"}"},{"description":{"content":"<p>How to create a sign：<br />Arrange keyName of all parameters (Except for sign ) in dictionary order, build a string\nPut secret_key (JS Web is bc3a4d13e427ee95f24cb65f24501208a6e0d8be) at the end\nGenerate md5 value as sign</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">public static function AuthSign($params, $secret_key = 'bc3a4d13e427ee95f24cb65f24501208a6e0d8be'){\n  $params = array_filter($params);\n  ksort($params);\n  return md5(urldecode(http_build_query($params)) . $secret_key);\n}\n</code></pre>\n","type":"text/plain"},"key":"sign","value":"56b7c590b414f03e33fade6df14d02e7"}],"variable":[]}},"response":[],"_postman_id":"f741f1f3-2841-4b8a-9515-14246ff8177f"}]}