Skip to content
Status

Get a contract

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

GET
/contracts/{contract_id}

Retrieve details of a specific contract, by its ID or the alt_key you gave it.

You can expand the following fields:

  • account
  • created_session
  • payment_method
  • last_transaction
  • last_charge
  • updated_session
contract_id
required
string

The contract’s ID (co_...), or the alt_key you gave it.

expand
string

Fields to expand into full objects

Contract details

Media typeapplication/json
object
contract
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

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?