Skip to content

Latest commit

 

History

History
275 lines (206 loc) · 9.88 KB

CCPaymentApi.md

File metadata and controls

275 lines (206 loc) · 9.88 KB

Org.OpenAPITools.Api.CCPaymentApi

All URIs are relative to https://api.blockchainapi.com/v1

Method HTTP request Description
GetCCPayment GET /checkout/v1/project/{project_id}/payment/{payment_identifier} Get a payment
ListAllCCPayments GET /checkout/v1/payments List all payments
ListCCProjectPayments GET /checkout/v1/project/{project_id}/payments List a project's payments

GetCCPayment

CCPayment GetCCPayment (string projectId, string paymentIdentifier)

Get a payment

Retrieve a specific payment, either by its payment_id or payment_validation_code. Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetCCPaymentExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
            // Configure API key authorization: APIKeyID
            Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
            // Configure API key authorization: APISecretKey
            Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");

            var apiInstance = new CCPaymentApi(Configuration.Default);
            var projectId = project_WDQskRIfHQxj53N5mk5K;  // string | The ID of the project. Created and returned when a project is created.
            var paymentIdentifier = ["payment_97jA1szpVjrSI5EvOb5zxNQFq5CfrC"];  // string | You can supply either `payment_id` or `payment_validation_code`.  The `payment_id` is only visible by you and uniquely identifies a payment.  The `payment_validation_code` is shown exclusively to the customer and the owner of the project. It can be used to redeem a payment. You can verify a payment by pulling the payment with the `payment_validation_code`.

            try
            {
                // Get a payment 
                CCPayment result = apiInstance.GetCCPayment(projectId, paymentIdentifier);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CCPaymentApi.GetCCPayment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string The ID of the project. Created and returned when a project is created.
paymentIdentifier string You can supply either `payment_id` or `payment_validation_code`. The `payment_id` is only visible by you and uniquely identifies a payment. The `payment_validation_code` is shown exclusively to the customer and the owner of the project. It can be used to redeem a payment. You can verify a payment by pulling the payment with the `payment_validation_code`.

Return type

CCPayment

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

ListAllCCPayments

List<CCPayment> ListAllCCPayments ()

List all payments

List all payments associated with your account (across all projects). Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ListAllCCPaymentsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
            // Configure API key authorization: APIKeyID
            Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
            // Configure API key authorization: APISecretKey
            Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");

            var apiInstance = new CCPaymentApi(Configuration.Default);

            try
            {
                // List all payments  
                List<CCPayment> result = apiInstance.ListAllCCPayments();
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CCPaymentApi.ListAllCCPayments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<CCPayment>

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

ListCCProjectPayments

List<CCPayment> ListCCProjectPayments (string projectId, UNKNOWN_PARAMETER_NAME = null)

List a project's payments

List all payments associated with a project. Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ListCCProjectPaymentsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
            // Configure API key authorization: APIKeyID
            Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
            // Configure API key authorization: APISecretKey
            Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");

            var apiInstance = new CCPaymentApi(Configuration.Default);
            var projectId = project_WDQskRIfHQxj53N5mk5K;  // string | The ID of the project. Created and returned when a project is created.
            var UNKNOWN_PARAMETER_NAME = new (); //  | Filter payments by a user's wallet identifier (i.e., Solana public key)  (optional) 

            try
            {
                // List a project's payments 
                List<CCPayment> result = apiInstance.ListCCProjectPayments(projectId, UNKNOWN_PARAMETER_NAME);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CCPaymentApi.ListCCProjectPayments: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
projectId string The ID of the project. Created and returned when a project is created.
UNKNOWN_PARAMETER_NAME **** Filter payments by a user's wallet identifier (i.e., Solana public key) [optional]

Return type

List<CCPayment>

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]