Getting started overview

Integrating with Coinremitter's API for cryptocurrency payments or wallet management involves several steps, from account creation to making your initial API call. This guide focuses on the foundational procedures required to achieve a working integration. Coinremitter enables businesses to accept a range of cryptocurrencies and manage digital assets through its API, providing tools for transaction processing and wallet interactions.

The core process involves:

  1. Account Registration: Creating and verifying a Coinremitter account.
  2. API Key Generation: Obtaining the necessary API credentials to authenticate requests.
  3. Wallet Creation: Setting up a cryptocurrency wallet within the Coinremitter platform.
  4. First API Request: Executing a simple API call, such as creating an invoice or checking wallet balance, to confirm connectivity and authentication.

Coinremitter's primary use cases include facilitating crypto payments for e-commerce platforms and providing developers with API access to manage cryptocurrency wallets programmatically. The platform supports various cryptocurrencies, and transaction fees commence at 0.19% for processing payments. Further details on supported cryptocurrencies and specific fees are available in the official Coinremitter pricing documentation.

Quick reference table

Step What to do Where
1. Sign Up Register for a Coinremitter account. Coinremitter homepage
2. Verify Email Complete email verification to activate your account. Email inbox
3. Generate API Keys Navigate to API settings to create your API Key and API Secret. Coinremitter Dashboard > API Settings
4. Create Wallet Set up a new cryptocurrency wallet (e.g., BTC, ETH) for transactions. Coinremitter Dashboard > Wallets
5. Make First Request Use your API credentials to make an initial API call (e.g., create invoice). Your development environment, using Coinremitter's API documentation

Create an account and get keys

To begin using Coinremitter, you must first create an account and then generate the necessary API credentials. These credentials, typically an API Key and API Secret, are essential for authenticating all your API requests.

Account registration

  1. Navigate to the Coinremitter website.
  2. Click on the "Sign Up" or "Get Started" button.
  3. Provide the required information, usually including your email address and a password.
  4. Complete the email verification process by clicking the link sent to your registered email address. This step is crucial for account activation and security.

Generating API keys

Once your account is active, you can generate your API credentials:

  1. Log in to your Coinremitter dashboard.
  2. Locate the "API Settings" or "Developer Settings" section, typically found in the user profile or settings menu.
  3. Click on "Generate New API Key" or a similar option. Coinremitter will provide you with an API Key and an API Secret.
  4. Important: Securely store your API Secret. It is typically shown only once upon generation and is critical for authenticating your requests. Treat it like a password.

Creating a wallet

Before you can process payments or interact with cryptocurrency, you need to set up a wallet within the Coinremitter platform. This wallet will hold the cryptocurrencies you accept.

  1. From your Coinremitter dashboard, navigate to the "Wallets" section.
  2. Select "Create New Wallet" and choose the cryptocurrency you wish to support (e.g., Bitcoin, Ethereum, Litecoin).
  3. Assign a label or name to your wallet for easy identification.
  4. Confirm the wallet creation. You will receive a unique Wallet ID for this specific cryptocurrency wallet, which is used in API calls.

Your first request

With your account set up, API keys obtained, and a wallet created, you can now make your first API request. A common initial request is to create an invoice, which demonstrates the ability to initiate a payment process.

Coinremitter's API uses RESTful principles and typically accepts JSON payloads, returning JSON responses. Authentication is generally handled by including your API Key and API Secret in the request headers or body, depending on the endpoint.

Example: Create an invoice (PHP)

This example demonstrates how to create a Bitcoin invoice using Coinremitter's API, assuming you have a Bitcoin wallet set up and have retrieved its Wallet ID. Coinremitter frequently provides PHP examples in its official documentation due to its common use in web development.

<?php

$apiKey = 'YOUR_API_KEY'; // Replace with your actual API Key
$apiSecret = 'YOUR_API_SECRET'; // Replace with your actual API Secret
$walletId = 'YOUR_BITCOIN_WALLET_ID'; // Replace with your Bitcoin Wallet ID
$coin = 'BTC'; // Cryptocurrency for the invoice

