Version: 1.1 · Updated: 2026-10-13
1. Request: POST /api/v1/collection/apn/direct
Direct Payment is a separately enabled card flow. Use it only when DLT has enabled the merchant's Direct Payment capability and your integration can securely handle card data. Hosted Checkout collects payment details on the hosted page. Both flows use merchant machine authentication and options from payment discovery.
This complete request uses synthetic payor data and card placeholders. Replace them only in the secure payment processing path; never log card input. The device values describe the actual payor's browser, not your integration server.
POST /api/v1/collection/apn/direct
Authorization: Bearer <machine_access_token>
Accept: application/json
Content-Type: application/json
{
"service_code": "<collection_service_code>",
"merchant_account_id": "TEST-12345678",
"merchant_transaction_id": "DIRECT202610130001",
"time_offset": "+08:00",
"channel": 4,
"success_url": "https://merchant.example.test/payment/success",
"failure_url": "https://merchant.example.test/payment/failure",
"amount": "100.00",
"currency": "PHP",
"payment_brand": "VISA",
"payment_brand_code": "<returned_brand_code>",
"first_name": "Alex",
"last_name": "Example",
"email": "alex@example.test",
"address_line_one": "123 Example Street",
"address_line_two": "Unit 4",
"city_municipality": "Makati",
"state_province_region": "Metro Manila",
"country_code": "PH",
"postal_code": "1200",
"card_holder_name": "<cardholder_name>",
"card_number": "<14_to_16_digits>",
"expiration_month": "<two_digits>",
"expiration_year": "<two_digits>",
"ccv": "<three_or_four_digits>",
"device": {
"timezone": "-480",
"browser_color_depth": "24",
"browser_language": "en-US",
"browser_screen_height": "900",
"browser_screen_width": "1440",
"os": "Windows",
"browser_accept_header": "text/html,application/xhtml+xml",
"user_agent": "<payor_browser_user_agent>",
"browser_javascript_enabled": true,
"browser_java_enabled": false,
"accept_content": "text/html"
}
}
1.1 Request validation
The Checkout validation table applies to all shared fields: service/merchant/reference, offset/channel, amount/currency, brand, payor/address, return URLs and optional description/product/reference metadata. Direct overrides the following rules; all fields below are in the JSON body.
| Field | Location | Requirement | Validation rules |
|---|---|---|---|
is_card_payment |
JSON | Prohibited | Omit; this endpoint selects Direct Payment itself. |
card_holder_name |
JSON | Required | String, maximum 100. |
card_number |
JSON | Required | Numeric, 14–16 digits. Send as a string to preserve digits. |
expiration_month, expiration_year |
JSON | Required | Numeric, exactly two digits each. The local validator does not enforce calendar range or future expiry; provider acceptance is separate. |
ccv |
JSON | Required | Numeric, 3–4 digits. Send as a string to preserve leading zeroes. |
device |
JSON | Required | Array/object containing the required device fields below. |
device.timezone, device.browser_color_depth, device.browser_language |
JSON | Required | Non-empty strings. |
device.browser_screen_height, device.browser_screen_width, device.os |
JSON | Required | Non-empty strings, including screen dimensions. |
device.browser_accept_header, device.user_agent, device.accept_content |
JSON | Required | Non-empty strings. |
device.browser_javascript_enabled, device.browser_java_enabled |
JSON | Required | Booleans. |
callback_url |
JSON | Optional, nullable | HTTP/HTTPS URL, maximum 2048. Additional service policy requires an approved origin for this merchant/deployment, HTTPS in production, and no userinfo or fragment. |
pan, cvv, cvc, credit_card, card |
JSON | Prohibited | Use the supported card_number and ccv fields; omit aliases/nested card objects. |
Missing/null/empty required values fail. Boolean fields accept Laravel boolean inputs; use JSON true/false. Optional null/omitted values follow the shared rules. Unknown top-level fields are discarded from the validated payload; device has no allowed-key restriction, so send only the documented keys. Card data is prohibited in persistent URLs, references, descriptions and product metadata.
callback_url is the provider's payor browser return URL, not the merchant webhook destination. An allowed override takes precedence over the merchant's configured payor return, then the DLT fallback. Omit it to use that configured routing. Hosted Checkout always uses the DLT Checkout return routing and ignores this field. Success/failure URLs in the response are resolved separately by channel.
1.2 HTTP 200: further payor action required
{
"data": {
"is_card_payment": true,
"payment_status": "PENDING",
"transaction_id": "APNEXAMPLE0002",
"merchant_transaction_id": "DIRECT202610130001",
"amount": "100.00",
"payment_url": "https://checkout.example.test/authentication/example",
"success_url": "https://merchant.example.test/payment/success?reference_id=DIRECT202610130001",
"failure_url": "https://merchant.example.test/payment/failure?reference_id=DIRECT202610130001",
"timestamp": "2026-10-13T10:05:00+08:00"
},
"success": true,
"message": "Authentication required"
}
1.3 HTTP 200: paid result
{
"data": {
"is_card_payment": true,
"payment_status": "PAID",
"transaction_id": "APNEXAMPLE0002",
"merchant_transaction_id": "DIRECT202610130001",
"amount": "100.00",
"payment_url": null,
"success_url": "https://merchant.example.test/payment/success?reference_id=DIRECT202610130001",
"failure_url": "https://merchant.example.test/payment/failure?reference_id=DIRECT202610130001",
"timestamp": "2026-10-13T10:06:00+08:00"
},
"success": true,
"message": "Payment successful"
}
These show possible state/URL combinations, not a guarantee of immediate payment or a challenge on every card. Messages are illustrative provider/state text. Follow a non-null payment_url when further action is required, then read or synchronize status. The response resource and reference-reuse/unknown-submission behavior are shared with Checkout.
2. Error examples
2.1 HTTP 403: Direct Payment disabled
{"success": false, "code": "DIRECT_PAYMENT_NOT_ALLOWED", "message": "APN Direct Payment is not enabled for this merchant."}
2.2 HTTP 422: unapproved return URL
{
"success": false,
"message": "Validation error",
"errors": {"callback_url": ["The callback URL is invalid or is not approved for this merchant and environment."]}
}
2.3 HTTP 422: missing device field
{
"success": false,
"message": "Validation error",
"errors": {"device.browser_language": ["The device.browser language field is required."]}
}
Field error text may vary by validation localization. For machine authentication, 409 reference conflicts and 503 unknown outcomes, use the Checkout error and retry reference. Do not retry uncertain card charges under new references.
Receive DLT's signed PAID or REJECTED event at your separately registered notification URL using Payment notifications. The Direct Payment callback_url is a browser return destination.