API Reference

API Authentication

The TransactionCloud API uses API login and API password to authenticate all requests with the Authorization HTTP header.

You can find these details in the API Set up page in your Vendor Panel.

Keep your API credentials secure and don't expose it publicly.

Header format:

You have to attach the header below to all API calls.

Authorization: API_LOGIN:API_PASSWORD

You must replace API_LOGIN:API_PASSWORD with your personal API credentials.
Please remember that sandbox and production environment have separate credentials.

API Error Codes

Our API return HTTP responses with error codes in case of invalid request, missing data, failed authorization and in other unexpected cases. In some cases, JSON body with an error explanation will be available.

List of error codes

Code Status
400 Invalid input data
error string

Error name.

Example: "Price in USD is required"
message string

Issue description with potential fix.

Example: "Please add missing USD price value"
401 Authorization issue
404 Resource not found
500 Fatal system error
503 System temporary unavailable

API Endpoints

API URL

https://api.transaction.cloud/

Sandbox API URL

https://sandbox-api.transaction.cloud/

In all examples below, the Sandbox API is used by default.

Get URL to manage transactions

Generates all transactions for customer by email.

GET https://sandbox-api.transaction.cloud/v1/generate-url-to-manage-transactions/{customerEmail}

Query Parameters

Schema

email string<email> required

Email address used by the customer during purchase.

Example: "test@domain.com"

Example

                            

Example request (cURL):

curl --request GET https://sandbox-api.transaction.cloud/v1/generate-url-to-manage-transactions/{customerEmail} \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Response (Object)

Schema

url string

Address URL.

Get URL to Admin Plug-in tool

Generates a temporary URL address to embed the Plug-in tool on your website using an iframe.

GET https://sandbox-api.transaction.cloud/v1/generate-url-to-admin

Example

                            

Example request (cURL):

curl --request GET https://sandbox-api.transaction.cloud/v1/generate-url-to-admin \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Response (Object)

Schema

url string

Address URL.

Get transactions by email

Retrieves all transactions by email.

GET https://sandbox-api.transaction.cloud/v1/transactions/{email}

Query Parameters

Schema

email string<email> required

Email address used by the customer during purchase.

Example: "test@domain.com"

Example

                            

Example request (cURL):

curl --request GET https://sandbox-api.transaction.cloud/v1/transactions/test@domain.com \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Response (Array)

Schema

id string

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"
createDate string<datetime>

Transaction create date.

Format: YYYY-MM-DDTHH:MM:SS.sZ
email string<email>

Email address used by the customer during purchase.

assignedEmail string<email> | null

Email address used by the customer during website sign-up. It will be null until you set it with the "Assign email" endpoint.

productId string

Unique product identificator.

Example: "TC-PR_yyyyxxxx"
productName string

Name of the product.

transactionType string<transactionType>

Type of product. Possible values:

transactionStatus string<transactionStatus>

Current status of the transaction. Possible values:

chargeFrequency string<chargeFrequency> | null

Frequency of charges for recurring products. Possible values:

country string<countryCode>

Country where customer completed the payment.

Example: "US"
lastCharge string<datetime>

Date of the last successful payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
nextCharge string<datetime>

Date of the next payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
payload string | null

Encrypted custom data passed before the checkout process. It's highly recommended to encrypt this data on your end.

Requirements: <5000 characters
whoCanceled string<whoCanceled> | null

Reason for cancellation in case of a canceled subscription or vaulted transaction. Possible values:

netPrice number

Net price.

netPrice string

Net price.

netPriceInUSD number

Net price in USD.

netPriceInUSDS string

Net price in USD.

tax number

Tax amount.

taxS string

Tax amount.

currency string<currency>

Currency code of the transaction.

Example: "USD"

Get transaction by ID

Retrieves transaction by ID.

GET https://sandbox-api.transaction.cloud/v1/transaction/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Example

                            

Example request (cURL):

curl --request GET https://sandbox-api.transaction.cloud/v1/transaction/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Response (Object)

Schema

id string

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"
createDate string<datetime>

