POST Redirect Checkout

Initiate a payment by submitting an HTML form directly to Overdrive Connect.

This integration is ideal for traditional server-rendered applications that prefer browser-based form submissions instead of making server-to-server API requests.

Recommendation

POST Redirect Checkout is recommended for traditional server-rendered applications. For Single Page Applications (SPA), mobile applications, or backend integrations, we recommend using the Merchant API.

Endpoint

POST /checkout

Form Parameters

The HTML form accepts the same fields as the Create Payment API.

Tip

If you already support the Merchant API, you can submit the same payment payload using a standard HTML form.

Request Signature

Every checkout request must include your apiKey and a valid signature.

The signature is generated using HMAC-SHA256 over the canonical JSON representation of the request body (excluding the signature field), using your API Secret as the signing key.

const payload = {
    ...payment,
};

delete payload.signature;

const canonical = JSON.stringify(
    Object.keys(payload)
        .sort()
        .reduce((result, key) => {
            result[key] = payload[key];
            return result;
        }, {})
);

const signature =
    HMAC_SHA256(
        canonical,
        API_SECRET
    );
Important

Any modification to the payload after generating the signature will invalidate the request.

Example Form

<form
    action="https://api.example.com/checkout"
    method="post">

    <input
        type="hidden"
        name="apiKey"
        value="pk_xxxxxxxxx">

    <input
        type="hidden"
        name="signature"
        value="generated-signature">

    <input
        type="hidden"
        name="merchantPaymentReference"
        value="ORDER-100001">

    <input
        type="hidden"
        name="currency"
        value="PHP">

    <input
        type="hidden"
        name="firstName"
        value="John">

    <input
        type="hidden"
        name="lastName"
        value="Doe">

    <input
        type="hidden"
        name="email"
        value="john@example.com">

    <input
        type="hidden"
        name="mobile"
        value="09171234567">

    <input
        type="hidden"
        name="items[0][code]"
        value="sku-smvr001">

    <input
        type="hidden"
        name="items[0][name]"
        value="Space Marine VR">

    <input
        type="hidden"
        name="items[0][description]"
        value="Zero Latency Booking">

    <input
        type="hidden"
        name="items[0][unitPrice]"
        value="1000.00">

    <input
        type="hidden"
        name="items[0][quantity]"
        value="1">

    <input
        type="hidden"
        name="successUrl"
        value="https://merchant.example/success">

    <input
        type="hidden"
        name="failureUrl"
        value="https://merchant.example/failure">

    <input
        type="hidden"
        name="cancelUrl"
        value="https://merchant.example/cancel">

    <button type="submit">

        Pay Now

    </button>

</form>
Arrays

Multiple payment items are submitted using standard HTML form array notation such as items[0][name], items[0][unitPrice], and items[1][name].

Payment Flow

Merchant Website
│
Submit Payment Form
│
▼
Overdrive Connect
│
Creates Payment
│
▼
Hosted Checkout
│
Customer Completes Payment
│
▼
Merchant Callback
│
▼
Browser Redirect
│
▼
Merchant Website

After the form is submitted, the customer is redirected to the hosted checkout page. Once payment has been completed, Overdrive Connect sends a signed callback to your server before redirecting the customer to the appropriate success, failure, or cancel URL.

Idempotency

The merchantPaymentReference uniquely identifies a payment. Reusing the same reference prevents duplicate payment creation.

Possible Errors

Condition Result
Invalid signature Redirects to the configured failureUrl.
Invalid form data Redirects to the configured failureUrl with validation details.
Duplicate payment Existing payment is reused or rejected depending on its current status.
Payment provider unavailable Redirects to the configured failureUrl.

Next Step

Continue to the Payment Callback guide to learn how to securely receive payment notifications.