Documentation
Test environmentLive environmentStatusContact us
  • Overview
    • Get started
    • Resource guides
      • For business users
      • For finance teams
      • For integration teams
    • Stripe onboarding
    • Live use cases
      • Usage overview
  • Start using the dashboard
    • Access
    • Payment services
    • Collaborators and access control
    • One-time payment links
      • Single link creation
      • Bulk link creation
      • Send payment links
      • Payment link page
      • Payment receipt email
    • Subscriptions
      • Set-up
      • View subscriptions
      • Manage subscriptions
    • Payments and refunds
      • Payment methods
      • Dashboard
      • Refunds
    • Payouts
    • Reports
    • Payment workflows with Plumber
      • Set-up
      • Testing
    • Payment forms
      • Set-up
      • Testing
      • Resources
  • Start an API integration
    • Get started
    • Endpoints
    • Integrating with your e-services
    • Errors
    • Idempotency
    • Pagination
    • Go-live checklist
  • API RESOURCES
    • Events
      • The event object
      • Types of events
    • Payments
      • Create a payment
      • Retrieve payments
      • Send email for payment
      • Cancel a payment
      • Refund a payment
      • Get all payments from payment service
  • WEBHOOKS
    • Introduction
    • Set-up
      • Events
      • Best practices
  • FAQ
    • Access
    • Costs
    • Timeline
    • API keys
    • API integration
    • Payments
    • Payment methods
    • Payouts and transaction fees
    • Refunds
    • Security and compliance
    • Downtime and maintenance
  • Policies
    • Privacy Policy
    • Terms of Use
Powered by GitBook
On this page

Was this helpful?

  1. API RESOURCES
  2. Payments

Cancel a payment

Cancels a payment with an 'unpaid' status.

Returns


Returns a payment object if the cancellation succeeds. Returns an error if the payment is already canceled or isn’t in a cancelable state.

POST /v1/payment-services/:payment_service_id/payments/:paymentId/cancel


RESPONSE

{
    "id": "ZbzTvadjmP0wd7RRxhWtj",
    "due_date": "31-DEC-2023",
    "metadata": {},
    "payout_id": null,
    "created_at": "2023-08-03T17:36:52.634+08:00",
    "creator_id": "user_xxx",
    "payer_name": "Andy Lau",
    "updated_at": "2023-08-03T17:36:52.634+08:00",
    "description": "Payment for XXX",
    "payer_email": "abc@gmail.com",
    "payment_url": "http://pay.gov.sg/payments/ZbzTvadjmP0wd7RRxhWtj",
    "reference_id": "PAYMENT_001",
    "latest_status": "cancelled",
    "payer_address": "Blk 123, Yishun Avenue 2, #08-88, Singapore 123456",
    "refund_status": "not_refunded",
    "payment_status": "cancelled",
    "amount_in_cents": 1100,
    "payer_identifier": "S1234567A",
    "paid_out_timestamp": null,
    "payment_service_id": "payment_service_xxx",
    "email_delivery_status": "unsent",
    "payment_sent_timestamp": null,
    "stripe_payment_intent_id": "pi_xxx",
    "payment_cancelled_timestamp": "2023-08-14T11:44:19.197+08:00",
    "payment_succeeded_timestamp": null,
    "payment_fully_refunded_timestamp": null
}
PreviousSend email for paymentNextRefund a payment

Last updated 10 months ago

Was this helpful?