Paiements
Paiements : des paiements fixes plus une démo d’Idempotency-Key à la création (rejeu, 422 pour un corps différent, 409 pendant le traitement) et des remboursements. La carte finissant par 0002 est toujours refusée.
- GET
https://api.testingapis.com/api/PaymentsList payments with filtering, search, sorting and pagination. - POST
https://api.testingapis.com/api/PaymentsCreate a payment. Requires an Idempotency-Key header. - GET
https://api.testingapis.com/api/Payments/{id}Get a payment by ID. - POST
https://api.testingapis.com/api/Payments/{id}/refundRefund a succeeded payment.
Exemple de requête
List payments with filtering, search, sorting and pagination. Référence complète et bouton Send (en anglais).
cURL
curl -X GET "https://api.testingapis.com/api/Payments?limit=2"Réponse · 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)