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? |
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.
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:
- Sign in: Navigate to pay.coinfinacle.com/login and sign in with your credentials.
- User Settings: Once logged in, locate the user settings.
- Locate API Key: In the settings/api tab, you should find your API key listed.
- 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.
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! 🚀
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));
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/
Endpoints
POST
GET
Payment Request (public)
Base URL
Production:
https://pay.coinfinacle.com/api/v2/peatio/