Before you begin
If you choose to use a Payments API SDK instead of manually writing the API requests, you need to first install the right version of the corresponding programming language. For example, if you want to use the Python SDK, you need to have Python 3.7 or a newer version installed.Set up an account
Follow the instructions in Preparation for development environment to set up your Cobo account and create your organization. If an organization has already been set up, ask your organization admin to invite you to join the organization.This guide uses the development environment in all of its examples. Please create your organization in the development environment at https://portal.dev.cobo.com/.
Generate an API key and an API secret
Generate an Ed25519 key pair as the API key and API secret. This guide uses OpenSSL as an example. To learn other methods for generating an API key and an API secret, see Generate an API key and an API secret.- In a terminal window, run the following OpenSSL commands:
private.key.pem file, and the public key is saved in the public.key.pem file.
- You can print the keys by running the following commands:
Register the API key
Register your API key and configure related permissions on Cobo Portal.- Log in to Cobo Portal (development environment).
- On the left navigation menu, click Developer > API Keys.
- Click Register API Key.
- Enter the API key name (maximum 30 characters).
- Enter the public key you have generated in the previous step.
- Select Role & Wallet Scope. Each user role is permitted to call a specific set of operations, and the wallet scope determines the set of wallets this API key can access.
- Leave Callback Endpoint empty.
- Select Temporary as the key type. If you already have a static IP address, you can select Permanent as the key type instead and enter your IP address in IP Whitelist.
- Click Register.
- Notify your organization admins to approve the request on Cobo Guard.
By default, it requires the approval of at least half of the admins to successfully register an API key.
Authenticate your requests
You can skip this step if you choose to use a Payments API SDK, which encapsulates the authentication mechanism.
- Biz-Api-Key: The API key. To learn how to generate an API key, see Generate an API key and an API secret.
- Biz-Api-Nonce: A nonce is the current time in Unix timestamp format, measured in milliseconds.
- Biz-Api-Signature: The API signature. To learn how to calculate an API signature, see Calculate an API Signature.
