Payment transaction record for an order. Tracks payment details, transaction ID, amount, payment method, status, and card information (last 4 digits and brand for card payments).
https://api.mockly.codes/payments?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/paymentsGet a collection of payments
/commerce/payments/payments/:idGet a single payment by ID
/commerce/payments/:id/payments/metaGet resource metadata and schema
/commerce/payments/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/payments?q=laptopGET https://api.mockly.codes/payments?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 payments
fetch('https://api.mockly.codes/payments?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/payments?count=10'
)
data = response.json()curl "https://api.mockly.codes/payments?count=10"fetch('https://api.mockly.codes/payments?nocache=true')idintegerUnique identifier for the payment record
random_inttransaction_idstringUnique transaction identifier from the payment processor or gateway
transaction_idorder_idintegerForeign key reference to the order this payment is for
random_intcustomer_idintegerForeign key reference to the customer who made the payment
random_intamountnumberPayment amount charged to the customer
pricecurrencystringISO currency code for the payment amount (e.g., USD, EUR, GBP)
currencymethodstringPayment method used (e.g., credit_card, debit_card, paypal, bank_transfer, apple_pay)
payment_methodstatusstringPayment processing status (e.g., pending, processing, completed, failed, refunded)
payment_statuscard_last4stringLast 4 digits of the credit/debit card used for payment (if applicable)
card_last4card_brandstringCard brand or network (e.g., Visa, Mastercard, American Express, Discover) if card payment
card_brandcreated_atstringTimestamp when the payment was initiated
past_datedate-timeprocessed_atstringTimestamp when the payment was successfully processed and completed
past_datedate-timecountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request