payments

Upload a payment document

Changed on

Handles the uploading of a document to a payment

post/api/v1/payments/{id}/upload

Request

Path parameters

idstring string required

The Payment Hashed ID

Query parameters

includestring
Example:first_load

Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Request body multipart/form-data

_methodstring
documentsstring[]

Example request

{
  "_method": "PUT"
}

Response

Returns the Payment object

idstring

The payment hashed id

client_idstring

The client hashed id

invitation_idstring

The invitation hashed id

client_contact_idstring

The client contact hashed id

user_idstring

The user hashed id

type_id'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33'

The payment type used to complete this payment

datestring

The Payment date

transaction_referencestring

The transaction reference as defined by the payment gateway

assigned_user_idstring

The assigned user hashed id

private_notesstring

The private notes of the payment

is_manualboolean

Flags whether the payment was made manually or processed via a gateway

is_deletedboolean

Defines if the payment has been deleted

amountnumber

The amount of this payment

refundednumber

The refunded amount of this payment

updated_atnumber

Timestamp

archived_atnumber

Timestamp

company_gateway_idstring

The company gateway id

numberstring

The payment number - is a unique alpha numeric number per payment per company

category_idstring

The unique identifier of the payment category

custom_value1string

Custom field for storing additional information

custom_value2string

Custom field for storing additional information

custom_value3string

Custom field for storing additional information

custom_value4string

Custom field for storing additional information

exchange_currency_idstring

The unique identifier of the exchange currency

exchange_ratenumber float

The exchange rate used for currency conversion

idempotency_keystring

Unique key to ensure idempotent payment processing

Example response

{
  "id": "Opnel5aKBz",
  "client_id": "Opnel5aKBz",
  "invitation_id": "Opnel5aKBz",
  "client_contact_id": "Opnel5aKBz",
  "user_id": "Opnel5aKBz",
  "type_id": "1",
  "date": "1-1-2014",
  "transaction_reference": "xcsSxcs124asd",
  "assigned_user_id": "Opnel5aKBz",
  "private_notes": "The payment was refunded due to error",
  "is_manual": true,
  "is_deleted": true,
  "amount": 10,
  "refunded": 10,
  "updated_at": 1434342123,
  "archived_at": 1434342123,
  "company_gateway_id": "3",
  "paymentables": {
    "id": "AS3df3A",
    "invoice_id": "AS3df3A",
    "credit_id": "AS3df3A",
    "refunded": 10,
    "amount": 10,
    "updated_at": 1434342123,
    "created_at": 1434342123
  },
  "invoices": [
    {
      "invoice_id": "Opnel5aKBz",
      "amount": "2"
    }
  ],
  "credits": [
    {
      "credit_id": "Opnel5aKBz",
      "amount": "2"
    }
  ],
  "number": "PAY_101",
  "category_id": "Opnel5aKBz",
  "custom_value1": "Payment reference 123",
  "custom_value2": "Approved by John",
  "custom_value3": "Urgent payment",
  "custom_value4": "Q1 2024",
  "exchange_currency_id": "2",
  "exchange_rate": 1,
  "idempotency_key": "key_1234567890abcdef"
}

Changes

    • info

      the response optional property became read-only for the status

    • info

      the response optional property / became read-only for the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status