API Reference

Create Payment Request

This API endpoint is used to initiate a payment using the Key2Payment payment 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 transaction, including a transaction ID, track ID, merchant ID, redirect URL and token. Please refer to the API documentation or contact the API provider for more information on the required request parameters and the expected response structure.

Sample Request

{
    "merchantid": "",
    "password": "",
    "trackid": "test",//mandatory
    "payment_method": {
        "type": "BANKCARD"
    },
    "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",
    "transactionid": "2686080",
    "trackid": "merchanttxnid",
    "merchantid": "",
    "redirectUrl": "https://pay.key2payment.com/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!