Back to top

Veoo Direct Carrier Billing API

This API provides a gateway for allowing customers to purchase products defined in the Veoo portal.

The recommended method of integration is using the iframe-helper.js script to overload links to the public endpoint.

Public endpoint

.

Sending a user to this URL will initiate a purchase of the specified product as defined in the portal. The endpoint requires no parameters beyond product id - all options are configured in the portal. However, any query parameters will be stored and returned with all notifications.

Initiate a purchase
GET/purchase/{product_id}

Example URI

GET https://dcb.veoo.com/purchase/product_id
URI Parameters
HideShow
product_id
UUID (required) 

Identifier for this product. This should be visible in the DCB section of the portal.

Response  200
HideShow
Headers
Content-Type: text/html
Body
A payment form.
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "Unknown product"
}

Iframe Helper script

This helper script will search the page for links pointing to the public endpoint and cause them to load the payment form in an iframe.

The script requires jQuery to work, although it does not itself include it.

An example integration:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://dcb.veoo.com/iframe-helper.js"></script>
        
<a href="https://dcb.veoo.com/purchase/de305d54-75b4-431b-adb2-eb6b9e546014">Purchase the video</a>

iframe-helper.js

iframe-helper.js
GET/iframe-helper.js

Example URI

GET https://dcb.veoo.com/iframe-helper.js
Response  200
HideShow
Headers
Content-Type: text/javascript
Body
A helper script to be used on your page.

Notifications

When any update occurs on a transaction the system will attempt to POST the update to the notification URL defined on the associated liveservice in the Veoo Portal.

Notification structure

Notification structure
POST/endpoint-on-your-server

Example URI

POST https://dcb.veoo.com/endpoint-on-your-server
Request
HideShow
Headers
Content-Type: application/json
Body
{
  transaction: {
    id: '027b39d4-6e92-4777-a99b-65dd98ef1781',
    price: 25,
    price_recurring: 0,
    period_initial: 0,
    period_recurring: 0,
    subscription: false,
    status: 'completed',
    msisdn: 074111234567,
    product_id: '08e97fef-43ae-4da1-ae61-8164a2d78ce8',
    created_at: Tue Dec 01 2015 23:34:41 GMT+0000 (GMT),
    updated_at: Tue Mar 08 2016 16:28:27 GMT+0000 (GMT)
  },
  update: {
    network: 'three_uk',
    msisdn: 074111234567
  },
  status: 'completed'
}
Response  200
HideShow
Body
OK

Last updated at 05 Jan 2017 10:01