All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| getPaymentReceipt | GET /billing/payment/receipt/{payment_id} | Retrieve Payment Receipt |
| initiatePayment | POST /billing/payment/payment-initiate | POST: Initiate payment |
| listPaymentDetails | GET /billing/payment/payment-details | GET: View payment details |
getPaymentReceipt(paymentId)
Retrieve Payment Receipt
Retrieve the payment receipt from Stripe for a specific payment
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.PaymentApi();
let paymentId = "paymentId_example"; // String |
apiInstance.getPaymentReceipt(paymentId).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| paymentId | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
PaymentInitiateResponse initiatePayment(payload)
POST: Initiate payment
Creates a payment for a specified amount, adding credit to the balance of your organization. Include the `amount` in the body of the request to make a payment for the specified value in dollars. View a history of past payments by calling the Retrieve Payment History API. For additional information click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.PaymentApi();
let payload = new HyperstackApi.PaymentInitiatePayload(); // PaymentInitiatePayload |
apiInstance.initiatePayment(payload).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| payload | PaymentInitiatePayload |
- Content-Type: application/json
- Accept: application/json
PaymentDetailsResponse listPaymentDetails()
GET: View payment details
Retrieves a list of all payments made within your organization and their details, including the amount, payment status, and more. For additional information click here.
import HyperstackApi from '@nexgencloud/hyperstack-sdk-javascript';
let defaultClient = HyperstackApi.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
let apiInstance = new HyperstackApi.PaymentApi();
apiInstance.listPaymentDetails().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json