💸
Paymongo for Node.js
OSSPHBlog
  • Paymongo for Node.js!
  • Quick Start
  • Reference
    • API Reference
      • Links
      • Payments
      • Payment Intents
      • Payment Methods
      • Refunds
      • Sources
      • Webhooks
  • Test Cards
  • Change Logs
  • FAQs
Powered by GitBook
On this page
  • The Link Resource
  • Creating a Link
  • Retrieving a Link
  • Get Link by Reference Number
  • Archive a Link
  • Unarchive a Link

Was this helpful?

Export as PDF
  1. Reference
  2. API Reference

Links

A Link resource represents a one-time use link to receive a payment.

PreviousAPI ReferenceNextPayments

Last updated 2 years ago

Was this helpful?

The Link Resource

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);
More Details