Payments API

create new entry

POST /api/rest/admin/payments

Parameters

Name Description
data[type] Resource type (payments)
data[attributes][amount] Amount
data[attributes][notes] Notes
data[relationships][account] Account

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NTgsInN1YiI6MTQyfQ.UtXGAYmLVOYzzNckaL7rqhSDFS4Qw0HHFMzIOy4oil4
Host: example.org
Cookie: 

Route

POST /api/rest/admin/payments

Body

{"data":{"type":"payments","attributes":{"amount":10},"relationships":{"account":{"data":{"type":"accounts","id":83}}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"d973d37af28165ebdd7f508f01dc869e"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: d3a8ab24-af47-47e2-96cd-11c21323137e
X-Runtime: 0.032168
Content-Length: 409

Status

201 Created

Body

{
  "data": {
    "id": "34",
    "type": "payments",
    "links": {
      "self": "http://example.org/api/rest/admin/payments/34"
    },
    "attributes": {
      "amount": "10.0",
      "notes": null,
      "status": "completed",
      "type-name": "manual"
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://example.org/api/rest/admin/payments/34/relationships/account",
          "related": "http://example.org/api/rest/admin/payments/34/account"
        },
        "data": {
          "type": "accounts",
          "id": "83"
        }
      }
    }
  }
}