$url = "https://coinremitter.com/api/v3/" . $coin . "/create-invoice";

$fields = [
    'api_key' => $apiKey,
    'password' => $apiSecret, // Note: Coinremitter often uses 'password' for API Secret
    'address' => $walletId,
    'value' => 0.001, // Amount in BTC
    'currency' => 'USD', // Fiat currency for display, actual payment is in BTC
    'name' => 'Test Invoice',
    'expire_time' => 3600, // Invoice expiration in seconds (1 hour)
    'success_url' => 'https://yourwebsite.com/success',
    'fail_url' => 'https://yourwebsite.com/fail'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'cURL Error: ' . curl_error($ch);
} else {
    $responseData = json_decode($response, true);
    print_r($responseData);
}

curl_close($ch);

?>

In this example:

  • YOUR_API_KEY, YOUR_API_SECRET, and YOUR_BITCOIN_WALLET_ID must be replaced with your actual credentials.
  • The password parameter is used for the API Secret in some Coinremitter endpoints. Always refer to the specific endpoint documentation.
  • The value is the amount in the selected cryptocurrency (BTC in this case).
  • currency is for display purposes; the actual payment occurs in the specified coin.

Upon successful execution, the API will return a JSON object containing details of the newly created invoice, including a payment address and QR code information. You can parse this response to display payment instructions to your users.

Common next steps

After successfully making your first API call, you can explore more advanced functionalities offered by Coinremitter:

  • Webhooks: Configure webhooks to receive real-time notifications about payment status updates (e.g., payment received, confirmed). This is critical for automating your payment processing workflow without constant polling. For general best practices on webhook implementation, refer to Twilio's webhook security guide.
  • Customization: Explore options for customizing invoice pages or integrating the payment gateway into your existing checkout flow.
  • Additional Wallets: Create wallets for other cryptocurrencies to expand the payment options you offer.
  • Withdrawals: Implement functionality for withdrawing funds from your Coinremitter wallets to external addresses.
  • Error Handling: Implement robust error handling in your application to manage API failures, invalid requests, or payment processing issues.
  • Security Best Practices: Review and implement security measures, such as IP whitelisting and secure storage of API keys, as recommended in the Coinremitter documentation.

Troubleshooting the first call

Encountering issues during your initial API integration is common. Here are some troubleshooting steps for your first Coinremitter API call:

  • Check API Key and Secret: Ensure your API Key and API Secret are correctly copied and used in the request. A common error is mistaking the API Secret for a generic password field or vice-versa, or having leading/trailing spaces.
  • Verify Wallet ID: Confirm that the Wallet ID used in your request matches an existing wallet on your Coinremitter dashboard and is for the correct cryptocurrency.
  • Endpoint URL: Double-check the API endpoint URL for any typos and ensure it corresponds to the specific Coinremitter API version and cryptocurrency you intend to use (e.g., /api/v3/BTC/create-invoice).
  • Request Parameters: Review the request parameters against the Coinremitter API reference. Ensure all required parameters are present and correctly formatted (e.g., correct data types for values, valid URLs for callbacks).
  • Network Connectivity: Confirm that your server or development environment has outbound internet access to reach the Coinremitter API endpoints.
  • Error Messages: Pay close attention to the error messages returned in the API response. Coinremitter's API typically provides descriptive error codes and messages that can help pinpoint the issue. For example, "Invalid API Key" or "Wallet not found."
  • CORS Issues: If making requests from a client-side application (e.g., browser), be aware of Cross-Origin Resource Sharing (CORS) policies. Server-side API calls are generally recommended for sensitive operations to avoid CORS and enhance security.
  • Rate Limits: While less common for initial calls, be aware that APIs often have rate limits. If you are making many rapid requests during testing, you might hit a temporary limit. Consult the Coinremitter documentation for details on rate limits.
  • PHP cURL Errors: If using cURL in PHP, check curl_errno($ch) and curl_error($ch) after curl_exec() to diagnose network or connection issues from your server.