A Link resource represents a one-time use link to receive a payment.
Creating a Link
/**
* These are the required properties
* @param {Object} data Data payload
* @param {Object} data.attributes Payload attributes see full refence https://developers.paymongo.com/reference/links-resource#a-link-resource
*/
const result = await paymongo.links.create(data);
Retrieving a Link
/**
* @param {string} id The Link id
*/
const result = await paymongo.links.retrieve(id);
Get Link by Reference Number
/**
* @param {string} id The Link reference number
*/
const result = await paymongo.links.getByRef(reference_number);
Archive a Link
/**
* @param {string} id The Link id
*/
const result = await paymongo.links.archive(id);
Unarchive a Link
/**
* @param {string} id The Link id
*/
const result = await paymongo.links.unarchive(id);