# Create Payment

<mark style="color:green;">`POST`</mark> \[BASE\_URL]/v1/payments

## Request

**Request Body**

<pre><code><strong>{
</strong>  "clientReferenceId": "string",
  "paymentMethod": "string",
  "paymentMethodOptions": {
    "virtualAccount": {
      "issuer": "string"
    },
    "card": {
      "bankMerchantId": "string",
      "authenticationMethod": "string"
    }
  },
  "customer": {
    "customerId": "string",
    "name": "string",
    "email": "string",
    "phone": "string"
  },
  "amount": {
    "currency": "string",
    "value": "decimal"
  },
  "redirectUrl": {
    "successUrl": "string",
    "failedUrl": "string"
  },
  "expiryAt": "datetime(ISO 8601)",
  "paymentItems": [
    {
      "itemId": "string",
      "name": "string",
      "description": "string",
      "qty": "integer",
      "amount": {
        "currency": "string",
        "value": "decimal"
      }
    }
  ]
}
</code></pre>

**Detail Parameter Request**

<table><thead><tr><th>Parameter</th><th width="113">Data Type</th><th width="136">Requirement</th><th>Description</th></tr></thead><tbody><tr><td>clientReferenceId</td><td>String</td><td>M</td><td>Merchant provided reference number for the payment</td></tr><tr><td>paymentMethod</td><td>String</td><td>M</td><td><p>Payment method that selected by merchants, possible value are:</p><ol><li>VIRTUAL_ACCOUNT</li><li>QRIS</li><li>CREDIT_CARD</li></ol></td></tr><tr><td>paymentMethodOptions</td><td>Object</td><td>O</td><td>Options for the payment method. Includes sub-fields for specific payment configurations</td></tr><tr><td><ul><li>virtualAccount</li></ul></td><td>Object</td><td>C</td><td>Virtual account-specific options. Mandatory if paymentMethod = VIRTUAL_ACCOUNT</td></tr><tr><td>>> issuer </td><td>String</td><td>M</td><td>Issuer of the virtual account, list of issuer:<br>1. PERMATA<br>2. BRI<br>3. CIMB<br>4. BNC</td></tr><tr><td><ul><li>card</li></ul></td><td>Object</td><td>C</td><td>Credit card-specific options. Mandatory paymentMethod = CREDIT_CARD</td></tr><tr><td>>> bankMerchantId</td><td>String</td><td>C</td><td>Bank Merchant ID for credit card payments (e.g., BRI, PERMATA, etc)</td></tr><tr><td>>> authenticationMethod</td><td>String</td><td>M</td><td>Authentication method option: <br>1. AUTO (Based on Success Rate and FDS)<br>2. BYPASS (Skip 3DS)<br>3. CHALLENGE (Always request for 3DS)</td></tr><tr><td>customer</td><td>Object</td><td>M</td><td>Customer information</td></tr><tr><td><ul><li>customerId</li></ul></td><td>String</td><td>M</td><td>Unique ID of the customer</td></tr><tr><td><ul><li>name</li></ul></td><td>String</td><td>M</td><td>Full name of the customer</td></tr><tr><td><ul><li>email</li></ul></td><td>String</td><td>M</td><td>Email address of the customer</td></tr><tr><td><ul><li>phone</li></ul></td><td>String</td><td>M</td><td>Phone number of the customer</td></tr><tr><td>amount</td><td>Object </td><td>M</td><td>Total payment amount</td></tr><tr><td><ul><li>currency</li></ul></td><td>String</td><td>M</td><td>Currency code in ISO 4217 format (e.g., USD, IDR)</td></tr><tr><td><ul><li>value</li></ul></td><td>Decimal</td><td>M</td><td>Payment amount with two decimal places. E.g., 10000.00</td></tr><tr><td>redirectUrl</td><td>Object</td><td>M</td><td>URLs for redirecting the customer after payment</td></tr><tr><td><ul><li>successUrl</li></ul></td><td>String</td><td>M</td><td>URL to redirect upon successful payment</td></tr><tr><td><ul><li>failedUrl</li></ul></td><td>String</td><td>M</td><td>URL to redirect upon payment failure</td></tr><tr><td>expiryAt</td><td>Datetime</td><td>M</td><td>Expiration time for the payment in ISO 8601 format (e.g., 2023-12-31T23:59:59Z)</td></tr><tr><td>paymentItems</td><td>Array</td><td>O</td><td>List of items included in the payment</td></tr><tr><td><ul><li>itemId</li></ul></td><td>String</td><td>M</td><td>Unique identifier of the item</td></tr><tr><td><ul><li>name</li></ul></td><td>String</td><td>M</td><td>Name of the item</td></tr><tr><td><ul><li>description</li></ul></td><td>String</td><td>O</td><td>Description of the item</td></tr><tr><td><ul><li>qty</li></ul></td><td>Integer</td><td>M</td><td>Quantity of the item</td></tr><tr><td><ul><li>amount</li></ul></td><td>Object</td><td>M</td><td>Item amount</td></tr><tr><td>>> currency</td><td>String</td><td>M</td><td>Currency code in ISO 4217 format (e.g., USD, IDR)</td></tr><tr><td>>> value</td><td>Decimal</td><td>M</td><td>Payment amount with two decimal places. E.g., 10000.00</td></tr></tbody></table>

## Response

**Response Body**

```
{
   "code":"string",
   "message":"string",
   "data":{
      "id":"string",
      "clientReferenceId":"string",
      "amount":{
         "value":"decimal",
         "currency":"string"
      },
      "paymentMethod":"string",
      "expiryAt":"datetime",
      "paymentLink":"string"
   }
}
```

**Detail Parameter Response**

<table><thead><tr><th>Parameter</th><th width="126">Data Type</th><th width="133">Requirement</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>String</td><td>M</td><td>Response code</td></tr><tr><td>message</td><td>String</td><td>M</td><td>Response description</td></tr><tr><td>data</td><td>Object</td><td>M</td><td>Payment Object. Refers to <a href="payment-object">Payment Object</a></td></tr></tbody></table>
