AtaraPay Docs

AtaraPay Docs

  • Integration
  • API Reference

›Payouts

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

Create Service Provider

This API is used to add/ update the details of each Service Provider associated with the seller or marketplace operator. 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/serviceprovider/create
for live: https://api.atarapay.com/api/serviceprovider/create
Field nameRequiredDescription
authtokenYesThis is calculated using the steps mentioned here Calculation of Auth Token
bank_codeYesThis is a 3-digit numeric code to identify the bank
nip_bank_codeYesThis is a 6-digit numeric code to identify the bank
bank_account_numberYesThis is the bank account number of the Service Provider where the funds would be transferred to
bank_account_nameYesBank account name of the Service Provider
bank_nameYesName of the Bank used by the Service Provider
emailOptionalEmail address of the Service Provider
phoneOptionalPhone number of the Service Provider
firstnameOptionalFirst name of the Service Provider
lastnameOptionalLast name of the Service Provider

Successfull Response

{
    "status": "success",
    "message": "Service Provider Updated successfully",
    "data": {
        "id": 4,
        "firstname": "Emeka",
        "lastname": "Adeniyi",
        "phone": "+2348082094382",
        "email": "emeka.adeniyi@atarapay.com",
        "bank_code": "221",
        "nip_bank_code": "000000",
        "bank_name": "Axis",
        "bank_account_name": "Emeka Adeniyi",
        "bank_account_number": "1234567890",
        "recipient_code": null,
        "created_at": "2020-02-20 16:54:01",
        "updated_at": "2020-02-24 21:20:59"
    }
}

Failure Response

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

Sample codes

C#

var client = new RestClient("http://test-api.atarapay.com/api/serviceprovider/create");
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", "email=__Service_Provider_Email__&phone=__Service_Provider_Phone__&firstname=__Service_Provider_Firstname__&lastname=__Service_Provider_Lastname__&authtoken=__Auth_token_calculated__&bank_code=__Service_Provider_Bank_Code__&nip_bank_code=__Service_Provider_NIP_Bank_Code__&bank_account_number=__Service_Provider_Bank_Account_Number__&bank_account_name=__Service_Provider_Bank_Account_Name__&bank_name=__Service_Provider_Bank_Name__", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

PHP

$request = new HttpRequest();
$request->setUrl('http://test-api.atarapay.com/api/serviceprovider/create');
$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(
  'email' => '__Service_Provider_Email__',
  'phone' => '__Service_Provider_Phone__',
  'firstname' => '__Service_Provider_Firstname__',
  'lastname' => '__Service_Provider_Lastname__',
  'authtoken' => '__Auth_token_calculated__',
  'bank_code' => '__Service_Provider_Bank_Code__',
  'nip_bank_code' => '__Service_Provider_NIP_Bank_Code__',
  'bank_account_number' => '__Service_Provider_Bank_Account_Number__',
  'bank_account_name' => '__Service_Provider_Bank_Account_Name__',
  'bank_name' => '__Service_Provider_Bank_Name__'
));

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/serviceprovider/create");

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

req.form({
  "email": "__Service_Provider_Email__",
  "phone": "__Service_Provider_Phone__",
  "firstname": "__Service_Provider_Firstname__",
  "lastname": "__Service_Provider_Lastname__",
  "authtoken": "__Auth_token_calculated__",
  "bank_code": "__Service_Provider_Bank_Code__",
  "nip_bank_code": "__Service_Provider_NIP_Bank_Code__",
  "bank_account_number": "__Service_Provider_Bank_Account_Number__",
  "bank_account_name": "__Service_Provider_Bank_Account_Name__",
  "bank_name": "__Service_Provider_Bank_Name__"
});

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

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

← Service Provider APIGet Service Provider →
Docs
IntegrationeCommerce PluginsAPI ReferenceAtaraPay
Other Links
About UsFrequently Asked QuestionsReport a Bug
Merchants
BenefitsOur Merchants
Follow @atarapayonline
AtaraPay
Copyright © 2022 AtaraPay