Date of transaction creation.

Format: YYYY-MM-DDTHH:MM:SS.sZ
email string<email>

Email address used by the customer during purchase.

assignedEmail string<email> | null

Email address used by the customer during website sign-up. It will be null until you set it with the "Assign email" endpoint.

productId string

Unique product identificator.

Example: "TC-PR_yyyyxxxx"
productName string

Name of the product.

transactionType string<transactionType>

Type of product. Possible values:

transactionStatus string<transactionStatus>

Current status of the transaction. Possible values:

chargeFrequency string<chargeFrequency> | null

Frequency of charges for recurring products. Possible values:

country string<countryCode>

Country where customer completed the payment.

Example: "US"
lastCharge string<datetime>

Date of the last successful payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
payload string | null

Encrypted custom data passed before the checkout process. It's highly recommended to encrypt this data on your end.

Requirements: <5000 characters
whoCanceled string<whoCanceled> | null

Reason for cancellation in case of a canceled subscription or vaulted transaction. Possible values:

netPrice number

Net price.

netPrice string

Net price.

netPriceInUSD number

Net price in USD.

netPriceInUSDS string

Net price in USD.

tax number

Tax amount.

taxS string

Tax amount.

currency string<currency>

Currency code of the transaction.

Example: "USD"
entries Array<TransactionEntry>

Transaction entries.

TransactionEntry

id string

Unique identification for the transaction entry.

Example: "TC-BA_xxyyxxx"
type string<transactionEntryType>

Transaction entry type. Possible values:

createDate string<datetime>

Date of entry creation.

Format: YYYY-MM-DDTHH:MM:SS.sZ
taxAmount string

Total tax amount.

income string

Total income amount.

incomeCurrency string<currency>

Income currency.

Example: "USD"
taxRate string

Tax rate for the transaction.

currency string<currency>

Currency code of the transaction.

Example: "USD"
amountTotal string

Total event amount.

affiliateIncome string

Total affiliate income.

affiliateIncomeCurrency string<currency>

Affiliate income currency.

Example: "USD"

Update transaction email

Customer's updated email address is stored in the transaction's 'assignEmail' field. The original email address provided by the customer in the payment form remains in the 'email' field and is not editable. After using this endpoint, the 'assignEmail' field will have a higher priority over the 'email' field throughout the system. This endpoint helps you maintain a seamless connection between transactions and customer profiles in your system.

POST https://sandbox-api.transaction.cloud/v1/transaction/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Request Body application/json

Schema

assignEmail string<email> required

Assign an email address for a customer.

Example: "assignedEmail@domain.com"

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/transaction/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD' \ --header 'Content-Type: application/json' \ --data '{"assignEmail":"assignedEmail@domain.com"}'

Response (Object)

Schema

assignEmail string<email>

Assign an email address for a customer.

Example: "assignedEmail@domain.com"
chargeFrequency string<chargeFrequency> | null

Frequency of charges for recurring products. Possible values:

country string<countryCode>

Country where customer completed the payment.

Example: "US"
createDate string<datetime>

Transaction create date.

Format: YYYY-MM-DDTHH:MM:SS.sZ
email string<email>

Email address used by the customer during purchase.

id string

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"
lastCharge string<datetime>

Date of the last successful payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
payload string | null

Encrypted custom data passed before the checkout process. It's highly recommended to encrypt this data on your end.

Requirements: <5000 characters
productId string

Unique product identificator.

Example: "TC-PR_yyyyxxxx"
productName string

Name of the product.

transactionStatus string<transactionStatus>

Current status of the transaction. Possible values:

transactionType string<transactionType>

Type of product. Possible values:

netPrice number

Net price.

netPrice string

Net price.

netPriceInUSD number

Net price in USD.

netPriceInUSDS string

Net price in USD.

tax number

Tax amount.

taxS string

Tax amount.

whoCanceled string<whoCanceled> | null

Reason for cancellation in case of a canceled subscription or vaulted transaction. Possible values:

Update transaction payload

Update payload saved in transaction.

