Skip to main content
POST
https://enterprise.spacemedia.uk
/
api
/
v1
/
order
/
{release}
/
checkout
/
airwallex
Create Airwallex Release Checkout
curl --request POST \
  --url https://enterprise.spacemedia.uk/api/v1/order/{release}/checkout/airwallex \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cancel_url": "https://demo-label.example.test/billing/cancel",
  "success_url": "https://demo-label.example.test/billing/success"
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    cancel_url: 'https://demo-label.example.test/billing/cancel',
    success_url: 'https://demo-label.example.test/billing/success'
  })
};

fetch('https://enterprise.spacemedia.uk/api/v1/order/{release}/checkout/airwallex', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://enterprise.spacemedia.uk/api/v1/order/{release}/checkout/airwallex",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'cancel_url' => 'https://demo-label.example.test/billing/cancel',
    'success_url' => 'https://demo-label.example.test/billing/success'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://enterprise.spacemedia.uk/api/v1/order/{release}/checkout/airwallex"

payload = {
    "cancel_url": "https://demo-label.example.test/billing/cancel",
    "success_url": "https://demo-label.example.test/billing/success"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "success": true,
  "payment-intent-id": "80a6bb2d-1f32-4a4d-915f-fb0f8ec43f59",
  "redirection-url": "https://checkout.example.test/80a6bb2d-1f32-4a4d-915f-fb0f8ec43f59"
}
{
  "success": false,
  "message": "Missing bearer token"
}
{
  "success": false,
  "message": "This action is unauthorized."
}
{
  "success": false,
  "message": "Resource not found"
}
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "title": [
      "The title field is required."
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept
string

Use application/json for API responses.

Authorization
string

Bearer access token. Use Bearer <YOUR_ACCESS_TOKEN>.

Path Parameters

release
string
required

Route identifier for release.

Body

application/json

The body is of type object.

Response

Success

The response is of type object.