LogoLogo
  • GENERAL
    • About Criptan
    • Get started
      • Introduction
      • 1. Activate your account
      • 2. Add funds to your balance
      • 3. Start interacting with the API
    • API
      • Introduction
      • Authentication
        • Auth Transactions and Earn
          • API Reference
        • Auth Business (Criptan Pay)
      • Real-Time API (WebSockets)
        • OHLCV
        • TICKERS
      • Webhooks
        • Transactions and Earn Webhooks
        • Business Webhooks
      • API reference
      • Changelog
    • Developer tools
      • Sandbox
      • Support
      • Feedback
    • Security
  • Transactions
    • General
      • Overview
      • Available exchange
      • Geographic availability
      • Use cases
        • Buy
          • UX example
        • Sell
          • UX example
        • Send crypto
          • UX example
        • Receive crypto
          • UX example
        • Recurring purchases
          • UX example
        • Check history
      • FAQ
    • API Reference
      • Trades
      • Withdrawals
      • Information
  • Earn
    • General
      • Overview
      • Geographic availability
      • Use cases
        • 3, 6, 12 months
          • Make a deposit
            • UX example
          • Set up auto-renew a deposit automatically
            • UX example
        • Flex
          • Make a deposit
            • UX example
          • Make a withdrawal
            • UX example
          • Cancel a withdrawal
            • UX example
          • Set up reinvest or not rewards
            • UX example
        • Flex and 3, 6, 12 months
          • Receiving Rewards
      • FAQ
    • API Reference
  • Business (Criptan Pay)
    • General
      • Business (Criptan Pay)
      • Onboarding
      • Payment Button
      • Charges
      • FAQ
    • API Reference
      • Charge
      • Generate charge receipt
      • Get payment
    • Types CPay definitions
      • BusinessAccount
      • BusinessCharge
Powered by GitBook
On this page
  • Create Charge
  • Create a new charge
  • List of charges
  • Get all charges from a business account
  • Get Charge
  • Get charge details
  1. Business (Criptan Pay)
  2. API Reference

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;
}
{
  message: 'Client KYC data is missing, but your account specify it as needed',
  code: 'missing_client_data'
}
{
  message: 'Internal error',
  code: 'internal_error'
}
{
    message: "Service unavaliable. Not found charge price data from Exchange",
    code: "service_unavaliable_price_data_exchange",
    retryable: true
}
{
    message: "Business account not found",
    code: "not_found_business_account"
}
{
    message: "Internal error. Fail to create Charge",
    code: "internal_error_create_charge"
}
{
    message: "Charge exceeds maximum charge amount",
    code: "exceed_restricted_charge_amount
}

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;
  ]
}
{
    message: "Charges not found",
    code: "not_found_charges"
}
{
    message: "Internal error. Get list of charges",
    code: "internal_error_get_list_of_charges"
}
{
    message: "Internal error",
    code: "internal_error"
}

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;
}
{
   message: "Charge not found",
   code: "not_found_charge"
}
PreviousAPI ReferenceNextGenerate charge receipt

Last updated 1 year ago