POST https://sandbox-api.transaction.cloud/v1/transaction/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Request Body application/json

Schema

payload string | null required

Encrypted custom data passed before the checkout process. It's highly recommended to encrypt this data on your end.

Example: "example custom data string" Requirements: <5000 characters

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/transaction/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD' \ --header 'Content-Type: application/json' \ --data '{"payload":"example custom data string"}'

Response (Object)

Schema

assignEmail string<email>

Assign an email address for a customer.

Example: "assignedEmail@domain.com"
chargeFrequency string<chargeFrequency> | null

Frequency of charges for recurring products. Possible values:

country string<countryCode>

Country where customer completed the payment.

Example: "US"
createDate string<datetime>

Transaction create date.

Format: YYYY-MM-DDTHH:MM:SS.sZ
email string<email>

Email address used by the customer during purchase.

id string

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"
lastCharge string<datetime>

Date of the last successful payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
payload string | null

Encrypted custom data passed before the checkout process. It's highly recommended to encrypt this data on your end.

Requirements: <5000 characters
productId string

Unique product identificator.

Example: "TC-PR_yyyyxxxx"
productName string

Name of the product.

transactionStatus string<transactionStatus>

Current status of the transaction. Possible values:

transactionType string<transactionType>

Type of product. Possible values:

netPrice number

Net price.

netPrice string

Net price.

netPriceInUSD number

Net price in USD.

netPriceInUSDS string

Net price in USD.

tax number

Tax amount.

taxS string

Tax amount.

whoCanceled string<whoCanceled> | null

Reason for cancellation in case of a canceled subscription or vaulted transaction. Possible values:

Cancel subscription

Cancel subscription by transaction id.

POST https://sandbox-api.transaction.cloud/v1/cancel-subscription/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/cancel-subscription/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Refund payment

Refund payment by transaction-id.

POST https://sandbox-api.transaction.cloud/v1/refund-transaction/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/refund-transaction/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Get transactions with changed status

Retrieve transactions with recently changed status for processing. After processing each of them, you can mark them as processed with this request. When you execute the ‘Get transactions with changed status’ request again, only unprocessed transactions will be retrieved.

GET https://sandbox-api.transaction.cloud/v1/changed-transactions

Example

                            

Example request (cURL):

curl --request GET https://sandbox-api.transaction.cloud/v1/changed-transactions \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Response (Array)

Schema

assignEmail string<email>

Assign an email address for a customer.

Example: "assignedEmail@domain.com"
changeStatus string<status> | null

Changed status possible values:

chargeFrequency string<chargeFrequency> | null

Frequency of charges for recurring products. Possible values:

country string<countryCode>

Country where customer completed the payment.

Example: "US"
createDate string<datetime>

Transaction create date.

Format: YYYY-MM-DDTHH:MM:SS.sZ
email string<email>

Email address used by the customer during purchase.

id string

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"
lastCharge string<datetime>

Date of the last successful payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
nextCharge string<datetime>

Date of the next payment.

Format: YYYY-MM-DDTHH:MM:SS.sZ
payload string | null

Encrypted custom data passed before the checkout process. It's highly recommended to encrypt this data on your end.

Requirements: <5000 characters
productId string

Unique product identificator.

Example: "TC-PR_yyyyxxxx"
productName string

Name of the product.

transactionStatus string<transactionStatus>

Current status of the transaction. Possible values:

transactionType string<transactionType>

Type of product. Possible values:

whoCanceled string<whoCanceled> | null

Reason for cancellation in case of a canceled subscription or vaulted transaction. Possible values:

Mark changed transaction as processed

After processing transactions with recently changed status, use this endpoint to mark each of them as processed. When you execute the ‘Get transactions with changed status’ request again, only unprocessed transactions will be retrieved.

POST https://sandbox-api.transaction.cloud/v1/changed-transactions/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/changed-transactions/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Customize product

Allows to customize products on demand, generate new customized product IDs, and link them to payment. IDs of customized products can be used for payments or inside a widget.

POST https://sandbox-api.transaction.cloud/v1/customize-product/{product-id}

