---
description: Creates a payment object.
---

# Create a payment

After the payment is created, the payer will have to click on 'Proceed' to select the payment method, fill in their payment details and confirm to complete the payment transaction.



**Parameters**

***

**reference\_id** required

The agency’s reference id in their preferred format. Invoice number is commonly used. It should not exceed a **maximum of** **255 characters**.

***

**payer\_name** required

Name of citizen or company making the payment. It should not exceed a **maximum of** **255 characters**.

***

**payer\_address** optional

Address of citizen or company making the payment. It should not exceed a **maximum of** **255 characters**.

***

**payer\_identifier** optional

Tax identifier of payer. e.g. NRIC, UEN. It should not exceed a **maximum of** **10 characters**.

***

**payer\_email** optional

Email address that should receive the payment link and invoice. It should not exceed a **maximum of** **255 characters**.

***

**description** required

Description of what the payment is for. This will be shown to the payer in the payment link. It should not exceed a **maximum of** **500 characters**.

***

**amount\_in\_cents** required

The total amount that the citizen or company should pay. It **should not exceed 20000000 cents ($200,000).**

***

**due\_date** optional

Expected due date for the payment. This will be displayed in emails and reminders sent to the payer. It should be in the format `dd-MMM-yyyy`. e.g. 31-DEC-2023.

***

**metadata** optional

Additional metadata related to this payment. Metadata only supports up to 10 entries. Keys must be at **most 40 characters long.** Values must be at most **255 characters long**.

Example:

```json
"metadata": {
		"branch_code": "123",
		"pos_ID": "456",
		"cashier_ID": "001",
		"receipt_number": "789"
	}
```

**line\_items** optional

***

Line item breakdown of the payment. Unlimited entries are supported. The description key must not exceed **255 characters**.  The total amount for all line items **should not exceed 20000000 cents ($200,000)**.&#x20;

Example:

```json
"line_items": [
    {
      "description": "Payment for season ticket",
      "quantity": 10,
      "unit_amount_in_cents": 100
    }
  ]
```

#### Returns

***

Returns a `payment` object.

The `payment` object will be the payment to be created.



#### POST /v1/payment-services/:payment\_service\_id/payments

***

```json
{
    "reference_id": "PAYMENT_001",
    "payer_name": "Andy Lau",
    "payer_address": "Blk 123, Yishun Avenue 2, #08-88, Singapore 123456",
    "payer_identifier": "S1234567A",
    "payer_email": "abc@gmail.com",
    "description": "Payment for XXX",
    "amount_in_cents": 1100,
		"due_date": "31-DEC-2023", // optional
		"return_url": "https://open.gov.sg" //optional
    "metadata": {
			"product code": "123" // can add other key-value pairs here
		}
}
```

**RESPONSE**

```json
{
    "id": "ZbzTvadjmP0wd7RRxhWtj",
    "due_date": null,
    "metadata": {
			"product code": "123",
		},
    "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",
		"return_url": "https://open.gov.sg"
    "reference_id": "PAYMENT_001",
    "latest_status": "unpaid",
    "payer_address": "Blk 123, Yishun Avenue 2, #08-88, Singapore 123456",
    "refund_status": "not_refunded",
    "payment_status": "unpaid",
    "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": null,
    "payment_succeeded_timestamp": null,
    "payment_fully_refunded_timestamp": null
}
```
