title: How to create a required property and used it for an API?
body: <p>I'm new to using API and i'm currently building a site and i want to accept payments, i get the documentation but how can i do this in easy and noob way? like how and where do i put the payload and how do i access said payload?, thanks in advance guys</p>
  <p><strong>usage</strong></p>
  <pre><code>import Paymongo from 'paymongo';
  
  // Retrieve the secret key from your paymongo 
  // dashboard under developers tab.
  const paymongo = new Paymongo(process.env.SECRET_KEY);
  </code></pre>
  <p><strong>Payment Method - create</strong></p>
  <pre><code>/**
   * These are the required properties
   * @param {Object} data The payload.
   * @param {Object} data.attributes Payload attributes.
   * @param {string} data.attributes.type The type of payment method. The possible value is card for now.
   * @param {string} data.attributes.details.card_number Credit/Debit Card number of the PaymentMethod.
   * @param {number} data.attributes.details.exp_month Expiry month of the Credit/Debit Card.
   * @param {number} data.attributes.details.exp_year Expiry year of the Credit/Debit Card.
   * @param {string} data.attributes.details.cvc CVC of the Credit/Debit Card.
   */
  const result = await paymongo.paymentMethods.create(data);
  </code></pre>
  <p><strong>Payload</strong></p>
  <pre><code>{
    data: {
      attributes: {
        type: 'card' // The only available type for now is 'card'.
        details: {
          card_number: '000000000000',
          exp_month: 02,
          exp_year: 23,
          cvc: '123',
        }
      }
    }
  }
  </code></pre>