Query Parameters

Schema

product-id string required

Unique product identificator.

Example: "TC-PR_yyyyxxxx"

Request Body application/json

Schema

prices Array<Price> required

List of prices. USD is mandatory! If the provided currency is not available, it will be converted from USD.

Example: "[{"currency":"USD", "value" :500.00}]"

Price

currency string<currency>

Currency code of the transaction.

Example: "USD"
value number

Net price.

Example: "500"
description string

Customized product description. If not provided, the original description of the product will be used.

Example: "description of customized product"
payload string

If provided, the custom payload will override the payload provided from the widget.

Example: "payload example" Requirements: <5000 characters
transactionIdToMigrate string

ID of the transaction to be upgraded or downgraded. Prorate will be calculated based on the remaining time from the subscription and its value. The first charge of the new subscription will be delayed based on the prorate value. The migrated transaction must be an active subscription.

Example: "TC-TR_XXXYYZZ"
expiresIn number

Number of SECONDS after the customized product will expire.

Example: "3600"
userFirstName string

First name of the user for whom the customized product is dedicated.

Example: "Pawel"
userLastName string

Last name of the user for whom the customized product is dedicated.

Example: "Bergmann"
userMail string

Email of the user for whom the customized product is dedicated. Editing in the payment panel won't be possible.

Example: "pawel@gmail.com"

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/customize-product/TC-PR_yyyyxxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD' \ --header 'Content-Type: application/json' \ --data '{"prices":"[{\"currency\":\"USD\", \"value\" :500.00}]","description":"description of customized product","payload":"payload example","transactionIdToMigrate":"TC-TR_XXXYYZZ","expiresIn":3600,"userFirstName":"Pawel","userLastName":"Bergmann","userMail":"pawel@gmail.com"}'

Response (Object)

Schema

link string

URL address with personalized payment.

customProductId string

ID of the personalized product.

Charge vaulted customer

Charge vaulted customers based on the given price for SaaS services.

POST https://sandbox-api.transaction.cloud/v1/charge-vaulted/{transaction-id}

Query Parameters

Schema

transaction-id string required

Unique identification for the transaction.

Example: "TC-TR_xxyyxxx"

Request Body application/json

Schema

prices Array<Price> required

List of prices. USD is mandatory! If the provided currency is not available, it will be converted from USD.

Example: "[{"currency":"USD", "value" :500.00}]"

Price

currency string<currency>

Currency code of the transaction.

Example: "USD"
value number

Net price.

Example: "500"
chargeDescription string

Description of the charge. Software or service description. It will be visible on the invoice.

Example: "SaaS description"

Example

                            

Example request (cURL):

curl --request POST https://sandbox-api.transaction.cloud/v1/charge-vaulted/TC-TR_xxyyxxx \ --header 'Authorization: API_LOGIN:API_PASSWORD' \ --header 'Content-Type: application/json' \ --data '{"prices":"[{\"currency\":\"USD\", \"value\" :500.00}]","chargeDescription":"SaaS description"}'

Response (Object)

Schema

currency string<currency>

Currency code of the transaction.

Example: "USD"
deactivation boolean

Information about the activity of vaulted payments.

price number

Price.

priceS string

Price.

taxValue number

Tax amount.

taxValueS string

Tax amount.

netValue number

Net price.

netValueS string

Net price.

status string

Payment status for vaulted transactions.

Example: "SUCCESS"

Check licence

Check if your licence have been granted.

GET https://sandbox-api.transaction.cloud/v1/check-licence/{productId}/{licence}

Query Parameters

Schema

productId string required

Unique product identificator.

Example: "TC-PR_yyyyxxxx"
licence string required

Licence provided by client

Example: "LICE-ENCE-HERE"

Example

                            

Example request (cURL):

curl --request GET https://sandbox-api.transaction.cloud/v1/check-licence/TC-PR_yyyyxxxx/LICE-ENCE-HERE \ --header 'Authorization: API_LOGIN:API_PASSWORD'

Response (Object)

Schema

checkLicenceStatus string

Status of provided licence