Skip to content
Status

List contracts

GEThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/contracts

GET
/contracts

Search and filter contract objects with pagination support.

Available fields for criteria and order: id, account, alt_key, channel, completed, created, designation, division, frequency, gateway, initiative, legal_entity, next_charge, next_payment, nonce, occurrences, outstanding_amount, payment_method, retry_complete, retry_count, scheduler, status, updated

criteria
string

Search criteria for filtering contracts. Available fields: id, account, alt_key, channel, completed, created, designation, division, frequency, gateway, initiative, legal_entity, next_charge, next_payment, nonce, occurrences, outstanding_amount, payment_method, payment_method_status, payment_method_expires, retry_complete

(Y/N)

  • retry_count
  • scheduler (Y/N)
  • status
  • updated

Examples:

  • status=ACTIVE;FAILING
  • account=acc_12345_67890
  • scheduler=Y
  • next_payment<>2024-01-01;2024-12-31
order
string

Sort order for results. Supports any field that criteria supports. Defaults to created:desc if not specified. Append :desc for descending order. Separate multiple order fields with commas.

Examples:

  • order=next_payment
  • order=status,created:desc
expand
string

Fields to expand into full objects. Separate multiple fields with commas.

Available fields:

  • account (account object)
  • payment_method (payment method object)
  • gateway (gateway object)
  • legal_entity (legal entity object)
  • initiative (initiative object)
  • designation (designation object)
  • channel (channel object)
  • last_transaction (transaction object)
  • last_charge (charge object)
  • created_session (session object)
  • updated_session (session object)

Example: expand=account,payment_method,last_transaction

limit
integer

Number of records to return: 20 if not set, at most 1000.

offset
integer

Number of records to skip before the first one returned. offset + limit can’t exceed 5000; to read further, page by a field such as created instead. See Paging through results.

List of contracts

Media typeapplication/json
object
contracts
Array<object>

A contract representing a one-time or recurring payment agreement

object
account
string

Associated account ID

alt_key
string

Your reference for the contract

amount
string

Contract amount

channel
string

Channel ID

completed
string · date-time

When the contract was completed

created
string · date-time

When the contract was created

currency
string

Currency code

description
string

Description passed to the payment API

designation
string

Designation ID

frequency
string · enum

Payment frequency for recurring contracts

Allowed values: WEEKLY FORTNIGHTLY BIMONTHLY MONTHLY QUARTERLY BIANNUALLY ANNUALLY
gateway
string

Payment gateway ID

id
string

Contract ID

initiated
string · date-time

When the contract was initiated

initiative
string

Initiative ID

keep_active_until
string · date-time

Optional. When set to a future date, the contract stays active until this date even after its final scheduled payment is collected, so mid-term amendments can still be applied. Once the date has passed and no balance is outstanding, the contract completes normally. Omitted when not set.

last_charge
string

ID of the last charge

last_transaction
string

ID of the last transaction

legal_entity
string

Legal entity ID

metadata
object
e.g. { "order_id": "12345", "customer_reference": "CUS-001"}

Custom key-value pairs stored on the contract

object
key
additional properties
string
next_contract
string

ID of the successor contract (created when amount or frequency is changed)

next_payment
string · date-time

When the next payment will be attempted

nonce
string

Unique identifier for duplicate payment prevention. If the same nonce is submitted within 24 hours:

  1. No new contract will be created
  2. The success status of the previous contract will be returned
account_alt_key
string

Your identifier for the account on this contract

charge_count
integer

Number of charges raised on this contract

event_date
string · date-time

Event date associated with the payment

outstanding_amount
string

Amount remaining to be paid

payment_method
string

Payment method ID

recurring
boolean

Whether this is a recurring contract

retry_complete
boolean

Whether retry attempts are exhausted

retry_count
integer

Number of retry attempts made

status
string · enum

Current contract status

Allowed values: SETUP ACTIVE FAILING PENDING SUSPENDED UNRESOLVED COMPLETED CANCELLED CANCELLING
updated
string · date-time

When the contract was last modified

meta
object
object
limit
integer
offset
integer
total
integer

Bad request

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Unauthorised: the API key is missing or not valid

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Example
{
"code": "UNAUTHORIZED",
"message": "Unauthorised"
}

Was this page helpful?