API Key Set Up

Introduction

API keys are essential for secure access to our API, ensuring both authentication and access control. When used for webhook signatures, API keys also validate the integrity of the data transmitted. By using API keys for webhook signatures, the system verifies the source and integrity of incoming data, guaranteeing it originates from a trusted sender and preventing tampering during transit.

Obtaining Your API Key

To create an API Key, go to Merchant Account → Settings → API Settings → API Key → Click "Create"

How to Use API Key

Including the x-api-key header in your requests is essential to authenticate your access and ensure secure communication with the API.

Here's how you can include the x-api-key header in a POST request using curl:

curl --request POST \
  --url https://api.bitnbox.io/v1/payment \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR-API-KEY' \
  --data '{
  "amount": 1,
  "platformFeeByUser": false,
  "currency": "<string>",
  "network": "<string>",
  "customerId": "<string>",
  "customerIp": "<string>",
  "orderId": "<string>",
  "additionalData": "<string>",
  "webhookUrl": "<string>"
}'

For detailed information on utilizing API keys in webhooks, please refer to the guide: Setting Up Webhooks.

Last updated