Pagos (Tarjetas guardadas)
Referencia de 6 endpoints generados desde mosend-wb-backend/src/modules/payment-methods/payment-methods.controller.ts.
Base path:
/organizations/:orgId/billing·6 endpoints·Source: mosend-wb-backend/src/modules/payment-methods/payment-methods.controller.ts/organizations/:orgId/billing/payment-methods bearer
Lista las tarjetas guardadas de la organización (sin exponer tokens MP).
Path params
orgIdstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/billing/payment-methods' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
}
],
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/billing/payment-methods bearer
Guarda una tarjeta nueva tokenizando el `token` que viene del frontend.
Path params
orgIdstringrequerido
Body (JSON)
tokenstringrequeridoemailstring · emailrequeridofirstNamestringlastNamestring
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/billing/payment-methods' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"token": "<token>","email": "persona@empresa.com","firstName": "<firstName>","lastName": "<lastName>"}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/billing/payment-methods/:id bearer
Borra una tarjeta de MP y de la BD.
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 200
curl -X DELETE 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/billing/payment-methods/00000000-0000-0000-0000-000000000000' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/billing/payment-methods/:id/default bearer
Marca una tarjeta como default; las otras quedan en isDefault=false.
Path params
orgIdstringrequeridoidstringrequerido
Respuestas
- 201
curl -X POST 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/billing/payment-methods/00000000-0000-0000-0000-000000000000/default' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/billing/preferences bearer
Estado actual de cobro automático (autoPayEnabled + autoPayMethodId).
Path params
orgIdstringrequerido
Respuestas
- 200
curl -X GET 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/billing/preferences' \ -H 'X-Api-Key: mk_live_<prefix>.<secret>'
Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"createdAt": "2026-05-01T03:42:18.123Z"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}/organizations/:orgId/billing/auto-pay bearer
Activa o desactiva el cobro automático mensual.
Path params
orgIdstringrequerido
Body (JSON)
enabledbooleanrequeridomethodIdstring · uuid
Respuestas
- 200
curl -X PATCH 'https://api.mosend.dev/organizations/a1b2c3d4-1234-5678-9abc-def012345678/billing/auto-pay' \
-H 'X-Api-Key: mk_live_<prefix>.<secret>' \
-H 'Content-Type: application/json' \
-d '{"enabled": true,"methodId": "00000000-0000-0000-0000-000000000000"}'Response · 200
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string"
},
"timestamp": "2026-05-01T03:42:18.123Z"
}