Charge

Create Charge

Create a new charge

POST https://api.criptan.com/business/charge

To request a cryptocurrency payment, you create a charge. A charge will expire after a waiting period (payment window) if no payment has been detected. Charges are identified by a unique code.

Headers

Name
Type
Description

Authorization*

String

API key

Request Body

Name
Type
Description

currency*

string

Fiat currency identifier (e.g: 'EUR')

amount*

integer

Amount charged in fiat currency

dscription*

string

Description of the payment

continueUrl

string

URL that the user will be redirected to if the payment is successful

cancelUrl

string

URL that the user will be redirected to if the payment fail

products*

array of objects

An array of JSON object that contains information about what you are charging the user

metadata

string

A strinfified JSON object that contains any metadata you want to include about your order

ttl

integer

The number of minutes your user has to pay the charge. Minimum: 5 minutes, Maximum: 60 minutes

client

object

Additional client data. This is required if the merchant needs to pass a KYC of the customer.

client.fullName*

string

Full name of the client, separated by spaces

client.dateOfBirth*

string

ISO8601 string representing the date of birth

client.address*

string

Full address of the client

client.needsAdditionalClearance*

boolean

If the client needs additional verification (operating on >10k€)

client.document.id*

string

The ID of the client

client.document.type*

string

The type of the ID of the customer, either id (a national document) or P (a passport)

metadata.concept*

string

This is only required in case of a client who is a PFP who needs to send bank transactions with a specific concept

{
  id: string;
  checkoutUrl: string;
  continueUrl: string;
  createdAt: string;
  expiresAt: string;
  paymentStatus: 'PENDING';
  products: [
    {
      title: string;
      price: number;
      quantity: number;
      image: string | undefined;
      description: string | undefined;
    }
  ];
  pricing: {
    fiat: {
      amount: string;
      currency: string;
    };
    BTC: {
      amount: string;
      currency: string;
      address: string;
    };
    ETH: {
      amount: string;
      currency: string;
      address: string;
    };
    LTC: {
      amount: string;
      currency: string;
      address: string;
    };
  };
  description: string;
  processStatus: "UNPROCESSED";
  metadata: Record<string, unknown> | undefined;
  acceptanceRate: string | undefined;
  cryptoHoldingPercentage: string | undefined;
  client: BusinessChargeClient | undefined;
  checkoutUrl: string;
}

List of charges

Get all charges from a business account

GET https://api.criptan.com/business/charge

Headers

Name
Type
Description

Authorization*

string

Api key

{
  [
  id: string;
  createdAt: string;
  expiresAt: string;
  paymentStatus: 'PENDING' | 'PAID' | 'CONFIRMED' | 'EXPIRED' | 'UNDERPAID' | 'DELAYED' | 'REFUNDED' | 'REFUND_PENDING';
  products: [
    {
      title: string;
      price: number;
      quantity: number;
      image: string | undefined;
      description: string | undefined;
    }
  ];
  pricing: {
    fiat: {
      amount: string;
      currency: string;
    };
    BTC: {
      amount: string;
      currency: string;
      address: string;
    };
    ETH: {
      amount: string;
      currency: string;
      address: string;
    };
    LTC: {
      amount: string;
      currency: string;
      address: string;
    };
  };
  description: string;
  processStatus: "ERROR" | "INITIATED" | "PROCESSED" | "UNPROCESSED";
  metadata: Record<string, unknown> | undefined;
  acceptanceRate: string | undefined;
  cryptoHoldingPercentage: string | undefined;
  client: BusinessChargeClient | undefined;
  confirmedAt: string | undefined;
  paidAt: string | undefined;
  processedAt: string | undefined;
  refundAddresses: BusinessRefundAddress | undefined;
  refundPaidAt: string | undefined;
  refundRequestedAt: string | undefined;
  transaction: BusinessTransaction | undefined;
  continueUrl: string;
  cancelUrl: string;
  checkoutUrl: string;
  ]
}

Get Charge

Get charge details

GET https://api.criptan.com/business/charge/:id

Path Parameters

Name
Type
Description

id*

string

charge id

Headers

Name
Type
Description

Authorization*

String

Api key

{
  id: string;
  createdAt: string;
  expiresAt: string;
  paymentStatus: 'PENDING' | 'PAID' | 'CONFIRMED' | 'EXPIRED' | 'UNDERPAID' | 'DELAYED' | 'REFUNDED' | 'REFUND_PENDING';
  products: [
    {
      title: string;
      price: number;
      quantity: number;
      image: string | undefined;
      description: string | undefined;
    }
  ];
  pricing: {
    fiat: {
      amount: string;
      currency: string;
    };
    BTC: {
      amount: string;
      currency: string;
      address: string;
    };
    ETH: {
      amount: string;
      currency: string;
      address: string;
    };
    LTC: {
      amount: string;
      currency: string;
      address: string;
    };
  };
  description: string;
  acceptanceRate: string;
  processStatus: "ERROR" | "INITIATED" | "PROCESSED" | "UNPROCESSED";
  metadata: Record<string, unknown> | undefined;
  acceptanceRate: string | undefined;
  cryptoHoldingPercentage: string | undefined;
  client: BusinessChargeClient | undefined;
  confirmedAt: string | undefined;
  paidAt: string | undefined;
  processedAt: string | undefined;
  refundAddresses: BusinessRefundAddress | undefined;
  refundPaidAt: string | undefined;
  refundRequestedAt: string | undefined;
  transaction: BusinessTransaction | undefined; 
  continueUrl: string;
  cancelUrl: string;
  checkoutUrl: string;
}

Last updated