Skip to main content

General Guide

About Direct API Checkout

Direct API Checkout is a payment method that allows you to accept payments directly on your website. This method is ideal for merchants who want to have full control over the payment process and user experience. With Direct API Checkout, you can customize the payment flow to match your website's design and branding.

To take note however, you should be PCI compliant to use Direct API Checkout. PCI compliance ensures that your customers' payment information is handled securely and that your website meets the necessary security standards.

General Steps

To implement Direct API Checkout on your website, follow these general steps:

  1. Create an Account: If you haven't already, create an account on NGnair. You will need an account to access the NGnair Payments API and generate API keys.
  2. Onboard a Merchant Account: Once you have an account, onboard a merchant account to start accepting payments.
  3. Generate API Keys: To use the NGnair Payments API, you will need to generate API keys. These keys will authenticate your requests to the NGnair Payments API.
  4. Generate a paymentData: This will contain the line items and total amount of the transaction. You can check here for the API Reference.
  5. Ask for Customer's Payment Info and Tokenize it: Use our Payment Method Collection to securely collect Customer's Information and still adhering to PCI and security compliances. Tutorials here.
  6. Show computed cart cost: To get accurate and up-to-date cart cost, you can use the getCartCost API. This will return the total amount of the cart, including taxes, shipping, and discounts.
  7. Commit Payment: Given the paymentData and customer details, you can now commit the payment. This will process the payment and return a payment response.