Pembayaran
Pembayaran: data pembayaran tetap ditambah demo Idempotency-Key saat membuat (replay, 422 untuk body berbeda, 409 saat masih diproses) dan refund. Kartu berakhiran 0002 selalu ditolak.
Akun Anda membuka endpoint ini. Pakai Try it di halaman tiap endpoint untuk mengirim request.
Endpoint ini butuh akun gratis. Buat akun atau masuk untuk melihat detailnya dan mencobanya di sini.
- 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.
Contoh request
List payments with filtering, search, sorting and pagination. Referensi lengkap dan tombol Send (dalam bahasa Inggris).
cURL
curl -X GET "https://api.testingapis.com/api/Payments?limit=2"Response · 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)Masuk untuk melihat detailnya
Parameter, contoh request dan response, serta panel Try it langsung untuk endpoint ini khusus anggota yang sudah masuk. Akun gratis dan dibuat dalam beberapa detik.