Cycle Logo

Crypto Payments: Merchant Integration

Integrate cryptocurrency payments using Cyclebit, our enterprise grade digital currency processor.

Create a Payment

Endpoint

POST /api/payment

Base URL: https://secure.cyclebit.io

Authentication

API requests are authenticated using an API key passed in the Authorization header.

Request Body

FieldTypeMandatoryDescription
amountStringYesAmount of the payment.
currencyStringYesFiat currency in which the payment amount is set.
custom_idStringNoUnique identifier for the transaction, specific to the merchant.
emailStringNoEmail address of the customer.
descriptionStringNoDescription of the transaction.
redirect_urlStringNoURL to redirect the customer after the payment is completed.
callback_urlStringNoURL to receive callback (webhook) notifications for payment status.

Example Request

{
  "amount": "99.99",
  "currency": "USD",
  "custom_id": "TESTID12345",
  "email": "customer@cyclebit.com",
  "description": "Test description",
  "redirect_url": "https://www.cyclebit.com/",
  "callback_url": "https://www.cyclebit.com/"
}

Response Body

FieldTypeDescription
okBooleanIndicates if the request was successful.
resultObjectThe result object.
idStringThe ID of the transaction.
successUrlStringThe URL to redirect the customer to for completing the payment.

Example Response

{
    "ok": true,
    "result": {
        "id": "Z2MFRBX8KPRN",
        "successUrl": "https://secure.cyclebit.io/payment/?id=Z2MFRBX8KPRN"
    }
}

Checking Payment Status

Get Transaction Details

To check the status of a payment, you must use the Get Transaction Details endpoint. This is crucial for verifying the final outcome of the transaction.

For full details on this endpoint, please see the Partner Integration guide.

Webhook Notifications

Cyclebit sends a webhook notification to your configured `callback_url` each time the transaction status changes.

When you receive a webhook, your system should call the Get Transaction Details endpoint to retrieve the latest status and verify the transaction details.

Webhook Request Format

{
  "order_id": "NCQC2T3HS97X"
}

Responding to Webhooks

Your system must reply with an HTTP 200 status code to acknowledge receipt of the webhook. If Cyclebit does not receive a 200 OK, it will attempt to resend the notification.