Skip to main content
POST
/
bundles
Create bundle
curl --request POST \
  --url https://api.truust.io/2.0/bundles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Test product",
  "value": 1.24
}
'
{
  "id": 123,
  "self": "<string>",
  "name": "<string>",
  "description": "<string>",
  "value": 123,
  "value_shipping": 123,
  "currency": "EUR",
  "amount": "<string>",
  "amount_shipping": "<string>",
  "buyer_link": "<string>",
  "images": [
    "<string>"
  ],
  "expiration": "2023-11-07T05:31:56Z",
  "expiration_unit": 123,
  "expiration_amount": 123,
  "is_expired": true,
  "is_active": true,
  "is_shippable": true,
  "tag": "<string>",
  "visits": 123,
  "metadata": {},
  "created_by": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "qr_link": "<string>",
  "connections": {}
}

Authorizations

Authorization
string
header
required

Use your account's Secret Key as the Bearer token.

Body

application/json
name
string
required

Bundle name visible on the checkout page.

Maximum string length: 120
Example:

"Test product"

description
string

Longer description of the product.

Maximum string length: 255
value
number<float>

Price of the product.

Required range: x >= 0
Example:

1.24

is_active
boolean

Whether the product link is available (true) or unavailable (false).

is_shippable
boolean

Whether the product can be shipped. If true, the checkout will ask for shipping details.

value_shipping
number<float>

Shipping cost. Required if is_shippable is true.

Required range: x >= 0
tag
string

Optional short tag for the product.

Maximum string length: 50
metadata
object

Array to save any other data needed.

images
string[]

Array of product image URLs.

expiration
string<date-time>

Expiration date for the product link.

expiration_unit
number

Expiration unit if stock is limited.

expiration_amount
number

Expiration amount for reduced/augmented prices.

buyer_confirmed_url
string<uri>

URL where the buyer is redirected after payment is completed.

buyer_denied_url
string<uri>

URL where the buyer is redirected if payment fails.

seller_confirmed_url
string<uri>

URL where the seller is redirected after the payout is completed.

seller_denied_url
string<uri>

URL where the seller is redirected if the payout fails.

Response

Bundle created

id
integer
self
string
name
string
description
string | null
value
number
value_shipping
number | null
currency
string
Example:

"EUR"

amount
string | null

Formatted price with currency symbol.

amount_shipping
string | null
images
string[] | null
expiration
string<date-time> | null
expiration_unit
number | null
expiration_amount
number | null
is_expired
boolean
is_active
boolean
is_shippable
boolean
tag
string | null
visits
integer | null
metadata
object
created_by
integer | null
created_at
string<date-time> | null
updated_at
string<date-time> | null
connections
object

Hypermedia links to related resources.