API Reference

Create Payment Request

This API endpoint is used to initiate a transfer using the Key2Payment OmnipayInstaPay service. It is an HTTP POST request that should be sent to the URL https://api.key2payment.com/PaymentToken/Create. The request should include the necessary parameters to specify the transfer details. The response will provide information about the transfer, including a track ID, merchant ID, redirect URL, token, and VCN (Virtual Card Number). Please refer to the API documentation or contact the API provider for more information on the required request parameters and the expected response structure.

Checkout UI Approaches

UX Approaches

There are two UX approaches available for directing the customer to the Instapay checkout flow. The choice between the two will largely depend on the experience that you want to build.

1. Merchant Building their own InstaPay Checkout Page

In the response you will receive a field called VCN and amount. Using this info, you can build your own checkout page.

Payment Instructions should be clearly displayed on the page

2. Iframe/Redirection

In the response you will receive a field called redirectUrl; use this to redirect the customer to our website. This can also be put into a, iFrame or redirect to a new tab

Sample Request

{
    "merchantid": "INSTAPAYTEST001",
    "password": "a92bYPe!jx",
    "trackid": "test",//mandatory
    "payment_method": {
        "type": "PHQR"
    },
    "bill_phone": "+638765432",
    "bill_currencycode": "PHP", //mandatory
    "bill_amount": "2000.00",//mandatory
    "returnUrl": "https://webhook.site/9137328e-8080-45b4-a40",
    "bill_customerip": "208.127.179.23",//mandatory
    "serverUrl": "https://webhook.site/9137328e-8080-45b4-a40e", //mandatory
    "bill_country": "PH", //mandatory
    "bill_email": "[email protected]", //mandatory
    "bill_city": "Miami", 
    "bill_state": "test", 
    "bill_address": "123 ave test", 
    "bill_zip": "123555", 
    "lang": "en"
}

Sample Response

{
    "type": "valid",
    "result": "Successful",
    "responsecode": "0",
    "trackid": "merchanttxnid",
    "merchantid": "INSTAPAY001",
    "redirectUrl": "https://pay.key2payment.com/v5/OmnipayInstaPay/Index?paymenttoken=503e162e344c42d392c0079afad14f9a",
    "token": "503e162e344c42d392c0079afad14f9a",
    "error_code_tag": null,
    "error_text": null
}
Language
Click Try It! to start a request and see the response here!