All URIs are relative to https://api.blockchainapi.com/v1
Method | HTTP request | Description |
---|---|---|
getCCWebhook | POST /webhook/v1/project/{project_id}/webhook/{webhook_identifier} | Get a webhook |
listCCProjectWebhooks | POST /webhook/v1/project/{project_id}/webhooks | List project's webhooks |
validateCCWebhook | POST /webhook/v1/project/{project_id}/webhook/{webhook_identifier}/validate | Validate a webhook |
CCWebhook getCCWebhook(projectId, webhookIdentifier)
Get a webhook
Retrieve the details of a webhook sent to you. `Cost: 0 Credit` (Free) (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.CCWebhookApi();
let projectId = project_WDQskRIfHQxj53N5mk5K; // String | The ID of the project. Created and returned when a project is created.
let webhookIdentifier = webhook/payment.received/payment_EyfDL6CsvFinpUnXgBXaUuqq3hCXa0; // String | The ID of the webhook. Created and returned when a webhook is sent.
apiInstance.getCCWebhook(projectId, webhookIdentifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | The ID of the project. Created and returned when a project is created. | |
webhookIdentifier | String | The ID of the webhook. Created and returned when a webhook is sent. |
- Content-Type: Not defined
- Accept: application/json
[CCWebhook] listCCProjectWebhooks(projectId)
List project's webhooks
List all webhooks sent to you and their respective responses from your server. `Cost: 0 Credit` (Free) (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.CCWebhookApi();
let projectId = project_WDQskRIfHQxj53N5mk5K; // String | The ID of the project. Created and returned when a project is created.
apiInstance.listCCProjectWebhooks(projectId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | The ID of the project. Created and returned when a project is created. |
- Content-Type: Not defined
- Accept: application/json
validateCCWebhook(projectId, webhookIdentifier, opts)
Validate a webhook
Validate whether a webhook you received was actually sent from us. `Cost: 0 Credit` (Free) (<a href="#section/Pricing">See Pricing</a>)
import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';
let apiInstance = new theblockchainapi.CCWebhookApi();
let projectId = project_WDQskRIfHQxj53N5mk5K; // String | The ID of the project. Created and returned when a project is created.
let webhookIdentifier = webhook/payment.received/payment_EyfDL6CsvFinpUnXgBXaUuqq3hCXa0; // String | The ID of the webhook. Created and returned when a webhook is sent.
let opts = {
'cCWebhookValidateRequest': new theblockchainapi.CCWebhookValidateRequest() // CCWebhookValidateRequest |
};
apiInstance.validateCCWebhook(projectId, webhookIdentifier, opts).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectId | String | The ID of the project. Created and returned when a project is created. | |
webhookIdentifier | String | The ID of the webhook. Created and returned when a webhook is sent. | |
cCWebhookValidateRequest | CCWebhookValidateRequest | [optional] |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined