# Create a payment

`POST https://app.shuttleglobal.com/c/api/instances/{instance_key}/contracts/{contract_id}/payment`

For recurring payments which have an amount overdue you can instruct us to attempt payment
of the outstanding balance on either the default payment method or an alternative one.

## Authentication

- basicAuth: Basic Authentication using secret key
- bearerAuth: OAuth 2.0 Bearer Token Authentication

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `contract_id` | path | string | yes | The contract's ID (`co_...`), or the `alt_key` you gave it. |

## Request body (`application/json`), required

- `amount` (string): Amount to process. By default the total outstanding. Cannot be greater than outstanding amount. Not available for split payments (enterprise)
- `payment_method` (string): Payment method to use. By default the contract's payment method will be used

## Responses

### 200: Created transaction

```json
{
  "transaction": {
    "account": "string",
    "action": "PAYMENT",
    "alt_key": "string",
    "amount": "string",
    "authorisation_code": "string",
    "authorised": "string",
    "balance": "string",
    "browser_ip_address": "string",
    "browser_accept_header": "string",
    "browser_javascript": true,
    "browser_locale": "string",
    "browser_user_agent": "string",
    "browser_size": "string",
    "browser_java_enabled": true,
    "browser_color_depth": "string",
    "browser_timezone": "string",
    "captures": [
      "string"
    ],
    "captured": "string",
    "channel": "string",
    "contract": "string",
    "created": "2026-01-01T12:00:00Z",
    "created_session": "string",
    "currency": "string",
    "description": "string",
    "designation": "string",
    "division": "string",
    "expires": "2026-01-01T12:00:00Z",
    "gateway": "string",
    "gateway_message": "string",
    "gateway_metadata": {},
    "gateway_reference": "string",
    "gateway_status": "string",
    "gateway_view_transaction": "string",
    "id": "string",
    "initiated": "2026-01-01T12:00:00Z",
    "initiative": "string",
    "legal_entity": "string",
    "next_attempt": "string",
    "metadata": {},
    "parts": [
      "string"
    ],
    "payment_method": "string",
    "payment_method_used_token": true,
    "processed": "2026-01-01T12:00:00Z",
    "redirect_url": "string",
    "reason": "string",
    "reference": "string",
    "refunds": [
      "string"
    ],
    "refund": "string",
    "refunded": "string",
    "resolved": "2026-01-01T12:00:00Z",
    "settle_currency": "string",
    "settle_fee_amount": "string",
    "settle_gross_amount": "string",
    "settle_net_amount": "string",
    "source": "ECOMMERCE",
    "source_transaction": "string",
    "status": "SUCCESS",
    "sub_status": "NO_ACTION_REQUIRED",
    "sub_status_reason": "follow_bank_transfer_instructions",
    "target_date": "2026-01-01T12:00:00Z",
    "updated": "2026-01-01T12:00:00Z",
    "updated_session": "string",
    "voided": "string",
    "voids": [
      "string"
    ],
    "v": 0,
    "workflows": [
      "string"
    ],
    "workflow_status": "OK"
  }
}
```

### 400: Bad request

```json
{
  "code": "string",
  "message": "string"
}
```

### 401: Unauthorised: the API key is missing or not valid

```json
{
  "code": "UNAUTHORIZED",
  "message": "Unauthorised"
}
```

## Example request

```sh
curl --request POST \
  --url https://app.shuttleglobal.com/c/api/instances/YOUR_INSTANCE_KEY/contracts/CONTRACT_ID/payment \
  --header 'Authorization: Basic <base64 of SECRET_KEY:>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

Reference page: https://docs.shuttleglobal.com/platforms/reference/operations/contractcreatepayment/