AtaraPay Docs

AtaraPay Docs

  • Integration
  • API Reference

›Milestone Payments

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
  • Get Bank Details
  • Marketplace Integration
  • Product Features List

Get Projects

This API is used to get the project for milestone transaction payments. Below are the fields that are to be sent via API using POST Method to the Url:

For Staging: http://test-api.atarapay.com/api/project/getExternalProjects
for live: https://api.atarapay.com/api/project/getExternalProjects
Field nameRequiredDescription
authtokenYesThis is calculated using the steps mentioned here Calculation of Auth Token

Successfull Response

{
    "status": "success",
    "message": "project_data",
    "data": {
        "id": 1,
        "seller_id": 120,
        "customer_id": 281,
        "project_name": "Eko Atlantic city",
        "description": "This is a building project payments in milestone",
        "started_by": null,
        "status": 0,
        "created_at": "2021-03-24 20:35:47",
        "updated_at": "2021-03-24 20:45:43",
        "transaction": [],
        "seller": {
            "id": 120,
            "is_marketplace": null,
            "marketplace_child": null,
            "individual": 1,
            "business_name": null,
            "business_address": null,
            "business_address_2": null,
            "business_city": null,
            "business_state": null,
            "business_country": null,
            "business_email": null,
            "year_of_inc": null,
            "cac_certificate": null,
            "memorandum_of_article": null,
            "company_profile": null,
            "siteURL": null,
            "test": "",
            "comments": "",
            "deleted_at": null,
            "created_at": "2019-08-29 17:58:26",
            "updated_at": "2019-08-29 17:58:26"
        },
        "customer": {
            "id": 281,
            "firstname": "Ogundele",
            "lastname": "Damilare",
            "phone_number": "+2348111904455",
            "phone_number_alt": null,
            "email": "iconcept573@gmail.com",
            "otp_date": "2019-08-30 17:43:36",
            "status": 1,
            "reg_type": null,
            "deleted_at": null,
            "suspend_reason": null,
            "test": "",
            "comments": "",
            "created_at": "2019-08-29 19:27:28",
            "updated_at": "2020-11-16 12:08:33"
        }
    }
}

Failure Response

{
    "status": "error",
    "message": "The authtoken field is required."
}

Sample codes

C#

var client = new RestClient("http://test-api.atarapay.com/api/project/getProjectsEx");
var request = new RestRequest(Method.POST);;
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("application/x-www-form-urlencoded", "authtoken=__authtoken__", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

PHP

$request = new HttpRequest();
$request->setUrl('http://test-api.atarapay.com/api/project/getProjectsEx');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'content-type' => 'application/x-www-form-urlencoded'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'authtoken' => '__Auth_token_calculated__'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

Node Js

var unirest = require("unirest");

var req = unirest("POST", "http://test-api.atarapay.com/api/project/getProjectsEx");

req.headers({
  "cache-control": "no-cache",
  "content-type": "application/x-www-form-urlencoded"
});

req.form({
  "authtoken": "__Auth_token_calculated__",
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});

← Update ProjectNext →
Docs
IntegrationeCommerce PluginsAPI ReferenceAtaraPay
Other Links
About UsFrequently Asked QuestionsReport a Bug
Merchants
BenefitsOur Merchants
Follow @atarapayonline
AtaraPay
Copyright © 2024 AtaraPay