This endpoint purchases the processed files using Stripe metered billing.
POST
https://platform.cryo-mix.com/api/api-checkout
Header | Type | Required | Description |
---|---|---|---|
X-Api-Key |
string | Yes | Your client API key. |
Session-Id |
string | Yes | The unique session identifier. |
Source |
string | Yes | Must be set to Mastering API . |
Parameter | Type | Required | Description |
---|---|---|---|
first_name |
string | Yes | The first name of the customer. |
last_name |
string | Yes | The last name of the customer. |
email |
string | Yes | The email of the customer. |
marketing_consent |
boolean | No | Indicates if the customer has consented to marketing. |
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"marketing_consent": true
}
{
"status": "Api success, purchase successfully"
}
{
"error": "First name, last name, and email are required"
}
Possible Causes:
• A required header (X-Api-Key
, Session-Id
, or Source
) is missing or invalid.
• Required fields (first_name
, last_name
, email
) are missing.
• The mastering process is not in the correct state for purchase (must be completed
).
• The purchase has already been made.
• The metered billing subscription is not active.
{
"error": "invalid X-Api-Key"
}
Possible Causes:
• The API key is incorrect.
• The Source
header is incorrect.
• The request is coming from a domain that is not on your list of allowed domains.
const response = await fetch('https://platform.cryo-mix.com/api/api-checkout', {
method: 'POST',
headers: {
'X-Api-Key': 'your-api-key-here',
'Session-Id': 'unique-session-id',
'Source': 'Mastering API',
},
body: JSON.stringify({
first_name: 'John',
last_name: 'Doe',
email: 'john.doe@example.com',
marketing_consent: true
})
});
const result = await response.json();
console.log(result.status);
curl -X POST https://platform.cryo-mix.com/api/api-checkout \
-H "X-Api-Key: your-api-key-here" \
-H "Session-Id: unique-session-id" \
-H "Source: Mastering API" \
-H "Origin: your-domain.com" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"marketing_consent": true
}'
Before using this endpoint, please ensure you have an active metered billing subscription.
• The Session-Id
is the same identifier used when uploading the file.
• Use the Get Download Signed URL endpoint to get the purchased final files.