Crypto Payments: Merchant Integration
Integrate cryptocurrency payments using Cyclebit, our enterprise grade digital currency processor.
Create a Payment
Endpoint
POST /api/paymentBase URL: https://secure.cyclebit.io
Authentication
API requests are authenticated using an API key passed in the Authorization header.
Request Body
| Field | Type | Mandatory | Description |
|---|---|---|---|
amount | String | Yes | Amount of the payment. |
currency | String | Yes | Fiat currency in which the payment amount is set. |
custom_id | String | No | Unique identifier for the transaction, specific to the merchant. |
email | String | No | Email address of the customer. |
description | String | No | Description of the transaction. |
redirect_url | String | No | URL to redirect the customer after the payment is completed. |
callback_url | String | No | URL 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
| Field | Type | Description |
|---|---|---|
ok | Boolean | Indicates if the request was successful. |
result | Object | The result object. |
id | String | The ID of the transaction. |
successUrl | String | The 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.