> For the complete documentation index, see [llms.txt](https://pivot-payment.gitbook.io/pivot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pivot-payment.gitbook.io/pivot-docs/payments/accept-payment/build-static-payment.md).

# Build Static Payment

Generate a fixed **Virtual Account number** or **QR Code** that can be reused for multiple transactions. The payment can be set to a fixed amount or left open for the customer to enter

{% hint style="info" %}
Applicable only for QRIS and Virtual Account, and the mode is API
{% endhint %}

<figure><img src="https://3640688391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbRczl3VT35wkmuP4KTzZ%2Fuploads%2FZ20yOysZp8210GB9zgT0%2Fimage.png?alt=media&amp;token=5d256fda-190e-4781-91a5-570d7d069cd4" alt=""><figcaption></figcaption></figure>

<details>

<summary>Create Payment Static</summary>

A windowed time for the end customer to complete the payment, starting when the client initiates the payment request through your app. For Static Payment, the payment session is always ACTIVE and can be charged multiple times.

API Reference: [Create Payment Session](/pivot-docs/api-references/api-lists/payments/payment-session/create-payment-session.md)

```json
POST [BASE_URL]/v2/payments

{
  "clientReferenceId": "1751610085",
  "amount": {
    "value": 10000, // Mandatory if VA is Closed Static
    "currency": "IDR"
  },
  "paymentType": "MULTIPLE",
  "paymentMethod": {
    "type": "VIRTUAL_ACCOUNT"
  },
  "paymentMethodOptions": {
    "virtualAccount": {
      "channel": "PERMATA",
      "virtualAccountName": "Reforza Pivot",
      "virtualAccountNumber": "00000001"
    }
  },
  "mode": "API",
  "redirectUrl": {
    "successReturnUrl": "https://merchant.com/success",
    "failureReturnUrl": "https://merchant.com/failure",
    "expirationReturnUrl": "https://merchant.com/expiration"
  },
  "customer": {
    "givenName": "Reforza Jordan",
    "surname": "Geotama",
    "email": "reforza@pivot-payment.com",
    "phoneNumber": {
      "countryCode": "+62",
      "number": "89699990001"
    },
    "refundPreference": {
      "method": "AUTO",
      "transferDestination": {
        "channelCode": "014",
        "channelInformation": {
          "accountNumber": "17677665415",
          "accountName": "Reforza Jordan Geotama"
        }
      }
    }
  },
  "orderInformation": {
    "productDetails": [
      {
        "type": "PHYSICAL",
        "category": "FASHION",
        "subCategory": "FASHION WANITA",
        "name": "Dress Kasual Warna Putih",
        "description": "Ukuran M",
        "quantity": 1,
        "price": {
          "value": 100000,
          "currency": "IDR"
        }
      }
    ],
    "billingInfo": {
      "givenName": "Reforza Jordan",
      "surname": "Geotama",
      "email": "reforza@pivot-payment.com",
      "phoneNumber": {
        "countryCode": "+62",
        "number": "89699990001"
      },
      "addressLine1": "Biomedical Building Lantai 3",
      "addressLine2": "Digital hub, BSD City",
      "city": "Tangerang Regency",
      "provinceState": "Banten",
      "country": "ID",
      "postalCode": "15331"
    },
    "shippingInfo": {
      "givenName": "Reforza Jordan",
      "surname": "Geotama",
      "email": "reforza@pivot-payment.com",
      "phoneNumber": {
        "countryCode": "+62",
        "number": "89699990001"
      },
      "addressLine1": "Biomedical Building Lantai 3",
      "addressLine2": "Digital hub, BSD City",
      "city": "Tangerang Regency",
      "provinceState": "Banten",
      "country": "ID",
      "postalCode": "15331",
      "method": "REGULAR",
      "shippingFee": {
        "value": 100000,
        "currency": "IDR"
      }
    }
  },
  "autoConfirm": true,
  "statementDescriptor": "Reforza Pivot",
  "metadata": {
    "invoiceNo": "INV001"
  }
}
```

</details>

<details>

<summary>Choose a mode</summary>

To customize your own Payment Page choose mode “API”

```json
{
  "mode": "API"
}
```

</details>

<details>

<summary>Choose a Payment Type</summary>

To create Payment Static, choose Payment Type “MULTIPLE”

```json
{
  "paymentType": "MULTIPLE"
}
```

</details>

<details>

<summary>Send your Amount object (*conditional)</summary>

Only for the **Closed Static Virtual Account**, you must send the Amount object

```json
{
  "amount": {
    "value": 10000,
    "currency": "IDR"
  }
}
```

</details>

<details>

<summary>Define Payment Method </summary>

Set <mark style="color:orange;">`autoConfirm`</mark> to true and fill <mark style="color:orange;">`paymentMethod`</mark> and <mark style="color:orange;">`paymentMethodOptions`</mark> Object to finalize the payment method from the previous step.

{% hint style="info" %}
Make sure <mark style="color:orange;">`virtualAccountNumber`</mark> within our default Static Range or your Configuration range:

<https://dashboard.pivot-payment.com/static-payment/virtual-account/range>
{% endhint %}

Reference:&#x20;

* [Payment Method Object](/pivot-docs/api-references/api-lists/payments/object/payment-method-object.md)
* [Payment Method Options Object](/pivot-docs/api-references/api-lists/payments/object/payment-method-options-object.md)
* [Limitation](/pivot-docs/payments/payment-channels/virtual-account/limitation.md)

```json
{
  "paymentMethod": {
    "type": "VIRTUAL_ACCOUNT"
  },
  "paymentMethodOptions": {
    "virtualAccount": {
      "channel": "PERMATA",
      "virtualAccountName": "Reforza Pivot",
      "virtualAccountNumber": "99996662"
    }
  },
  "autoConfirm": true
}
```

</details>

<details>

<summary>Fill Customer and Order information</summary>

Include customer and order details by filling the <mark style="color:orange;">`customer`</mark> and <mark style="color:orange;">`orderInformation`</mark> objects.  Personalize the payment experience, enhance fraud detection and reconciliation, and ensure smoother processing of refund requests.

Object Reference:

* [Customers](/pivot-docs/api-references/api-lists/core-resources/customers.md)
* [Order Object](/pivot-docs/api-references/api-lists/payments/object/order-object.md)

```json
{
  "customer": {
    "givenName": "Reforza Jordan",
    "surname": "Geotama",
    "email": "reforza@pivot-payment.com",
    "phoneNumber": {
      "countryCode": "+62",
      "number": "89699990001"
    },
    "refundPreference": {
      "method": "AUTO",
      "transferDestination": {
        "channelCode": "014",
        "channelInformation": {
          "accountNumber": "17677665415",
          "accountName": "Reforza Jordan Geotama"
        }
      }
    }
  },
  "orderInformation": {
    "productDetails": [
      {
        "type": "PHYSICAL",
        "category": "FASHION",
        "subCategory": "FASHION WANITA",
        "name": "Dress Kasual Warna Putih",
        "description": "Ukuran M",
        "quantity": 1,
        "price": {
          "value": 100000,
          "currency": "IDR"
        }
      }
    ],
    "billingInfo": {
      "givenName": "Reforza Jordan",
      "surname": "Geotama",
      "email": "reforza@pivot-payment.com",
      "phoneNumber": {
        "countryCode": "+62",
        "number": "89699990001"
      },
      "addressLine1": "Biomedical Building Lantai 3",
      "addressLine2": "Digital hub, BSD City",
      "city": "Tangerang Regency",
      "provinceState": "Banten",
      "country": "ID",
      "postalCode": "15331"
    },
    "shippingInfo": {
      "givenName": "Reforza Jordan",
      "surname": "Geotama",
      "email": "reforza@pivot-payment.com",
      "phoneNumber": {
        "countryCode": "+62",
        "number": "89699990001"
      },
      "addressLine1": "Biomedical Building Lantai 3",
      "addressLine2": "Digital hub, BSD City",
      "city": "Tangerang Regency",
      "provinceState": "Banten",
      "country": "ID",
      "postalCode": "15331",
      "method": "REGULAR",
      "shippingFee": {
        "value": 100000,
        "currency": "IDR"
      }
    }
  }
}
```

</details>

<details>

<summary>Get Payment Information details</summary>

After creating the Payment Session, display the payment information details on your customized Payment page, which is returned in the response.

Object Reference: [Payment Method Object](/pivot-docs/api-references/api-lists/payments/object/payment-method-object.md)

```json
{
  "paymentMethod": {
    "type": "VIRTUAL_ACCOUNT",
    "virtualAccount": {
      "channel": "PERMATA",
      "virtualAccountNumber": "7699013199996662",
      "virtualAccountName": "Reforza Pivot",
      "expiryAt": "0001-01-01T00:00:00Z"
    }
  }
}
```

</details>

<details>

<summary>Simulate Payment</summary>

[Simulate the Payment](/pivot-docs/api-references/api-lists/payments/payment-simulation.md)

</details>
