{"id":28272213,"url":"https://github.com/paymentwall/paymentwall-node","last_synced_at":"2025-09-07T11:45:01.525Z","repository":{"id":13156127,"uuid":"15838864","full_name":"paymentwall/paymentwall-node","owner":"paymentwall","description":"Paymentwall Node.js Library","archived":false,"fork":false,"pushed_at":"2025-07-29T10:08:37.000Z","size":109,"stargazers_count":44,"open_issues_count":11,"forks_count":28,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-15T05:34:04.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"pisskop/PKs_Rebalancing","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paymentwall.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-01-12T08:15:57.000Z","updated_at":"2025-07-29T10:08:42.000Z","dependencies_parsed_at":"2025-06-17T13:31:00.437Z","dependency_job_id":"6384b4cf-b322-4357-843b-dab77da6b125","html_url":"https://github.com/paymentwall/paymentwall-node","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/paymentwall/paymentwall-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paymentwall","download_url":"https://codeload.github.com/paymentwall/paymentwall-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-node/sbom","scorecard":{"id":724464,"data":{"date":"2025-08-11","repo":{"name":"github.com/paymentwall/paymentwall-node","commit":"d531bc4dd798cd67b7b903eb694c08f843b63637"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 6/22 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: 'stale review dismissal' is disabled on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Warn: codeowners review is not required on branch 'master'","Warn: 'last push approval' is disabled on branch 'master'","Warn: no status checks found to merge onto branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T12:21:49.082Z","repository_id":13156127,"created_at":"2025-08-22T12:21:49.082Z","updated_at":"2025-08-22T12:21:49.082Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274032056,"owners_count":25210784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-20T19:24:43.576Z","updated_at":"2025-09-07T11:45:01.516Z","avatar_url":"https://github.com/paymentwall.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About Paymentwall\n[Paymentwall](http://paymentwall.com/?source=gh-node) is the leading digital payments platform for globally monetizing digital goods and services. Paymentwall assists game publishers, dating sites, rewards sites, SaaS companies and many other verticals to monetize their digital content and services. \nMerchants can plugin Paymentwall's API to accept payments from over 100 different methods including credit cards, debit cards, bank transfers, SMS/Mobile payments, prepaid cards, eWallets, landline payments and others. \n\nTo sign up for a Paymentwall Merchant Account, [click here](http://paymentwall.com/signup/merchant?source=gh-node).\n\n# Paymentwall Node.js Library\nThis library allows developers to use [Paymentwall APIs](http://paymentwall.com/en/documentation/API-Documentation/722?source=gh-node) (Virtual Currency, Digital Goods featuring recurring billing, and Virtual Cart).\n\nTo use Paymentwall, all you need to do is to sign up for a Paymentwall Merchant Account so you can setup an Application designed for your site.\nTo open your merchant account and set up an application, you can [sign up here](http://paymentwall.com/signup/merchant?source=gh-node).\n\n# Installation\nTo install the library in your environment, simply run the following command:\n\n```\nnpm install paymentwall\n```\n\nThen use a code sample below.\n\n# Code Samples\n\n## Checkout API\n\n[Web API details](https://docs.paymentwall.com/apis#section-checkout-onetime)\n\n#### Initializing Paymentwall\n\n```javascript\nvar Paymentwall = require('paymentwall');\nPaymentwall.Configure(\n  Paymentwall.Base.API_GOODS,\n  'YOUR_APPLICATION_KEY',\n  'YOUR_SECRET_KEY'\n);\n```\n\n#### Widget Call\n\nThe widget is a payment page hosted by Paymentwall that embeds the entire payment flow: selecting the payment method, completing the billing details, and providing customer support via the Help section. You can redirect the users to this page or embed it via iframe. The sample code below renders an iframe with Paymentwall Widget.\n\n```javascript\nvar widget = new Paymentwall.Widget(\n  'user40012',                                // id of the end-user who's making the payment\n  'pw',                                       // widget code, e.g. pw; can be picked in the Widgets section of your merchant account \n  [                                           // product details for Flexible Widget Call. \n    new Paymentwall.Product(\n        'product301',                         // ag_external_id\n        12.12,                                // amount\n        'USD',                                // currencyCode\n        'test',                               // ag_name\n        Product.TYPE_FIXED                    // ag_type\n    )\n  ],\n  {'email': 'user@hostname.com'}              // additional parameters. for full list check API docs\n);\nconsole.log(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\nThe Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:\n\n```javascript\nvar pingback = new Paymentwall.Pingback(\"query data in pingback request\", \"ip address of pingback\");\nif (pingback.validate()) {\n  var productId = pingback.getProduct().getId();\n  if (pingback.isDeliverable()) {\n    // deliver the product\n  } else if (pingback.isCancelable()) {\n    // withdraw the product\n  } \n  console.log('OK'); // Paymentwall expects the string OK in response, otherwise the pingback will be resent\n} else {\n  console.log(pingback.getErrorSummary());\n}\n```\n\n## Digital Goods API\n\n[Web API details](https://docs.paymentwall.com/apis#section-widget-dg)\n\n#### Initializing Paymentwall\n\n```javascript\nvar Paymentwall = require('paymentwall');\nPaymentwall.Configure(\n  Paymentwall.Base.API_GOODS,\n  'YOUR_APPLICATION_KEY',\n  'YOUR_SECRET_KEY'\n);\n```\n\n#### Widget Call\n\nThe widget is a payment page hosted by Paymentwall that embeds the entire payment flow: selecting the payment method, completing the billing details, and providing customer support via the Help section. You can redirect the users to this page or embed it via iframe. The sample code below renders an iframe with Paymentwall Widget.\n\n```javascript\nvar widget = new Paymentwall.Widget(\n  'user40012',                                // id of the end-user who's making the payment\n  'pw',                                       // widget code, e.g. pw; can be picked in the Widgets section of your merchant account \n  [],                                         // empty for digital goods api\n  {'email': 'user@hostname.com'}              // additional parameters. for full list check API docs\n);\nconsole.log(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\nThe Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:\n\n```javascript\nvar pingback = new Paymentwall.Pingback(\"query data in pingback request\", \"ip address of pingback\");\nif (pingback.validate()) {\n  var productId = pingback.getProduct().getId();\n  if (pingback.isDeliverable()) {\n    // deliver the product\n  } else if (pingback.isCancelable()) {\n    // withdraw the product\n  } \n  console.log('OK'); // Paymentwall expects the string OK in response, otherwise the pingback will be resent\n} else {\n  console.log(pingback.getErrorSummary());\n}\n```\n\n## Virtual Currency API\n\n[Web API Details](https://www.paymentwall.com/en/documentation/Virtual-Currency-API/711)\n\n#### Initializing Paymentwall\n\n```javascript\nvar Paymentwall = require('paymentwall');\nPaymentwall.Configure(\n  Paymentwall.Base.API_VC,\n  'YOUR_APPLICATION_KEY',\n  'YOUR_SECRET_KEY'\n);\n```\n\n#### Widget Call\n\n```javascript\nvar widget = new Paymentwall.Widget(\n  'user40012',\n  'p10',\n  [],\n  {'email': 'user@hostname.com'}\n);\nconsole.log(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\n```javascript\nvar pingback = new Paymentwall.Pingback(\"query data in pingback request\", \"ip address of pingback\");\nif (pingback.validate()) {\n  var virtualCurrency = pingback.getVirtualCurrencyAmount();\n  if (pingback.isDeliverable()) {\n    // deliver the virtual currency\n  } else if (pingback.isCancelable()) {\n    // withdraw the virtual currency\n  } \n  console.log('OK'); // Paymentwall expects the string OK in response, otherwise the pingback will be resent\n} else {\n  console.log(pingback.getErrorSummary());\n}\n```\n\n## Cart API\n\n[Web API Details](https://www.paymentwall.com/en/documentation/Shopping-Cart-API/1098)\n\n#### Initializing Paymentwall\n\n```javascript\nvar Paymentwall = require('paymentwall');\nPaymentwall.Configure(\n  Paymentwall.Base.API_CART,\n  'YOUR_APPLICATION_KEY',\n  'YOUR_SECRET_KEY'\n);\n```\n\n#### Widget Call\n\n```javascript\nvar widget = new Paymentwall.Widget(\n  'user40012',\n  'p10',\n  [\n    new Paymentwall.Product('product301', 3.33, 'EUR'), // first product in cart\n    new Paymentwall.Product('product607', 7.77, 'EUR')  // second product in cart\n  ],\n  {'email': 'user@hostname.com'}\n);\nconsole.log(widget.getHtmlCode());\n```\n\n#### Pingback Processing\n\n```javascript\nvar pingback = new Paymentwall.Pingback(\"query data in pingback request\", \"ip address of pingback\");\nif (pingback.validate()) {\n  var productId = pingback.getProduct().getId();\n  if (pingback.isDeliverable()) {\n    // deliver the product\n  } else if (pingback.isCancelable()) {\n    // withdraw the product\n  } \n  console.log('OK'); // Paymentwall expects the string OK in response, otherwise the pingback will be resent\n} else {\n  console.log(pingback.getErrorSummary());\n}\n```\n## Brick API\n\n[Web API details](https://www.paymentwall.com/en/documentation/Brick/2968)\n\n#### Initializing Paymentwall\n\n```javascript\nvar Paymentwall = require('paymentwall');\nPaymentwall.Configure(\n  Paymentwall.Base.API_GOODS,\n  'YOUR_APPLICATION_KEY',\n  'YOUR_SECRET_KEY'\n);\n```\n\n#### Create a one-time token\n\n```javascript\nvar onetimetoken = new Paymentwall.Onetimetoken(\n  4000000000000002, // Card number, digits only\n  01,               // Expiration month, 2 digits from 01 to 12\n  2017,             // Expiration year, 4 digits\n  222               // CVC/CVV, 3-4 digits\n);\n\nonetimetoken.createOnetimetoken(function(response){\n  // response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  if(response.isSuccessful()){\n    if(response.isActivated()){\n      token = response.getOnetimeToken();         //get onetimetoken\n      card = response.getCardInfo();              //get card information    \n    }\n  } else{\n    error_code = response.getErrorCode();\n    error_details = response.getErrorDetails();\n  };\n  console.log(response.getFullResponse());\n});\n```\n\n#### Charge\n\n```javascript\nconst data = req.body;\nlet extraParams = {\n    'customer[firstname]': data.firstname,\n    'customer[lastname]': data.lastname,\n    'customer[zip]': '1000'\n};\n\n// append 3DS data\nif (data.hasOwnProperty('brick_charge_id') \u0026\u0026 data.hasOwnProperty('brick_secure_token')) {\n    extraParams = Object.assign(extraParams, {\n        charge_id: data.brick_charge_id,\n        secure_token: data.brick_secure_token,\n    })\n}\n\nvar charge = new Paymentwall.Charge(\n    0.5,                                 //price\n    'USD',                               //currency code\n    'description',                       //description of the product\n    data.email,             // user's email which can be gotten by req.body.email\n    data.brick_fingerprint,                       // fingerprint which can be gotten by req.body.brick_fingerprint\n    data.brick_token,                      //one-time token\n    extraParams  //custom parameters\n);\n\ncharge.createCharge(function(brick_response){\n    // brick_response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n    if(brick_response.isSuccessful()){\n        if(brick_response.isCaptured()){\n            //deliver goods to user\n        } else if(brick_response.isUnderReview()){\n            //under risk review\n        }\n    } else{\n        const error_code = brick_response.getErrorCode();         //handle error\n        const error_details = brick_response.getErrorDetails();\n    }\n    res.json(brick_response.getBrickResponse())\n});\n```\n\n#### Charge Details\n\n```javascript\n//get the charge details through chargeid\nvar charge = new Paymentwall.Charge();\ncharge.otherOperation(chargeid,'detail',function(brick_response){\n  // brick_response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  brick_response.getFullResponse();                      // get full response content in String format\n  brick_response.getFullResponse('JSON');                // get full response content in JSON format\n});\n```\n\n#### Charge-capture\n\n```javascript\n//capture a charge through chargeid\nvar charge = new Paymentwall.Charge();\ncharge.otherOperation(chargeid,'capture',function(brick_response){\n  // brick_response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  brick_response.getFullResponse();                      // get full response content in String format\n  brick_response.getFullResponse('JSON');                // get full response content in JSON format\n});\n```\n\n#### Charge-void\n\n```javascript\n//void a charge through chargeid\nvar charge = new Paymentwall.Charge();\ncharge.otherOperation(chargeid,'void',function(brick_response){\n  // response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  brick_response.getFullResponse();                     // get full response content in String format\n  brick_response.getFullResponse('JSON');               // get full response content in JSON format\n});\n```\n\n#### Charge-refund\n\n```javascript\n//refund a charge through chargeid\nvar charge = new Paymentwall.Charge();\ncharge.otherOperation(chargeid,'refund',function(brick_response){\n  // response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  brick_response.getFullResponse();                      // get full response content in String format\n  brick_response.getFullResponse('JSON');                // get full response content in JSON format\n});\n```\n\n#### Subscription\n\n```javascript\n//create a subscription\nvar subscription = new Paymentwall.Subscription(\n  0.5,                                 //price\n  'USD',                               //currency code\n  'description',                       //description of the product\n  'useremail@example.com',             // user's email which can be gotten by req.body.email\n  'fingerprint',                       // fingerprint which can be gotten by req.body.brick_fingerprint\n  'onetimetoken',                      //one-time token\n  'day',                               // day/week/month/year\n  3,                                   // duration\n  {\n    // parameters for trial period\n    'trial[amount]':0.5,\n    'trial[currency]':'USD',\n    'trial[period]':'day',\n    'trial[period_duration]':3\n  },\n  {'custom[User_prfile_API]':'Value'}  //custom parameters, if there is a trail, plan is required\n);\n\nsubscription.createSubscription(function(brick_response){\n  // brick_response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  if(brick_response.isSuccessful()){\n    if(brick_response.isActivated()\u0026\u0026brick_response.isStarted()){\n      subscription_id = getSubscriptionId();\n      charge_id = brick_response.getChargeId();         //deliver goods to user\n    } else if(brick_response.isUnderReview()){          \n      subscription_id = getSubscriptionId();\n      charge_id = brick_response.getChargeId();         //under risk review\n    } else if(brick_response.isUnder3DSecure()){        \n      return_page = brick_response.get3DHtml();             //return 3D secure page\n    };\n  } else{\n    error_code = brick_response.getErrorCode();         //handle error\n    error_details = brick_response.getErrorDetails();\n  };\n\n  brick_response.getFullResponse();                      // get full response content in String format\n  brick_response.getFullResponse('JSON');                // get full response content in JSON format\n});\n```\n\n#### Subscription-details\n\n```javascript\n//get the subscription details through subscriptionid\nvar subscription = new Paymentwall.Subscription();\nsubscription.otherOperation(subscriptionid,'detail',function(response){\n  // response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  response.getFullResponse();                      // get full response content in String format\n  response.getFullResponse('JSON');                // get full response content in JSON format\n});\n```\n\n#### Subscription-cancel\n\n```javascript\n//cancel a subscription through subscriptionid\nvar subscription = new Paymentwall.Subscription();\nsubscription.otherOperation(subscriptionid,'cancel',function(response){\n  // response is a new Response Object Entity (defined in paymentwall/lib/Response/Abstract)\n  response.getFullResponse();                      // get full response content in String format\n  response.getFullResponse('JSON');                // get full response content in JSON format\n});\n```\n\n#### Pingback Processing\n\nThe Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:\n\n```javascript\nvar pingback = new Paymentwall.Pingback(\"query data in pingback request\", \"ip address of pingback\");\nif (pingback.validate()) {\n  var productId = pingback.getProduct().getId();\n  if (pingback.isDeliverable()) {\n    // deliver the product\n  } else if (pingback.isCancelable()) {\n    // withdraw the product\n  } \n  console.log('OK'); // Paymentwall expects the string OK in response, otherwise the pingback will be resent\n} else {\n  console.log(pingback.getErrorSummary());\n}\n```\n\n## Signature API\n\n[Web API details](https://www.paymentwall.com/en/documentation/Signature-Calculation/2313)\n\n#### Widget Signature\n\n```javascript\nvar Paymentwall = require('paymentwall');\nvar widget_signature = Paymentwall.WidgetSignature.calculateSignature(parameters,secret_key, signature_version);\n```\n\n#### Pingback Signature\n\n```javascript\nvar Paymentwall = require('paymentwall');\nvar pingback_signature = Paymentwall.PingbackSignature.calculateSignature(parameters,secret_key, signature_version);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaymentwall%2Fpaymentwall-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaymentwall%2Fpaymentwall-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaymentwall%2Fpaymentwall-node/lists"}