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()
Retrieve the details of a webhook sent to you. Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)
import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';
const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.CCWebhookApi(configuration);
let body:theblockchainapi.CCWebhookApiGetCCWebhookRequest = {
// string | The ID of the project. Created and returned when a project is created.
projectId: "project_WDQskRIfHQxj53N5mk5K",
// string | The ID of the webhook. Created and returned when a webhook is sent.
webhookIdentifier: "webhook/payment.received/payment_EyfDL6CsvFinpUnXgBXaUuqq3hCXa0",
};
apiInstance.getCCWebhook(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | [string] | The ID of the project. Created and returned when a project is created. | defaults to undefined |
| webhookIdentifier | [string] | The ID of the webhook. Created and returned when a webhook is sent. | defaults to undefined |
CCWebhook
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad request (check response message) | - |
| 401 | Invalid API key pair in headers | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Array listCCProjectWebhooks()
List all webhooks sent to you and their respective responses from your server. Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)
import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';
const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.CCWebhookApi(configuration);
let body:theblockchainapi.CCWebhookApiListCCProjectWebhooksRequest = {
// string | The ID of the project. Created and returned when a project is created.
projectId: "project_WDQskRIfHQxj53N5mk5K",
};
apiInstance.listCCProjectWebhooks(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | [string] | The ID of the project. Created and returned when a project is created. | defaults to undefined |
Array
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad request (check response message) | - |
| 401 | Invalid API key pair in headers | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void validateCCWebhook()
Validate whether a webhook you received was actually sent from us. Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)
import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';
const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.CCWebhookApi(configuration);
let body:theblockchainapi.CCWebhookApiValidateCCWebhookRequest = {
// string | The ID of the project. Created and returned when a project is created.
projectId: "project_WDQskRIfHQxj53N5mk5K",
// string | The ID of the webhook. Created and returned when a webhook is sent.
webhookIdentifier: "webhook/payment.received/payment_EyfDL6CsvFinpUnXgBXaUuqq3hCXa0",
// CCWebhookValidateRequest (optional)
cCWebhookValidateRequest: {
webhookId: "webhook/payment.received/payment_2nFvUIGAsczBHSgiIz5JMenEiiJZet",
webhookSignature: {},
timeSent: 1651018365,
},
};
apiInstance.validateCCWebhook(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| cCWebhookValidateRequest | CCWebhookValidateRequest | ||
| projectId | [string] | The ID of the project. Created and returned when a project is created. | defaults to undefined |
| webhookIdentifier | [string] | The ID of the webhook. Created and returned when a webhook is sent. | defaults to undefined |
void
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Valid Webhook | - |
| 400 | Bad request / invalid webhook (check response message) | - |
| 401 | Invalid API key pair in headers | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]