Pagos
Pagos: pagos fijos más una demo de Idempotency-Key al crear (repetición, 422 si el cuerpo es distinto, 409 mientras está en curso) y reembolsos. La tarjeta que termina en 0002 siempre se rechaza.
Tu cuenta desbloquea estos endpoints. Usa Try it en la página de cada endpoint para enviar peticiones.
Estos endpoints necesitan una cuenta gratuita. Crea una o inicia sesión para ver sus detalles y probarlos aquí.
- GET
https://api.testingapis.com/api/PaymentsList payments with filtering, search, sorting and paginationList payments with filtering, search, sorting and pagination. - POST
https://api.testingapis.com/api/PaymentsCreate a paymentCreate a payment. Requires an Idempotency-Key header. - GET
https://api.testingapis.com/api/Payments/{id}Get a payment by IDGet a payment by ID. - POST
https://api.testingapis.com/api/Payments/{id}/refundRefund a succeeded paymentRefund a succeeded payment.
Petición de ejemplo
List payments with filtering, search, sorting and pagination. Referencia completa y botón Send (en inglés).
cURL
curl -X GET "https://api.testingapis.com/api/Payments?limit=2"Respuesta · 200 OK
[
{
"id": 1,
"userId": 101,
"orderId": 1,
"amount": 249.99,
"currency": "USD",
"method": "card",
"status": "succeeded",
"description": "Order #1 — headphones",
"cardLast4": "4242",
"createdAt": "2025-07-01T10:15:00Z",
… (3 more lines)Inicia sesión para ver los detalles
Los parámetros, los ejemplos de petición y respuesta y el panel Try it en vivo de estos endpoints son para miembros con sesión iniciada. Las cuentas son gratuitas y se crean en unos segundos.