Payments
Payments object
This operation creates a payment.
Note: This operation needs Authentication and supports the following features:
Idempotency
Authorizations
AuthorizationstringRequired
Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Header parameters
Idempotency-Keystring · min: 8 · max: 64OptionalExample:
Unique key to ensure idempotent requests.
4809a25c-b188-4abb-a698-f2d02d35dd9aPattern: ^[0-9a-fA-F-]+$Body
Responses
201
The payment was successfully created.
application/vnd.api+json
400
Bad request.
application/vnd.api+json
401
Unauthorized.
application/vnd.api+json
409
Conflict
application/vnd.api+json
422
Unprocessable entity.
application/vnd.api+json
429
Too many requests.
application/vnd.api+json
500
Internal Server Error.
application/vnd.api+json
503
Service is unavailable.
application/vnd.api+json
post/v1/payments
POST /pos/v1/payments HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 316
{
"data": {
"type": "payments",
"attributes": {
"amount": "100.25",
"notes": "Payment notes",
"roomNumber": "101",
"tipAmount": "15.25"
},
"relationships": {
"order": {
"data": {
"id": "4014e105-57d6-4b12-a4fc-164601ec53e9",
"type": "orders"
}
},
"paymentMethod": {
"data": {
"id": "4014e105-57d6-4b12-a4fc-164601ec53e9",
"type": "paymentMethods"
}
}
}
}
}{
"data": {
"id": "5624013b-5293-48b1-a07a-e7ee01cbde6a",
"type": "payments",
"attributes": {
"amount": "100.00",
"notes": "Payment notes",
"roomNumber": "101",
"tipAmount": "15.00",
"createdAt": "2021-06-29T08:00:00Z",
"updatedAt": "2021-06-29T08:00:00Z"
},
"relationships": {
"order": {
"data": {
"id": "4014e105-57d6-4b12-a4fc-164601ec53e9",
"type": "orders"
}
},
"paymentMethod": {
"data": {
"id": "4014e105-57d6-4b12-a4fc-164601ec53e9",
"type": "paymentMethods"
}
},
"register": {
"data": {
"id": "4014e105-57d6-4b12-a4fc-164601ec53e9",
"type": "registers"
}
}
}
}
}Last updated
Was this helpful?