AtaraPay Docs

AtaraPay Docs

  • Integration
  • API Reference

โ€บPayment Plugin

Integration Overview

  • Get Started
  • Ground-up Development
  • Framework Development

Authentication

  • Calculation of Auth Token

Payment Plugin

  • Inline Integration
  • Standard Integration
  • Go Live

eCommerce Plugin

  • WooCommerce Payment Plugin
  • Magento Payment Extension
  • Shopify Payment Plugin

Payouts

  • Service Provider API
  • Create Service Provider
  • Get Service Provider
  • Delete Service Provider
  • Update Order Commission (Business Seller)
  • Update Order Commission (Marketplace Operator)

Milestone Payments

  • Overview
  • Create Project
  • Update Project
  • Get Project

Order Status Automation

  • Overview
  • Delivery Completed API.
  • Seller Cancels Order API
  • Buyer Cancels Order API
  • Order Status API

Order Notification

  • Overview
  • Delivery Complete Notification
  • Buyer Accepts Order Notification
  • Buyer Rejects Order Notification
  • Buyer Cancels Order Notification
  • Buyer Cancels Disputed Order Notification
  • Seller Cancels Order Notification
  • Seller Cancels Disputed Order Notification
  • Second Delivery Attempt Notification
  • Generation of Security Token

Resources

  • Status Definition
  • Request for Bank Codes
  • Marketplace Integration

Inline Integration

1. Inline Integration

Add AtaraPay inline javascript and css files to your page

  • <link rel="stylesheet" href="https://plugins.atarapay.com/assets/test/trustpay.inline.min.css">
  • <script src="https://plugins.atarapay.com/assets/test/trustpay.inline.min.js"></script>

Add the following to your html body

<form id="trustpay-form">
    <button id="ataraPayButton" type="button" style="">
</form>

Note: The Button is not styled. Style the Button to fit.

Add Functionality to the Button

var payWithTrustpay = function () {
    my-api-key = 'your-api-key'
    merchant = new Merchant({api_key:my-api-key});
            handler = TrustPay.setup(merchant);
            handler.initialize(customer_email, customer_phone_number, {
                type : 1,
                currency: NGN or USD,
                amount: order_price,
                amount_fx: order_price_in_USD,
                customer_firstname: first_name,
                customer_lastname: last_name,
                order_product_id: product_id,
                order_product_name: product_name,
                order_product_desc: product_description,
                recipient: order_recipient,
                delivery_date: order_delivery_date,
                delivery_location: order_delivery_location,
                is_marketplace: 0,
                seller_phone: null,
                callback_url: success_redirection_URL
            });
}
Field nameRequiredDescription
currencyYesTransaction Currency (NGN or USD)
amountYesAmount in kobo
amount_fxYesAmount converted to USD (required if currency is USD)
customer_firstnameYesCustomer's First name
customer_lastnameYesCustomer's Last name
order_product_idYesThe seller's product ID
order_product_nameYesThe seller's product name
order_product_descOptionalThe seller's product Description
delivery_dateYesThe seller's delivery date
delivery_locationYesThe customer's delivery location
recipientYesThe phone number of the customer
typeYesTransaction type (Always set to 1)
is_marketplaceOptionalset to 1 if the merchant is registered as a Marketplace Operator on Atarapay's platform
seller_phoneYesThe AtaraPay phone number of the merchant's service provider that is registered with AtaraPay (if is_marketplace = 1)
callback_urlYesCallback link to receive response and status from AtaraPay

Marketplace Seller Option

If you are registered as a Marketplace Operator, please set the is_marketplace parameter to 1 and seller_phone parameter to thephone number of a valid atarapay seller account on your store, but if you are registered as a Business Seller, you can leave the is_marketplace parameter as 0 and set seller_phone to null.

Your marketplace app can be integrated to AtaraPay by registering with either the Marketplace Operator or Business Seller role. For details on the differences they offer, click here.

Add the function to you the button

<form id="trustpay-form"><button id="trustpayButton" type="button" style="" onclick="payWithTrustpay()"></form>

All the fields are required.

Next Step

You should have a modal/pop-up appear after button is clicked, once you see this you are good to go ๐Ÿ˜Š๐Ÿš€

Contact Us

For Further Details Please Contact TrustPay for Platform API

โ† Calculation of Auth TokenStandard Integration โ†’
  • 1. Inline Integration
    • Add AtaraPay inline javascript and css files to your page
    • Add the following to your html body
    • Add Functionality to the Button
    • Marketplace Seller Option
    • Next Step
  • Contact Us
Docs
IntegrationeCommerce PluginsAPI ReferenceAtaraPay
Other Links
About UsFrequently Asked QuestionsReport a Bug
Merchants
BenefitsOur Merchants
Follow @atarapayonline
AtaraPay
Copyright ยฉ 2022 AtaraPay