---
title: "Generate Order / Obtain payment.url"
method: POST
path: "/indodana-peer-to-peer/v2/generate-order"
---

# Generate Order / Obtain payment.url

`POST /indodana-peer-to-peer/v2/generate-order`

Creates an order and generates the payment page URL for Indodana Paylater. Merchants redirect customers to this URL to complete the payment.

## Headers

- `Client-Id` string, required
- `Request-Id` string, required
- `Request-Timestamp` string, date-time, required
- `Signature` string, required

## Request body

- GenerateOrderRequest
  - `order` OrderRequest, required
    - `invoice_number` string, required — Generated by merchant to identify the order and must be unique per request. Allowed chars: alphabetic, numeric, special chars.
    - `amount` integer, required — In IDR currency and without decimal. Allowed chars: numeric. Max length: 16.
    - `line_items` LineItem[], required
      - `name` string, required — Name of the product item.
      - `price` number, required — Price of the product item. Total price and quantity must match with the order.amount. Max length 16.2.
      - `quantity` integer, required — Quantity of the product item. Max length 8.
      - `id` string, required — SKU/item ID of the item in this transaction.
      - `category` 'airlines' | 'arts-crafts-and-collectibles' | 'automotive' | 'baby' | 'beauty-and-fragrances' | 'biller' | 'books-and-magazines' | 'business-to-business-including-mlm' | 'charity-and-non-profit' | 'clothing' | 'community' | 'digital-content' | 'electronics-and-telecom' | 'entertainment-and-media' | 'financial-services-and-products' | 'financial-services-and-technology' | 'food-and-beverage' | 'food-retail-and-service' | 'games-voucher' | 'gifts-and-flowers' | 'government' | 'health-and-personal-care' | 'home-and-garden' | 'hotel-and-travel' | 'insurance' | 'marketplace' | 'nonprofit' | 'offline-store' | 'others' | 'over-the-air' | 'overseas' | 'pets-and-animals' | 'property' | 'public-services' | 'religion-and-spirituality' | 'retail' | 'services' | 'sports-and-outdoors' | 'telco' | 'ticketing' | 'toys-and-hobbies' | 'transportation' | 'travel' | 'vehicle-sales' | 'vehicles-service-and-accessories', required — Category of the item in this transaction.
      - `url` string — URL of the product in the merchant site/platform.
      - `image_url` string — URL of the image of the product in the merchant site/platform.
      - `type` string — Type of the item in this transaction.
    - `callback_url` string — Merchant URL that the customer will be redirected to after the order is completed.
    - `callback_url_cancel` string, required — Merchant URL that the customer will be redirected to if the order is cancelled.
  - `peer_to_peer_info` PeerToPeerInfoRequest, required
    - `expired_time` integer — Order expired time in minutes. Max length: 5.
    - `merchant_unique_reference` string, required — Unique reference number generated by merchant.
  - `customer` Customer, required
    - `first_name` string, required — Customer first name.
    - `last_name` string — Customer last name.
    - `email` string, email, required — Customer email address.
    - `phone` string, required — Customer phone number. Format: {calling_code}{phone_number} without '+' prefix. Example: 6281122334455
  - `billing_address` Address, required
    - `first_name` string, required — Address first name.
    - `last_name` string — Address last name.
    - `address` string, required — Address details of the customer/shopper.
    - `city` string, required — City of the address.
    - `postal_code` string, required — Postal code of the address.
    - `phone` string, required — Phone number for the address.
    - `country_code` string, required — Three-letter ISO country code (e.g., IDN).
  - `shipping_address` Address
    - `first_name` string, required — Address first name.
    - `last_name` string — Address last name.
    - `address` string, required — Address details of the customer/shopper.
    - `city` string, required — City of the address.
    - `postal_code` string, required — Postal code of the address.
    - `phone` string, required — Phone number for the address.
    - `country_code` string, required — Three-letter ISO country code (e.g., IDN).
  - `additional_info` AdditionalInfo
    - `channel` string, required — Value should be always DIRECT_DEBIT_MANDIRI_SNAP | Mandatory
    - `customerName` string — Customer name from merchant | max length: 70
    - `email` string — Customer email from merchant | max length: 64
    - `idCard` string — Customer id card from merchant | max length: 20
    - `country` string — Customer country | max length: 60
    - `address` string — Customer Address | max length: 255
    - `dateOfBirth` string — Customer Date of Birth | format: YYYYMMDD
    - `successRegistrationUrl` string, required — Redirect URL when binding is success
    - `failedRegistrationUrl` string, required — Redirect URL when binding is fail

## Response `200`

SUCCESS

- GenerateOrderResponse
  - `order` object, required
    - `amount` integer, required — Same as the request.
    - `invoice_number` string, required — Same as the request.
  - `payment` object, required
    - `status` 'PENDING' | 'FAILED', required — The current payment status.
    - `url` string, uri, required — Indodana payment page URL to display to the customer.
  - `peer_to_peer_info` PeerToPeerInfoResponse, required
    - `identifier` object[] — List of transaction identifiers coming from acquiring. Merchant can save these for reference.
      - `name` string
      - `value` string
    - `merchant_unique_reference` string, required — Same as the request.
    - `created_date` string — Date time of Indodana order generation with the format yyyyMMddHHmmss.
    - `expired_date` string — Date time of Indodana order expiration with the format yyyyMMddHHmmss.
    - `created_date_utc` string, date-time — Date time of Indodana order generation in UTC format.
    - `expired_date_utc` string, date-time — Date time of Indodana order expiration in UTC format.
  - `additional_info` AdditionalInfo
    - `channel` string, required — Value should be always DIRECT_DEBIT_MANDIRI_SNAP | Mandatory
    - `customerName` string — Customer name from merchant | max length: 70
    - `email` string — Customer email from merchant | max length: 64
    - `idCard` string — Customer id card from merchant | max length: 20
    - `country` string — Customer country | max length: 60
    - `address` string — Customer Address | max length: 255
    - `dateOfBirth` string — Customer Date of Birth | format: YYYYMMDD
    - `successRegistrationUrl` string, required — Redirect URL when binding is success
    - `failedRegistrationUrl` string, required — Redirect URL when binding is fail

---

[API](https://skmtc.net/doku/apis/direct-debit-core-system-notify-binding-to-merchant-emoney-o.md) · [All operations](https://skmtc.net/doku/apis/direct-debit-core-system-notify-binding-to-merchant-emoney-o/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/doku/direct-debit-core-system-notify-binding-to-merchant-emoney-o/revisions/7887174f57bc/schema)
