API explorerChangelog

Dark mode

Introduction

Coinfinacle Pay allows users to securely integrate payment processing functionality into their applications by using access key, and secret key. This section enables users to facilitate online payments seamlessly within their platform, enhancing the overall user experience and streamlining transaction processes.

To access these APIs you will need an active accessKey, and secreatKey that has been you been obtain trhough us or generated on our platform.

🚀 Just getting started?

Check out our Quickstart Guide.

🗓️ Need any assistance?

Book a meeting

Was this section helpful?

What made this section unhelpful for you?

Basic of API

Our Standard HTTP Status Codes

HTTP status codes communicate the outcome of client requests. Coinfinacle employs some standard HTTP status codes categorized into the following classes:

  • 200 (Success): The request was successfully processed.
    • Example: Successfully retrieved a resource or completed an action.
  • 400 (Bad Request): The server could not understand the request due to invalid syntax.
    • Example: Missing required parameters in the request.
  • 401 (Unauthorized): Authentication is required and has failed or has not yet been provided.
    • Example: Invalid or missing API key.
  • 402 (Request Failed): The parameters were valid but the request failed.
    • Example: Insufficient funds or expired credit card.
  • 403 (Forbidden): The client does not have access rights to the content.
    • Example: Attempting to access a resource without the necessary permissions.
  • 404 (Not Found): The server can not find the requested resource.
    • Example: Trying to access an endpoint that does not exist.
Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

https://pay.coinfinacle.com/api/v2/peatio/

Authentication

When it comes to interacting with APIs, authentication is performed via HTTP Basic Auth. This method verifies your identity and grants you access to the API's resources, ensuring that only authorized users can make requests.

Coinfincale APIs uses API keys (access & secret) to authenticate requests.

To retrieve your API key, follow these steps:

  1. Sign in: Navigate to pay.coinfinacle.com/login and sign in with your credentials.
  2. User Settings: Once logged in, locate the user settings.
  3. Locate API Key: In the settings/api tab, you should find your API key listed.
  4. Generate Key: In case of revoked or expired keys you can generate through by enabling Two Factor Auth and follwoing instruction on our API page.

Enable Two-Factor Authentication before generating API keys, as it will be required for managing and creating them. https://pay.coinfinacle.com/dashboard/settings/security

Add headers to an HTTP request

When issuing an HTTP request to Coinfiancle, each private request must contain  X-Auth-Apikey  X-Auth-Nonce X-Auth-Signature within header that specifies a valid API key pair and must be encoded as JSON with the Content-Type: application/json header.

Generating Authentication Headers

In this section, we show you how to securely make an API request by creating a unique identifier (nonce) and an HMAC SHA256 signature for authentication 🔐. These are added to the request headers as X-Auth-Apikey, X-Auth-Nonce, and X-Auth-Signature . You can use this approach with any programming language or library you’re comfortable with, like Python 🐍, Ruby, or JavaScript. Just adjust the request method to fit your environment, and you’ll be ready to make authenticated calls! 🚀

PLAINTEXT
import CryptoJS from "crypto-js";

const nonce = Date.now().toString();

const accessKey = "your-access-key-here"; // Replace with your key 
const secretKey = "your-secret-key-here"; // Replace with your key 

const sigString = nonce + accessKey; 
const signature = CryptoJS.HmacSHA256(sigString, secretKey).toString(); 

fetch("https://pay.coinfinacle.com/api/v2/peatio/account/payment_requests", {     
  method: "GET",  
  headers: {       
       "X-Auth-Apikey": accessKey,  
       "X-Auth-Nonce": nonce,     
       "X-Auth-Signature": signature  
      },    
  })     
.then((res) => res.json()) 
.then((data) => console.log(data))  
.catch((err) => console.error(err)); 

Public APIs are open and accessible without the need for authentication keys or headers.

API requests without authentication will fail. (Private APIs only)

Your API keys grant significant access, so it’s crucial to keep them safe! Avoid sharing your secret API keys in public places like GitHub, client-side code, and similar locations.

Was this section helpful?

What made this section unhelpful for you?

Error Codes

authz.unexistent_apikey

API key provided does not exist or deleted or is not valid in the system

authz.invalid_signature

The provided signature is invalid

authz.apikey_not_active

The provided API key is inactive or disabled

Not Found

The specified endpoint path does not exist on the server, or the URL was incorrect.

Payment Request (private)

The Payment Request section allows users to initiate payment requests within their application, facilitating seamless transactions between customers and merchants. With this functionality, users can easily generate payment requests, handle payment processing, and track transaction statuses to ensure a smooth and efficient payment experience for all parties involved.

Base URL

Production:

https://pay.coinfinacle.com/api/v2/peatio/

Language Box

Endpoints

POST
GET

Payment Request (public)

Public APIs are open and accessible without the need for authentication keys or headers.

Base URL

Production:

https://pay.coinfinacle.com/api/v2/peatio/

Language Box

Endpoints

GET
PUT