{"openapi":"3.1.0","info":{"title":"Valcentra API","version":"1.0.0","description":"Build with confidence. Test payment flows, follow every status, and receive signed events through one clear API."},"paths":{"/v1/payments":{"post":{"operationId":"createPayment","summary":"Create a payment","description":"Create a payment in the environment selected by the bearer API key. The merchant reference must be unique within the project and environment. Reusing an Idempotency-Key with the same request returns the original result; reusing it with a different request returns a conflict.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"description":"JSON payment details. Amounts are positive integer rupiah values; only IDR is currently supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"},"example":{"currency":"IDR","amount":125000,"merchant_reference":"order_example_2026_001","description":"Order example 2026-001","channel":"qris","metadata":{"order_source":"api_reference"},"return_url":"https://example.com/orders/2026-001"}}}},"responses":{"201":{"description":"Payment created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentResponse"},"example":{"id":"vct_test_example_never_use","amount":"125000","currency":"IDR","merchant_reference":"vct_test_example_never_use","status":"awaiting_method","livemode":false,"channel":"qris","created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null,"paid_at":null,"checkout_url":"https://pay.example.test/c/checkout_example"}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request is malformed or is missing a required JSON or idempotency header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"content_type_required":{"summary":"Content-Type must be application/json","value":{"type":"invalid_request_error","code":"content_type_required","message":"Content-Type must be application/json.","request_id":"req_example_123"}},"invalid_json":{"summary":"Malformed JSON body","value":{"type":"invalid_request_error","code":"invalid_json","message":"The request body is invalid JSON.","request_id":"req_example_123"}},"idempotency_key_required":{"summary":"Idempotency-Key is missing","value":{"type":"invalid_request_error","code":"idempotency_key_required","message":"Idempotency-Key is required.","request_id":"req_example_123"}},"idempotency_key_invalid":{"summary":"Idempotency-Key has an invalid format","value":{"type":"invalid_request_error","code":"idempotency_key_invalid","message":"Idempotency-Key is invalid.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"Bearer authentication is missing or the supplied API key is invalid or inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"authenticationRequired":{"summary":"Bearer token is missing","value":{"type":"authentication_error","code":"authentication_required","message":"A valid bearer key is required.","request_id":"req_example_123"}},"authenticationFailed":{"summary":"Bearer token is invalid or inactive","value":{"type":"authentication_error","code":"authentication_failed","message":"The bearer key is invalid or inactive.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current idempotency, merchant reference, or environment state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_conflict":{"summary":"Idempotency key was reused with a different request","value":{"type":"conflict_error","code":"idempotency_conflict","message":"The idempotency key was reused with a different request.","request_id":"req_example_123"}},"merchant_reference_conflict":{"summary":"Merchant reference already exists","value":{"type":"conflict_error","code":"merchant_reference_conflict","message":"The merchant reference already exists.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body exceeds the configured size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"request_body_too_large":{"summary":"Request body exceeds the configured limit","value":{"type":"invalid_request_error","code":"request_body_too_large","message":"The request body is too large.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"One or more request fields do not satisfy the documented schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"summary":"Request fields failed validation","value":{"type":"invalid_request_error","code":"validation_error","message":"The request is invalid.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"The request rate limit was exceeded. Retry after the interval in error details when provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Request rate limit was exceeded","value":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Too many requests.","request_id":"req_example_123","details":{"retry_after_seconds":30}}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"An unexpected server error occurred. Use the request ID when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Unexpected server failure","value":{"type":"api_error","code":"internal_error","message":"An unexpected error occurred.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry when service is restored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_unavailable":{"summary":"Rate-limit service is unavailable","value":{"type":"api_error","code":"rate_limit_unavailable","message":"The service is temporarily unavailable.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/payments/{payment_id}":{"get":{"operationId":"getPayment","summary":"Retrieve a payment","description":"Retrieve a payment by ID. The bearer API key limits lookup to its project and test or live environment.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/PaymentId"}],"responses":{"200":{"description":"Payment retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"},"example":{"id":"vct_test_example_never_use","amount":"125000","currency":"IDR","merchant_reference":"vct_test_example_never_use","status":"awaiting_method","livemode":false,"channel":"qris","created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null,"paid_at":null}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"Bearer authentication is missing or the supplied API key is invalid or inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"authenticationRequired":{"summary":"Bearer token is missing","value":{"type":"authentication_error","code":"authentication_required","message":"A valid bearer key is required.","request_id":"req_example_123"}},"authenticationFailed":{"summary":"Bearer token is invalid or inactive","value":{"type":"authentication_error","code":"authentication_failed","message":"The bearer key is invalid or inactive.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No payment with the supplied ID exists in the authenticated project and environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payment_not_found":{"summary":"Payment does not exist in this project and environment","value":{"type":"not_found_error","code":"payment_not_found","message":"The payment was not found.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"One or more request fields do not satisfy the documented schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"summary":"Request fields failed validation","value":{"type":"invalid_request_error","code":"validation_error","message":"The request is invalid.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"The request rate limit was exceeded. Retry after the interval in error details when provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Request rate limit was exceeded","value":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Too many requests.","request_id":"req_example_123","details":{"retry_after_seconds":30}}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"An unexpected server error occurred. Use the request ID when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Unexpected server failure","value":{"type":"api_error","code":"internal_error","message":"An unexpected error occurred.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry when service is restored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_unavailable":{"summary":"Rate-limit service is unavailable","value":{"type":"api_error","code":"rate_limit_unavailable","message":"The service is temporarily unavailable.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/test/payments/{payment_id}/simulate":{"post":{"operationId":"simulatePayment","summary":"Simulate a payment state","description":"Apply a test-only payment outcome or webhook delivery scenario. This operation requires a test API key and an Idempotency-Key header; the header is required for the request but does not deduplicate simulation attempts.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/PaymentId"}],"requestBody":{"required":true,"description":"Choose one test-only outcome or delivery scenario for the payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRequest"},"example":{"scenario":"paid"}}}},"responses":{"200":{"description":"Payment state simulated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"},"example":{"id":"vct_test_example_never_use","amount":"125000","currency":"IDR","merchant_reference":"vct_test_example_never_use","status":"awaiting_method","livemode":false,"channel":"qris","created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null,"paid_at":null}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request is malformed or is missing a required JSON or idempotency header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"content_type_required":{"summary":"Content-Type must be application/json","value":{"type":"invalid_request_error","code":"content_type_required","message":"Content-Type must be application/json.","request_id":"req_example_123"}},"invalid_json":{"summary":"Malformed JSON body","value":{"type":"invalid_request_error","code":"invalid_json","message":"The request body is invalid JSON.","request_id":"req_example_123"}},"idempotency_key_required":{"summary":"Idempotency-Key is missing","value":{"type":"invalid_request_error","code":"idempotency_key_required","message":"Idempotency-Key is required.","request_id":"req_example_123"}},"idempotency_key_invalid":{"summary":"Idempotency-Key has an invalid format","value":{"type":"invalid_request_error","code":"idempotency_key_invalid","message":"Idempotency-Key is invalid.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"Bearer authentication is missing or the supplied API key is invalid or inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"authenticationRequired":{"summary":"Bearer token is missing","value":{"type":"authentication_error","code":"authentication_required","message":"A valid bearer key is required.","request_id":"req_example_123"}},"authenticationFailed":{"summary":"Bearer token is invalid or inactive","value":{"type":"authentication_error","code":"authentication_failed","message":"The bearer key is invalid or inactive.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No payment with the supplied ID exists in the authenticated project and environment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"payment_not_found":{"summary":"Payment does not exist in this project and environment","value":{"type":"not_found_error","code":"payment_not_found","message":"The payment was not found.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current idempotency, merchant reference, or environment state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"test_environment_required":{"summary":"Simulation requires a test API key","value":{"type":"conflict_error","code":"test_environment_required","message":"Simulation is available only for test keys.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body exceeds the configured size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"request_body_too_large":{"summary":"Request body exceeds the configured limit","value":{"type":"invalid_request_error","code":"request_body_too_large","message":"The request body is too large.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"One or more request fields do not satisfy the documented schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"validation_error":{"summary":"Request fields failed validation","value":{"type":"invalid_request_error","code":"validation_error","message":"The request is invalid.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"The request rate limit was exceeded. Retry after the interval in error details when provided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Request rate limit was exceeded","value":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Too many requests.","request_id":"req_example_123","details":{"retry_after_seconds":30}}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"An unexpected server error occurred. Use the request ID when contacting support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Unexpected server failure","value":{"type":"api_error","code":"internal_error","message":"An unexpected error occurred.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry when service is restored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_unavailable":{"summary":"Rate-limit service is unavailable","value":{"type":"api_error","code":"rate_limit_unavailable","message":"The service is temporarily unavailable.","request_id":"req_example_123"}}}}},"headers":{"X-Request-ID":{"$ref":"#/components/headers/RequestId"}}}}}}},"webhooks":{"merchantEvent":{"post":{"operationId":"receiveMerchantEvent","summary":"Receive a signed Valcentra event","description":"Valcentra sends payment, refund, and withdrawal events to the configured merchant endpoint. Delivery is at least once and may be reordered, so deduplicate using the stable event.id. Verify the v1 HMAC-SHA256 signature over the UTF-8 timestamp, a period, and the original raw request bytes before parsing the JSON. The webhook secret is separate from the API key. Return any 2xx status to acknowledge delivery; a response body is not required.","parameters":[{"name":"x-valcentra-timestamp","in":"header","required":true,"description":"Unix timestamp in seconds used as part of the signature input and replay check.","schema":{"type":"integer","description":"Unix timestamp in seconds."},"example":1767225600},{"name":"x-valcentra-signature","in":"header","required":true,"description":"HMAC-SHA256 of `<timestamp>.<raw-body>` using the webhook secret, formatted as `v1=` followed by 64 lowercase hexadecimal characters. The value depends on the exact body and secret, so no reusable literal is shown.","schema":{"type":"string","pattern":"^v1=[0-9a-f]{64}$","description":"Versioned HMAC-SHA256 signature; verify against the original request bytes before JSON parsing."}}],"requestBody":{"required":true,"description":"Signed JSON event snapshot. The same event ID and body remain stable across delivery retries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"examples":{"paymentPaid":{"$ref":"#/components/examples/PaymentPaidEvent"},"refundCompleted":{"$ref":"#/components/examples/RefundCompletedEvent"},"withdrawalCompleted":{"$ref":"#/components/examples/WithdrawalCompletedEvent"}}}}},"responses":{"2XX":{"description":"Any 2xx status acknowledges delivery. A response body is optional; 204 No Content is sufficient."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"vct","description":"Send a project API key in the Authorization header as a Bearer token. Never include a real key in examples."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Required for create and simulate requests. Reusing the same key and payload on create returns the original result; simulation requires but does not use this key for deduplication.","schema":{"$ref":"#/components/schemas/IdempotencyKey"},"example":"idem_create_payment_example_001"},"RequestId":{"name":"X-Request-ID","in":"header","required":false,"description":"Optional caller-supplied correlation ID. If omitted or invalid, the API generates one; the response returns the ID in X-Request-ID.","schema":{"$ref":"#/components/schemas/RequestId"},"example":"req_example_123"},"PaymentId":{"name":"payment_id","in":"path","required":true,"description":"Identifier of the payment to retrieve or simulate.","schema":{"$ref":"#/components/schemas/PaymentId"},"example":"vct_test_example_never_use"}},"headers":{"RequestId":{"description":"Correlation identifier for the request. Send this value to support when investigating a response.","required":true,"schema":{"$ref":"#/components/schemas/RequestId"},"example":"req_example_123"}},"schemas":{"Amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"InputAmount":{"minimum":1,"maximum":9007199254740991,"description":"Positive integer amount in IDR; request amounts do not include fractional rupiah.","type":"integer"},"Currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"PaymentId":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"RequestId":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_]{0,127}$","description":"Correlation identifier used to trace a request and its response.","type":"string"},"IdempotencyKey":{"minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,254}$","description":"Caller-generated key identifying a mutation request. Deduplication behavior is operation-specific.","type":"string"},"PaymentChannel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"PaymentStatus":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"Description":{"minLength":1,"maxLength":255,"description":"Human-readable description of the payment.","type":"string"},"Metadata":{"additionalProperties":false,"maxProperties":20,"description":"Optional merchant-defined key/value data. Up to 20 lowercase keys are accepted.","type":"object","patternProperties":{"^[a-z][a-z0-9_]{0,39}$":{"maxLength":256,"description":"Merchant-defined string value; do not put secrets or sensitive personal data here.","type":"string"}}},"ReturnUrl":{"minLength":12,"maxLength":2048,"pattern":"^https://(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)\\.)+[A-Za-z]{2,63}(?::[0-9]{1,5})?(?:[/?#][^\\s]*)?$","description":"HTTPS destination where the payer returns after checkout.","type":"string"},"CreatePaymentRequest":{"additionalProperties":false,"description":"Details used to create a hosted payment checkout.","type":"object","required":["currency","amount","merchant_reference"],"properties":{"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"amount":{"minimum":1,"maximum":9007199254740991,"description":"Positive integer amount in IDR; request amounts do not include fractional rupiah.","type":"integer"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"description":{"minLength":1,"maxLength":255,"description":"Human-readable description of the payment.","type":"string"},"metadata":{"additionalProperties":false,"maxProperties":20,"description":"Optional merchant-defined key/value data. Up to 20 lowercase keys are accepted.","type":"object","patternProperties":{"^[a-z][a-z0-9_]{0,39}$":{"maxLength":256,"description":"Merchant-defined string value; do not put secrets or sensitive personal data here.","type":"string"}}},"return_url":{"minLength":12,"maxLength":2048,"pattern":"^https://(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)\\.)+[A-Za-z]{2,63}(?::[0-9]{1,5})?(?:[/?#][^\\s]*)?$","description":"HTTPS destination where the payer returns after checkout.","type":"string"}}},"CreatePaymentResponse":{"additionalProperties":false,"description":"Created payment resource and its hosted checkout URL.","type":"object","required":["id","amount","currency","merchant_reference","status","livemode","created_at","updated_at","checkout_url"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"status":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"livemode":{"description":"True for live environment payments; false for test environment payments.","type":"boolean"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"expires_at":{"description":"Checkout expiry time in UTC, or null when no expiry is set.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"paid_at":{"description":"Time payment became paid in UTC, or null before payment.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"checkout_url":{"pattern":"^https?://[^\\s]+$","description":"Hosted checkout URL for the payer.","type":"string"}}},"PaymentPathParams":{"additionalProperties":false,"description":"Path parameters identifying a payment.","type":"object","required":["payment_id"],"properties":{"payment_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"}}},"Payment":{"additionalProperties":false,"description":"Public payment resource returned by retrieve and simulation operations.","type":"object","required":["id","amount","currency","merchant_reference","status","livemode","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"status":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"livemode":{"description":"True for live environment payments; false for test environment payments.","type":"boolean"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"expires_at":{"description":"Checkout expiry time in UTC, or null when no expiry is set.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"paid_at":{"description":"Time payment became paid in UTC, or null before payment.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]}}},"SimulationScenario":{"description":"Test-only outcome or webhook-delivery scenario to simulate.","anyOf":[{"const":"paid","type":"string"},{"const":"pending","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"},{"const":"delayed_webhook","type":"string"},{"const":"repeated_webhook","type":"string"}]},"SimulationRequest":{"additionalProperties":false,"description":"Test-only scenario to apply to the target payment.","type":"object","required":["scenario"],"properties":{"scenario":{"description":"Test-only outcome or webhook-delivery scenario to simulate.","anyOf":[{"const":"paid","type":"string"},{"const":"pending","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"},{"const":"delayed_webhook","type":"string"},{"const":"repeated_webhook","type":"string"}]}}},"Refund":{"additionalProperties":false,"description":"Public refund resource included in refund events.","type":"object","required":["id","payment_id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a refund.","type":"string"},"payment_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current refund lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"completed","type":"string"},{"const":"rejected","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}},"Withdrawal":{"additionalProperties":false,"description":"Public withdrawal resource included in withdrawal events.","type":"object","required":["id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a withdrawal.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current withdrawal lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"approved","type":"string"},{"const":"rejected","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}},"EventType":{"description":"Event type identifying the payment, refund, or withdrawal lifecycle change.","anyOf":[{"const":"payment.created","type":"string"},{"const":"payment.pending","type":"string"},{"const":"payment.paid","type":"string"},{"const":"payment.failed","type":"string"},{"const":"payment.expired","type":"string"},{"const":"payment.cancelled","type":"string"},{"const":"refund.requested","type":"string"},{"const":"refund.completed","type":"string"},{"const":"refund.rejected","type":"string"},{"const":"refund.failed","type":"string"},{"const":"withdrawal.requested","type":"string"},{"const":"withdrawal.approved","type":"string"},{"const":"withdrawal.rejected","type":"string"},{"const":"withdrawal.completed","type":"string"},{"const":"withdrawal.failed","type":"string"}]},"PaymentEventPayload":{"additionalProperties":false,"description":"Payment resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public payment resource returned by retrieve and simulation operations.","type":"object","required":["id","amount","currency","merchant_reference","status","livemode","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"status":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"livemode":{"description":"True for live environment payments; false for test environment payments.","type":"boolean"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"expires_at":{"description":"Checkout expiry time in UTC, or null when no expiry is set.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"paid_at":{"description":"Time payment became paid in UTC, or null before payment.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]}}}}},"RefundEventPayload":{"additionalProperties":false,"description":"Refund resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public refund resource included in refund events.","type":"object","required":["id","payment_id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a refund.","type":"string"},"payment_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current refund lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"completed","type":"string"},{"const":"rejected","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}},"WithdrawalEventPayload":{"additionalProperties":false,"description":"Withdrawal resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public withdrawal resource included in withdrawal events.","type":"object","required":["id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a withdrawal.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current withdrawal lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"approved","type":"string"},{"const":"rejected","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}},"EventData":{"description":"Resource snapshot for the event's domain type.","anyOf":[{"additionalProperties":false,"description":"Payment resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public payment resource returned by retrieve and simulation operations.","type":"object","required":["id","amount","currency","merchant_reference","status","livemode","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"status":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"livemode":{"description":"True for live environment payments; false for test environment payments.","type":"boolean"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"expires_at":{"description":"Checkout expiry time in UTC, or null when no expiry is set.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"paid_at":{"description":"Time payment became paid in UTC, or null before payment.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]}}}}},{"additionalProperties":false,"description":"Refund resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public refund resource included in refund events.","type":"object","required":["id","payment_id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a refund.","type":"string"},"payment_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current refund lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"completed","type":"string"},{"const":"rejected","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}},{"additionalProperties":false,"description":"Withdrawal resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public withdrawal resource included in withdrawal events.","type":"object","required":["id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a withdrawal.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current withdrawal lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"approved","type":"string"},{"const":"rejected","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}}]},"Event":{"description":"A signed payment, refund, or withdrawal event sent to a merchant webhook endpoint.","anyOf":[{"additionalProperties":false,"description":"Signed event envelope for a payment lifecycle change.","type":"object","required":["id","type","created_at","livemode","data"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Stable event identifier used by consumers to deduplicate deliveries.","type":"string"},"type":{"description":"Payment lifecycle event type.","anyOf":[{"const":"payment.created","type":"string"},{"const":"payment.pending","type":"string"},{"const":"payment.paid","type":"string"},{"const":"payment.failed","type":"string"},{"const":"payment.expired","type":"string"},{"const":"payment.cancelled","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"livemode":{"description":"True for live environment events; false for test environment events.","type":"boolean"},"data":{"additionalProperties":false,"description":"Payment resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public payment resource returned by retrieve and simulation operations.","type":"object","required":["id","amount","currency","merchant_reference","status","livemode","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"status":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"livemode":{"description":"True for live environment payments; false for test environment payments.","type":"boolean"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"expires_at":{"description":"Checkout expiry time in UTC, or null when no expiry is set.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"paid_at":{"description":"Time payment became paid in UTC, or null before payment.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]}}}}}}},{"additionalProperties":false,"description":"Signed event envelope for a refund lifecycle change.","type":"object","required":["id","type","created_at","livemode","data"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Stable event identifier used by consumers to deduplicate deliveries.","type":"string"},"type":{"description":"Refund lifecycle event type.","anyOf":[{"const":"refund.requested","type":"string"},{"const":"refund.completed","type":"string"},{"const":"refund.rejected","type":"string"},{"const":"refund.failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"livemode":{"description":"True for live environment events; false for test environment events.","type":"boolean"},"data":{"additionalProperties":false,"description":"Refund resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public refund resource included in refund events.","type":"object","required":["id","payment_id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a refund.","type":"string"},"payment_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current refund lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"completed","type":"string"},{"const":"rejected","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}}}},{"additionalProperties":false,"description":"Signed event envelope for a withdrawal lifecycle change.","type":"object","required":["id","type","created_at","livemode","data"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Stable event identifier used by consumers to deduplicate deliveries.","type":"string"},"type":{"description":"Withdrawal lifecycle event type.","anyOf":[{"const":"withdrawal.requested","type":"string"},{"const":"withdrawal.approved","type":"string"},{"const":"withdrawal.rejected","type":"string"},{"const":"withdrawal.completed","type":"string"},{"const":"withdrawal.failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"livemode":{"description":"True for live environment events; false for test environment events.","type":"boolean"},"data":{"additionalProperties":false,"description":"Withdrawal resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public withdrawal resource included in withdrawal events.","type":"object","required":["id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a withdrawal.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current withdrawal lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"approved","type":"string"},{"const":"rejected","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}}}}]},"PaymentEvent":{"additionalProperties":false,"description":"Signed event envelope for a payment lifecycle change.","type":"object","required":["id","type","created_at","livemode","data"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Stable event identifier used by consumers to deduplicate deliveries.","type":"string"},"type":{"description":"Payment lifecycle event type.","anyOf":[{"const":"payment.created","type":"string"},{"const":"payment.pending","type":"string"},{"const":"payment.paid","type":"string"},{"const":"payment.failed","type":"string"},{"const":"payment.expired","type":"string"},{"const":"payment.cancelled","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"livemode":{"description":"True for live environment events; false for test environment events.","type":"boolean"},"data":{"additionalProperties":false,"description":"Payment resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public payment resource returned by retrieve and simulation operations.","type":"object","required":["id","amount","currency","merchant_reference","status","livemode","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"merchant_reference":{"minLength":1,"maxLength":255,"description":"Merchant-supplied order reference, unique within the project and environment.","type":"string"},"status":{"description":"Current payment lifecycle state.","anyOf":[{"const":"awaiting_method","type":"string"},{"const":"pending","type":"string"},{"const":"paid","type":"string"},{"const":"failed","type":"string"},{"const":"expired","type":"string"},{"const":"cancelled","type":"string"}]},"livemode":{"description":"True for live environment payments; false for test environment payments.","type":"boolean"},"channel":{"description":"Payment method requested for checkout. Omit to use the project's configured default.","anyOf":[{"const":"qris","type":"string"},{"const":"bca_va","type":"string"},{"const":"bni_va","type":"string"},{"const":"bri_va","type":"string"},{"const":"mandiri_bill","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"expires_at":{"description":"Checkout expiry time in UTC, or null when no expiry is set.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]},"paid_at":{"description":"Time payment became paid in UTC, or null before payment.","anyOf":[{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},{"type":"null"}]}}}}}}},"RefundEvent":{"additionalProperties":false,"description":"Signed event envelope for a refund lifecycle change.","type":"object","required":["id","type","created_at","livemode","data"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Stable event identifier used by consumers to deduplicate deliveries.","type":"string"},"type":{"description":"Refund lifecycle event type.","anyOf":[{"const":"refund.requested","type":"string"},{"const":"refund.completed","type":"string"},{"const":"refund.rejected","type":"string"},{"const":"refund.failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"livemode":{"description":"True for live environment events; false for test environment events.","type":"boolean"},"data":{"additionalProperties":false,"description":"Refund resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public refund resource included in refund events.","type":"object","required":["id","payment_id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a refund.","type":"string"},"payment_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a payment.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current refund lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"completed","type":"string"},{"const":"rejected","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}}}},"WithdrawalEvent":{"additionalProperties":false,"description":"Signed event envelope for a withdrawal lifecycle change.","type":"object","required":["id","type","created_at","livemode","data"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Stable event identifier used by consumers to deduplicate deliveries.","type":"string"},"type":{"description":"Withdrawal lifecycle event type.","anyOf":[{"const":"withdrawal.requested","type":"string"},{"const":"withdrawal.approved","type":"string"},{"const":"withdrawal.rejected","type":"string"},{"const":"withdrawal.completed","type":"string"},{"const":"withdrawal.failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"livemode":{"description":"True for live environment events; false for test environment events.","type":"boolean"},"data":{"additionalProperties":false,"description":"Withdrawal resource snapshot associated with this event.","type":"object","required":["object"],"properties":{"object":{"additionalProperties":false,"description":"Public withdrawal resource included in withdrawal events.","type":"object","required":["id","amount","currency","status","created_at","updated_at"],"properties":{"id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_-]{0,127}$","description":"Opaque identifier assigned to a withdrawal.","type":"string"},"amount":{"minLength":1,"maxLength":16,"pattern":"^[1-9][0-9]{0,15}$","description":"Positive amount in IDR serialized as a base-10 integer string to preserve precision.","type":"string"},"currency":{"description":"ISO 4217 currency code. Indonesian rupiah (IDR) is currently supported.","const":"IDR","type":"string"},"status":{"description":"Current withdrawal lifecycle state.","anyOf":[{"const":"pending","type":"string"},{"const":"approved","type":"string"},{"const":"rejected","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"}]},"created_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"},"updated_at":{"minLength":20,"maxLength":30,"pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,6})?Z$","description":"UTC timestamp in ISO 8601 format.","type":"string"}}}}}}},"Error":{"additionalProperties":false,"description":"Stable error envelope returned when an API request fails.","type":"object","required":["type","code","message","request_id"],"properties":{"type":{"description":"Category of API error.","anyOf":[{"const":"invalid_request_error","type":"string"},{"const":"authentication_error","type":"string"},{"const":"permission_error","type":"string"},{"const":"not_found_error","type":"string"},{"const":"conflict_error","type":"string"},{"const":"rate_limit_error","type":"string"},{"const":"api_error","type":"string"}]},"code":{"minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$","description":"Stable machine-readable error code for the failure.","type":"string"},"message":{"minLength":1,"maxLength":512,"description":"Safe human-readable explanation of the failure.","type":"string"},"request_id":{"minLength":1,"maxLength":128,"pattern":"^[a-z][a-z0-9_]{0,127}$","description":"Correlation identifier for the failed request; matches the X-Request-ID response header.","type":"string"},"details":{"additionalProperties":false,"maxProperties":20,"description":"Optional safe, machine-readable context for the error.","type":"object","patternProperties":{"^[a-z][a-z0-9_]{0,39}$":{"description":"Scalar detail value.","anyOf":[{"maxLength":256,"description":"String detail value.","type":"string"},{"description":"Integer detail value.","type":"integer"},{"description":"Boolean detail value.","type":"boolean"},{"description":"Explicitly empty detail value.","type":"null"}]}}}}}},"examples":{"PaymentPaidEvent":{"summary":"Payment paid event","value":{"id":"evt_payment_paid_example","type":"payment.paid","created_at":"2026-01-01T00:00:00.000Z","livemode":false,"data":{"object":{"id":"vct_test_example_never_use","amount":"125000","currency":"IDR","merchant_reference":"vct_test_example_never_use","status":"paid","livemode":false,"channel":"qris","created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null,"paid_at":"2026-01-01T00:05:00.000Z"}}}},"RefundCompletedEvent":{"summary":"Refund completed event","value":{"id":"evt_refund_completed_example","type":"refund.completed","created_at":"2026-01-01T00:06:00.000Z","livemode":false,"data":{"object":{"id":"refund_example_001","payment_id":"vct_test_example_never_use","amount":"125000","currency":"IDR","status":"completed","created_at":"2026-01-01T00:05:00.000Z","updated_at":"2026-01-01T00:06:00.000Z"}}}},"WithdrawalCompletedEvent":{"summary":"Withdrawal completed event","value":{"id":"evt_withdrawal_completed_example","type":"withdrawal.completed","created_at":"2026-01-01T00:06:00.000Z","livemode":false,"data":{"object":{"id":"withdrawal_example_001","amount":"125000","currency":"IDR","status":"completed","created_at":"2026-01-01T00:05:00.000Z","updated_at":"2026-01-01T00:06:00.000Z"}}}}}}}