← payments API
PaymentMethods
Singular: PaymentMethod — Base URL: https://payments-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)
Try it now
beta
Response (live)
Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.
Example response (recorded) sample
A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.
{
"payload": {
"_id": "6ac47a69876fb3b18d0ecdff",
"isDefault": false,
"status": "active",
"createdBy": "6045f4d25704710012485569",
"shares": [],
"createdAt": "2026-10-06T04:34:49.044Z",
"updatedAt": "2026-10-06T04:34:49.044Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://payments-api.ayoune.app/paymentmethods/6ac47a69876fb3b18d0ecdff",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "Consumers",
"title": "MODEL_CONSUMER",
"href": "https://api.ayoune.app/crm/consumers",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "crm.consumers"
},
{
"rel": "Websites",
"title": "MODEL_WEBSITE",
"href": "https://api.ayoune.app/cms/websites",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "cms.websites"
}
],
"debugId": "6ac47a69876fb3b18d0ece47",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_PAYMENTMETHOD",
"href": "https://api.ayoune.app/payments/paymentmethods/6ac47a69876fb3b18d0ecdff/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_PAYMENTMETHOD",
"href": "https://api.ayoune.app/payments/paymentmethods/6ac47a69876fb3b18d0ecdff",
"method": "delete",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.10.0",
"core": "2026.364.0"
},
"rateLimit": {
"limit": "10000",
"remaining": "9958",
"reset": "1791264883",
"resetDate": "Tue Oct 06 2026"
},
"responseTime": 96.548871,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /paymentmethods |
List with filters/pagination | payments.paymentmethods.view |
| GET | /paymentmethods/:id |
Single record | payments.paymentmethods.view |
| POST | /paymentmethods |
Create new record | payments.paymentmethods.new |
| PUT | /paymentmethods |
Update record | payments.paymentmethods.edit |
| DELETE | /paymentmethods/:id |
Delete record | payments.paymentmethods.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.payments.paymentMethods.find().limit(10).exec();
// Single record
const one = await ay.payments.paymentMethods.findById('OBJECT_ID').exec();
// Create
const created = await ay.payments.paymentMethods.create({ name: 'Foo' });