API Reference / Payment Intents

Payment Intents

Create a payment intent to initiate a transaction. This endpoint must be called from your backend using the Secret Key.

Endpoint

Production Endpoint
POSThttps://api.arto-pay.com/v1/payment-intents
Sandbox / Development
POSThttps://api-sandbox.arto-pay.com/v1/payment-intents

Request

http
POST /v1/payment-intents HTTP/1.1
Host: api.artopay.online
Content-Type: application/json
X-Secret-Key: sk_live_xxxxxxxxxxxx

{
  "amount": 100000,
  "currency": "IDR",
  "customerId": "customer_test_123",
  "description": "Test payment",
  "metadata": {
    "order_id": "order_456"
  }
}

Parameters

FieldTypeRequiredDescription
amountintegerYesAmount in smallest currency unit (e.g. 100000 = IDR 100,000)
currencystringYesMust be IDR
descriptionstringYesHuman-readable description of the payment
customerIdstringNoCustomer identifier. Required for saved card flows to generate a customerToken
metadataobjectNoAdditional key-value pairs stored alongside the transaction for your reference

Response

json
{
  "amount": 75000,
  "clientSecret": "pi_2e718067-a60d-4969-808c-f93458b65b47_secret_llySD6...",
  "createdAt": "2026-02-02T04:25:07.617558Z",
  "currency": "IDR",
  "id": "726f2fec-2431-40cf-b21c-304835e92715",
  "metadata": {
    "orderId": "order_1"
  },
  "status": "created"
}

Response Fields

FieldTypeDescription
idstringUnique payment intent ID โ€” pass as paymentId in the SDK
clientSecretstringFrontend secret for the SDK โ€” pass as clientSecret
amountintegerConfirmed payment amount
currencystringCurrency code (e.g. IDR)
statusstringInitial status: created
createdAtstringISO 8601 creation timestamp
metadataobjectEcho of the metadata you provided in the request