# Endpoints

{% hint style="warning" %}
**Expected inputs and sample responses for each endpoint can be found** [**here**](https://api-staging.pay.gov.sg/external/api)**.**&#x20;

**All testing should be done on test mode only.** Test mode base URL: <https://api-staging.pay.gov.sg>

**Live mode base URL:** <https://api.pay.gov.sg>&#x20;
{% endhint %}

The paymentServiceID for your created payment service can be found as highlighted below. Please note that you will need to include the `payment_service` prefix.

<figure><img src="https://3185298559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuqMHPbRxvRp3K0CMQMjE%2Fuploads%2FdNc5ZMPPcI9ga12WTlys%2Fpayment%20service%20id.png?alt=media&#x26;token=f15fdb43-23a4-4759-9a28-8435fcd3245d" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="112.33333333333331">Method</th><th width="391">Path</th><th>Purpose</th></tr></thead><tbody><tr><td><strong>GET</strong></td><td><code>/v1/payment-services/{paymentServiceId}/payments/{paymentId}</code></td><td>Fetches the payment with the given ID.</td></tr><tr><td><strong>GET</strong></td><td><code>/v1/payment-services/{paymentServiceId}/payments</code></td><td>Lists the payments for the given payment service.</td></tr><tr><td><strong>POST</strong></td><td><code>/v1/payment-services/{paymentServiceId}/payments</code></td><td>Creates a new payment.</td></tr><tr><td><strong>POST</strong></td><td><code>/v1/payment-services/{paymentServiceId}/payments/{paymentId}/cancel</code></td><td>Cancels the payment with the given ID. Only unpaid payments can be cancelled.</td></tr><tr><td><strong>POST</strong></td><td><code>/v1/payment-services/{paymentServiceId}/payments/{paymentId}/send-email</code></td><td>Emails the payment with the given ID to the payer through their email.</td></tr></tbody></table>
