Onboarding

Develop a multi-party integration to facilitate payments and payouts to your sellers.

To establish a synced account via the Notch Pay API, it's necessary to provide detailed merchant information, including the company name, address, and contact details.

Additionally, defining the fees associated with syncing the account is crucial, as they may vary depending on the services and features available. Simultaneously, specifying the permissions required for account synchronization is essential, allowing the merchant to access relevant functionalities such as payment and refund management in accordance with Notch Pay's policies.

Here's how the process works:

  1. Initiate a call to our API account endpoint from your server, providing the synchronization details.
  2. We'll furnish a link to a synchronization page. Redirect your merchant to this link for authorization of the synchronization.
  3. Upon authorization of the synchronization, we'll redirect the merchant back to you (to the callback you provided), accompanied by the sync details.

Step 1: Create a synced account

To initiate the synchronization process, it's essential to gather certain details like email, phone, percentage, capabilities, and more. These merchant specifics can be retrieved from various sources such as an established database, session/cookie records, or through form submissions.

Important notes

  1. The email represent the merchant email.
  2. The percentage Indicates the commission rate you wish to deduct from your sellers' payments.
  3. The callback was established within the payment data array.
  4. The capabilities are the permissions you seek to acquire from the synchronized account, which include access to payments, customers, and transfers.

Example request

    $url = "https://api.notchpay.co/accounts";

    $fields = [
        'email' => "merchant@email.com",
        'percentage' => 5,
        'capabilities' => [payments,customers],
        'callback' => 'your_callback_url'
    ];

    //open connection
    $ch = curl_init();
    
    //set the url, number of POST vars, POST data
    curl_setopt($ch,CURLOPT_URL, $url);
    curl_setopt($ch,CURLOPT_POST, true);
    curl_setopt($ch,CURLOPT_POSTFIELDS, $fields);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        "Authorization: PUBLIC_KEY",
        "Cache-Control: no-cache",
    ));
    
    //So that curl_exec returns the contents of the cURL; rather than echoing it
    curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); 
    
    //execute post
    $result = curl_exec($ch);
    echo $result;

Example response

{
  "status": "Accepted",
  "message": "Sync initialized",
  "code": 201,
  "account": {
    "sandbox": false,
    "capabilities": [
      "payments",
      "customers"
    ],
    "meta": null,
    "percentage": "5",
    "callback": "https://notchpay.co",
    "reference": null,
    "business": null,
    "status": "pending",
    "created_at": "2024-04-28T00:44:01.000000Z",
    "updated_at": "2024-04-28T00:44:01.000000Z",
    "id": "sync.bEJMflj7D6dqimMUGR2sm49J"
  },
  "access_token": "8f057739e6223ac7bb174545942050c63a6bc8faffb88aaeb9c102216d8a7dec",
  "authorization_url": "https://sync.notchpay.co/oauth/v2/authorize?access_token=8f057739e6223ac7bb174545942050c63a6bc8faffb88aaeb9c102216d8a7dec"
}

Step 2: Redirect your user to our Hosted Payment Page

All you need to do is redirect your seller to the link returned in authorization_url.

Step 3: After Synchronization

Once the payment is completed, whether successful or failed, several actions will take place:

  1. We redirect to your callback_url with the status, reference, and status included in the query parameters.
  2. If you have activated webhooks, we will send you a webhook notification. For more details on webhooks and examples, please refer to our webhooks guide.

On the server side, it's essential to handle the redirection and always verify the final status of the synchronization.

Status

All synchronization operations are subject to various statuses, which are as follows:

StatusStateDescription
pendingTransitionalSynchronization has been initiated and awaits seller completion on the hosted page.
canceledMixedSynchronization has been cancelled. Can be retry with new authorization.
closedFinalSynchronization has closed. This status is final.
syncedMixedSynchronization has been successfully completed. This status is final but can be closed.

Copyright © 2024 Notch Pay