> For the complete documentation index, see [llms.txt](https://guide.pay.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.pay.gov.sg/start-an-api-integration/endpoints.md).

# 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>
