# 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="/files/OnLs786WeBtxMLoWaYrQ" 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.pay.gov.sg/start-an-api-integration/endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
