Skip to content

✔ TypeScript types & documentation for incoming PayPal IPN requests

License

Notifications You must be signed in to change notification settings

JorgenVatle/paypal-ipn-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PayPal IPN Types

Tired of looking up PayPal's arguably terrible documentation every time you need to work with their IPN system?

This package contains TypeScript type definitions for all properties PayPal might pass to you on an IPN request along with documentation for each property.

Installation

Pull in the package from npm:

npm install paypal-ipn-types

Usage

Pull in the type definitions you need. For incoming IPNs, use the default export:

import PayPalIpn from 'paypal-ipn-types';

app.get('/paypal/ipn', (req, res) => {
    const ipn: PayPalIpn = req.data; // You should now have editor auto-completes for all IPN input values.
    
    console.log(ipn.payer_email);
});

Depending on your editor, you can also CTRL + CLICK on ipn.payer_email to get more information on the property.

Contributing

Contributions are more than welcome! If you spot a missing or incorrectly formatted or documented property, just submit a pull request.

If you're adding a type, please load and use for the property in paypal-ipn-types.test.ts.

License

This repository is licensed under the ISC license.

Copyright (c) 2019, Jørgen Vatle.

About

✔ TypeScript types & documentation for incoming PayPal IPN requests

Resources

License

Stars

Watchers

Forks

Packages

No packages published