GET/api/v1/payments
Test payments, newest first, with filters.
- CLI
sendmock payments list- MCP tool
sendmock_payment_list- In the app
- Payments
Answer
200 PageOf_PaymentSummary
/api/v1/paymentsTest payments, newest first, with filters.
sendmock payments listsendmock_payment_list200 PageOf_PaymentSummary
/api/v1/paymentsCreate a payment and pay it with a test card, as an app's server does without a checkout page.
sendmock payments createsendmock_payment_createPaymentCreateRequest : Body of POST /api/v1/payments: a payment the app's server pays with a test card.
| Field | Type | Description |
|---|---|---|
| provider | string | The gateway key, e.g. stripe or sslcommerz.Example: stripe |
| amount_minor | number | The amount in the currency's minor unit (cents, paisa; JPY has none); 1999 is 19.99.Example: 1999 |
| currency? | string | Three letters, stored in capitals; Settings > Payments' default currency when left out.Example: USD |
| card_number | string | A test card of the card method; its outcome in the test card table decides the payment. A number the table does not list is refused and kept nowhere.Example: 4242424242424242 |
| customer_email? | string | The customer's email.Example: [email protected] |
| line_items? | object[] | What is being bought. |
| capture_method? | PaymentCaptureMethod | manual authorizes the payment and waits for a capture or void; automatic when left out.One of: automatic, manualExample: automatic |
201 PaymentDetail
Errors: 400, 404, 422, as { error: { code, message } }
/api/v1/payments/test-cardsThe test values of every enabled payment method.
sendmock payments test-cardssendmock_payment_test_cards200 PaymentMethodDefinition[]
/api/v1/payments/{paymentId}One payment with line items, timeline, redirects and notifications.
sendmock payments show <paymentId>sendmock_payment_get200 PaymentDetail
Errors: 404, as { error: { code, message } }
/api/v1/payments/{paymentId}/notifySend the payment's notification (IPN or webhook) again.
sendmock payments notify <paymentId>sendmock_payment_notify200 PaymentDetail
Errors: 404, 409, as { error: { code, message } }
/api/v1/payments/{paymentId}/simulateMove the payment on: capture, refund, dispute, fail.
sendmock payments simulate <paymentId> <action>sendmock_payment_simulatePaymentSimulateRequest : Body of POST /api/v1/payments/{paymentId}/simulate.
| Field | Type | Description |
|---|---|---|
| action | PaymentSimulateAction | What happens to the payment: succeed, decline, refund, dispute, answer_dispute, resolve_dispute, expire, capture or void.One of: succeed, decline, refund, dispute, answer_dispute, resolve_dispute, expire, capture, voidExample: refund |
| decline_reason? | DeclineReason | For decline: why the bank declined.One of: insufficient_funds, expired_card, incorrect_cvc, generic_decline, fraudulent, authentication_failedExample: insufficient_funds |
| refund_amount_minor? | number | For refund: the amount in minor units; the full amount when left out.Example: 500 |
| dispute_outcome? | "won" | "lost" | For resolve_dispute: won or lost.One of: won, lostExample: won |
| dispute_evidence? | string | For answer_dispute: the evidence sent to the bank.Example: Signed delivery receipt attached. |
| webhook_endpoint_ids? | Ulid[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide. |
| webhook_requests? | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads. |
200 PaymentDetail
Errors: 400, 404, 409, 422, as { error: { code, message } }
/api/v1/payments/checkoutStart a hosted checkout on a gateway and get its payment page URL.
sendmock payments checkout createsendmock_payment_create_checkoutPaymentCheckoutCreateRequest : Body of POST /api/v1/payments/checkout: a hosted test checkout.
| Field | Type | Description |
|---|---|---|
| provider | string | The gateway key, e.g. stripe or sslcommerz.Example: stripe |
| amount_minor | number | The amount in the currency's minor unit (cents, paisa); 1999 is 19.99.Example: 1999 |
| currency? | string | Settings > Payments' default currency when left out.Example: USD |
| customer_email? | string | The customer's email, shown on the checkout page.Example: [email protected] |
| line_items? | object[] | What is being bought, shown on the checkout page. |
| capture_method? | PaymentCaptureMethod | manual authorizes the payment and waits for a capture or void; automatic when left out.One of: automatic, manualExample: manual |
201 PaymentDetail
Errors: 400, as { error: { code, message } }
/api/v1/payments/subscriptionsSubscriptions, newest first.
sendmock payments subscriptions listsendmock_subscription_list200 PaymentSubscription[]
/api/v1/payments/subscriptionsStart a subscription on a gateway, with an optional trial.
sendmock payments subscriptions createsendmock_subscription_createPaymentSubscriptionCreateRequest : Body of POST /api/v1/payments/subscriptions.
| Field | Type | Description |
|---|---|---|
| provider | string | The gateway's key.Example: stripe |
| customer_email | string | Who pays.Example: [email protected] |
| plan_name | string | The plan's name, shown on each renewal's payment.Example: Pro monthly |
| amount_minor | number | The amount of each renewal in minor units.Example: 1500 |
| currency? | string | ISO 4217 code; Settings > Payments' default currency when left out.Example: USD |
| interval | SubscriptionInterval | How often it renews: day, week, month or year.One of: day, week, month, yearExample: month |
| trial_days? | number | Days before the first charge; none charges at once.Example: 7 |
| card_number? | string | The test card that pays each renewal; 4242424242424242 when left out.Example: 4000000000009995 |
201 PaymentSubscription
Errors: 400, 404, 422, as { error: { code, message } }
/api/v1/payments/subscriptions/{subscriptionId}One subscription with its timeline and renewal payments.
sendmock payments subscriptions show <subscriptionId>sendmock_subscription_get200 PaymentSubscription
Errors: 404, as { error: { code, message } }
/api/v1/payments/subscriptions/{subscriptionId}/advanceMove the subscription's clock to its next renewal and charge it.
sendmock payments subscriptions advance <subscriptionId>sendmock_subscription_advance200 PaymentSubscription
Errors: 404, 409, as { error: { code, message } }
/api/v1/payments/subscriptions/{subscriptionId}/cancelCancel the subscription now or at the end of its period.
sendmock payments subscriptions cancel <subscriptionId>sendmock_subscription_cancelPaymentSubscriptionCancelRequest : Body of POST /api/v1/payments/subscriptions/{subscriptionId}/cancel.
| Field | Type | Description |
|---|---|---|
| at_period_end? | boolean | End at the next advance instead of now.Example: false |
200 PaymentSubscription
Errors: 404, 409, as { error: { code, message } }