POST
/
business
/
{business}
/
payments
curl --request POST \
  --url https://stage.tonder.io/api/v1/business/{business}/payments/ \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 1200,
  "date": "2023-12-15T22:45:06.506Z",
  "order": 5728
}'
{
  "pk": 5943,
  "order": null,
  "amount": "1200.0000",
  "status": "PENDING",
  "date": "2024-01-18T10:18:39.800536-06:00",
  "paid_date": null,
  "shipping_address": {
    "street": "N/a",
    "number": "N/a",
    "suburb": "N/a",
    "city": {
      "name": "N/a"
    },
    "state": {
      "name": "N/a",
      "country": {
        "name": "N/a"
      }
    },
    "zip_code": "N/a"
  },
  "shipping_address_id": null,
  "billing_address": {
    "street": "N/a",
    "number": "N/a",
    "suburb": "N/a",
    "city": {
      "name": "N/a"
    },
    "state": {
      "name": "N/a",
      "country": {
        "name": "N/a"
      }
    },
    "zip_code": "N/a"
  },
  "billing_address_id": null,
  "client": null,
  "customer_order_reference": null
}

The Authorization needs to be in the following format:

Authorization: Token <YOUR_API_KEY>

This endpoint enables the creation of a new payment by using the unique identifier of a preexisting order.

Path Parameters

business
string
required

A business unique identifier.

Body

application/json
amount
number
required

The total monetary value associated with the order.

Example:

1200

date
string
required

The timestamp representing the date and time of the order.

Example:

"2023-12-15T22:45:06.506Z"

order
integer
required

The unique identifier number for the order.

Example:

5728

Response

201
application/json
Successful response
pk
integer

The primary key or identifier associated with the payment.

Example:

5943

order
integer

The unique identifier number associated with the order.

Example:

null

amount
string

The total monetary value of the order.

Example:

"1200.0000"

status
string

The current status of the order.

Example:

"PENDING"

date
string

The timestamp indicating the date and time the payment was created.

Example:

"2024-01-18T10:18:39.800536-06:00"

paid_date
string

The timestamp indicating the date and time the order was paid, or null if not paid.

Example:

null

shipping_address
object

Details of the shipping address in the order.

shipping_address_id
integer

The identifier associated with the shipping address in the order.

Example:

null

billing_address
object

Details of the billing address in the order.

billing_address_id
string

The identifier associated with the billing address in the order.

Example:

null

client
string

The identifier or reference associated with the client or customer.

Example:

null

customer_order_reference
string

The customer's reference or identifier associated with the order.

Example:

null