Payment transactions

A payment transaction stores information about a payment.

Fields

class PaymentTransaction
amount: string

The payment transaction’s amount.

campaign: integer

The campaign the job belongs to.

id: string

The payment transaction’s unique ID.

job: integer

The job for which the payment was made.

reference: string

Your reference for this job (e.g. customer ID), which must be unique within the campaign.

state: integer

The payment transaction’s state.

  • 0 = started

  • 1 = succeeded

  • 2 = failed

team: integer

The payment transaction’s team.

timestamp: datetime

The payment transaction’s date and time.

API

GET /j/payment_transactions

Retrieves the list of payment transactions.

You must specify a start date and an end date.

Example request:

GET /j/payment_transactions?start=2015-01-06T00:00:00Z&end=2015-01-07T00:00:00Z&team=1 HTTP/1.1
Authorization: Bearer 0a1b2c3d4e5f

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

[
   {
      "amount": "12.34",
      "campaign": 1,
      "id": "1832d01c-661c-4c1d-abab-1d88c645d8e3",
      "job": 1,
      "reference": "123456",
      "state": 0,
      "team": 1,
      "timestamp": "2015-01-06T10:21:14.243Z"
    }
]
Request Headers:
Query Parameters:
  • end (datetime) – An end date and time.

  • start (datetime) – A start date and time.

  • team (integer) – An optional team ID.

Response JSON Array of Objects:
  • amount (string) – The payment transaction’s amount.

  • campaign (integer) – The campaign the job belongs to.

  • id (string) – The payment transaction’s unique ID.

  • job (integer) – The job for which the payment was made.

  • reference (string) – Your reference for this job (e.g. customer ID), which must be unique within the campaign.

  • state (integer) – The payment transaction’s state.

  • team (integer) – The payment transaction’s team.

  • timestamp (datetime) – The payment transaction’s date and time.

Status Codes:
  • 200 OK – no error

  • 400 Bad Request – for instance a required field is missing

  • 403 Forbidden – you tried to access a forbidden resource, check you provided a valid OAuth token