Skip to content

Generate Payment Page Link

Endpoint API to generate a payment page link to be shown on merchant webview / webpage. This endpoint will give you a payment_url in the response JSON, and you will need to show the payment_url or redirect customer in web page / web view

JSON Attributes

NameData TypeRequiredDetails
external_idString (255)Yesunique string identifier from merchant, must contain only alphanumeric and special characters: -_ .
order_idString (25)YesMust contain only alphanumeric and special character - (dash).
amountnumericYesminimum amount: 10000 for Card, VA, E-Wallet & OctoClicks (Direct Debit) 15000; max amount depends on channel.
if using item_details, amount must match total amount in item_details (qty * amount).
descriptionTextYes-
customer_detailsObjectYes-
1) full_nameString(100)YesMust contain alphabet and - only
2) emailTextYesmust contain valid email format
3) phoneString(20)No-
4) addressTextYes-
5) is_email_showBooleanNo-
6) is_phone_showBooleanNo-
item_detailsObjectNo-
1) item_idString(100)YesMust contain alphanumeric and -_.@ only
2) nameTextYesMust contain valid email format
3) qtynumericYes-
4) amountnumericYes-
selected_channelsArray of ObjectYes-
1) channelStringYesCARD (CC/DC), OVO, DANA, SHOPE

Note:
Each channel may has their own limitation and preferences.
Please contact our admin / MRO, because merchant need to register and get the credential from bank first for this usage.

Information

Hostnamehttps://api-stage.ifortepay.id
Path/payment-page/payment
HTTP MethodPOST

Headers

KeyFormatRequiredValue
Content-Typeapplication/jsonM
AuthorizationStringM
x-req-signatureStringM
sub-merchant-idStringO
x-versionStringMv3

Example

Body raw
json
{
    "order_id": "{{order_id}}",
    "external_id": "{{external_id}}",
    "amount": {{amount, min: 10000 for CARD,VA,E-Wallet and for OctoClicks min:15000 }},
    "description": "{{transaction_description}}",
    "customer_details": {
        "full_name": "{{customer_fullname}}",
        "email": "{{customer_email}}",
        "phone": "{{customer_phone}}",
        "address": "{{customer_address}}",
        "is_email_show":{{default false. this variable used to show email customer on credit card transaction based on customer details}},
        "is_phone_show":{{default false. this variable used to show phone customer on credit card transaction based on customer details}}
    },
    "item_details": [
        {
            "item_id": "{{item_id}}",
            "name": "{{item_name}}",
            "amount": {{item_price}},
            "qty": {{item_qty}}
        },
        {
            ....
        }
    ],
    "selected_channels": [
        {"channel":"CARD",
         "acq": "{{please contact MCP for this value as the usage is depend on bank}}"},

        {"channel":"DANA"},

        {"channel":"OVO"},

        {"channel":"SHOPEEPAY"},

        {"channel":"LINKAJA"},

        {"channel":"QRIS"},

        {"channel":"OCTOCLICKS"},

        {"channel": "VA",
         "acq": "{{please contact MCP for this value as the usage is depend on bank}}",
         "payment_system": "CLOSED",
         "is_multi_use": false}

    ],
    "billing_address": {
        "full_name": "{{customer_billing_fullname}}",
        "phone": "{{customer_billing_phone}}",
        "address": "{{customer_billing_address}}",
        "city": "{{customer_billing_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "shipping_address": {
        "full_name": "{{customer_shipping_fullname}}",
        "phone": "{{customer_shipping_phone}}",
        "address": "{{customer_shipping_address}}",
        "city": "{{customer_shipping_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "save_card": {{default false. this variable will be used in future}},
    "callback_url": "{{merchant_callback_url}}",
    "success_redirect_url": "{{merchant_redirect_success_page_url}}",
    "failed_redirect_url": "{{merchant_redirect_failed_page_url}}"
}
Example Request
shell
curl --location 'https://api-stage.ifortepay.id/payment-page/payment' \
--header 'Authorization: {{Authorization}}' \
--header 'x-req-signature: {{x-req-signature}}' \
--header 'sub-merchant-id: {{optional. contact our support for usage}}' \
--data '{
    "order_id": "{{order_id}}",
    "external_id": "{{external_id}}",
    "amount": {{amount, min: 1000}},
    "description": "{{transaction_description}}",
    "customer_details": {
        "full_name": "{{customer_fullname}}",
        "email": "{{customer_email}}",
        "phone": "{{customer_phone}}",
        "address": "{{customer_address}}",
        "is_email_show":{{default false. this variable used to show email customer on credit card transaction based on customer details}},
        "is_phone_show":{{default false. this variable used to show phone customer on credit card transaction based on customer details}}
    },
    "item_details": [
        {
            "item_id": "{{item_id}}",
            "name": "{{item_name}}",
            "amount": {{item_price}},
            "qty": {{item_qty}}
        },
        {
            ....
        }
    ],
    "selected_channels": [
        {"channel":"CARD", "acq": "{{please contact MCP for this value}}"},
    ],
    "billing_address": {
        "full_name": "{{customer_billing_fullname}}",
        "phone": "{{customer_billing_phone}}",
        "address": "{{customer_billing_address}}",
        "city": "{{customer_billing_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "shipping_address": {
        "full_name": "{{customer_shipping_fullname}}",
        "phone": "{{customer_shipping_phone}}",
        "address": "{{customer_shipping_address}}",
        "city": "{{customer_shipping_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "save_card": {{default false. this variable will be used in future}},
    "callback_url": "{{merchant_callback_url}}",
    "success_redirect_url": "{{merchant_redirect_success_page_url}}",
    "failed_redirect_url": "{{merchant_redirect_failed_page_url}}"
}'
go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-stage.ifortepay.id/payment-page/payment"
  method := "POST"

  payload := strings.NewReader(`{
    "order_id": "{{order_id}}",
    "external_id": "{{external_id}}",
    "amount": {{amount, min: 1000}},
    "description": "{{transaction_description}}",
    "customer_details": {
        "full_name": "{{customer_fullname}}",
        "email": "{{customer_email}}",
        "phone": "{{customer_phone}}",
        "address": "{{customer_address}}",
        "is_email_show":{{default false. this variable used to show email customer on credit card transaction based on customer details}},
        "is_phone_show":{{default false. this variable used to show phone customer on credit card transaction based on customer details}}
    },
    "item_details": [
        {
            "item_id": "{{item_id}}",
            "name": "{{item_name}}",
            "amount": {{item_price}},
            "qty": {{item_qty}}
        },
        {
            ....
        }
    ],
    "selected_channels": [
        {"channel":"CARD", "acq": "{{please contact MCP for this value}}"},
    ],
    "billing_address": {
        "full_name": "{{customer_billing_fullname}}",
        "phone": "{{customer_billing_phone}}",
        "address": "{{customer_billing_address}}",
        "city": "{{customer_billing_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "shipping_address": {
        "full_name": "{{customer_shipping_fullname}}",
        "phone": "{{customer_shipping_phone}}",
        "address": "{{customer_shipping_address}}",
        "city": "{{customer_shipping_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "save_card": {{default false. this variable will be used in future}},
    "callback_url": "{{merchant_callback_url}}",
    "success_redirect_url": "{{merchant_redirect_success_page_url}}",
    "failed_redirect_url": "{{merchant_redirect_failed_page_url}}"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "{{Authorization}}")
  req.Header.Add("x-req-signature", "{{x-req-signature}}")
  req.Header.Add("sub-merchant-id", "{{optional. contact our support for usage}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
js
var axios = require('axios');
var data = '{\n    "order_id": "{{order_id}}",\n    "external_id": "{{external_id}}",\n    "amount": {{amount, min: 1000}},\n    "description": "{{transaction_description}}",\n    "customer_details": {\n        "full_name": "{{customer_fullname}}",\n        "email": "{{customer_email}}",\n        "phone": "{{customer_phone}}",\n        "address": "{{customer_address}}",\n        "is_email_show":{{default false. this variable used to show email customer on credit card transaction based on customer details}},\n        "is_phone_show":{{default false. this variable used to show phone customer on credit card transaction based on customer details}}\n    },\n    "item_details": [\n        {\n            "item_id": "{{item_id}}",\n            "name": "{{item_name}}",\n            "amount": {{item_price}},\n            "qty": {{item_qty}}\n        },\n        {\n            ....\n        }\n    ],\n    "selected_channels": [\n        {"channel":"CARD", "acq": "{{please contact MCP for this value}}"},\n    ],\n    "billing_address": {\n        "full_name": "{{customer_billing_fullname}}",\n        "phone": "{{customer_billing_phone}}",\n        "address": "{{customer_billing_address}}",\n        "city": "{{customer_billing_city}}",\n        "postal_code": "{{customer_postal_code}}",\n        "country": "{{customer_country_code, e.g: ID}}"\n    },\n    "shipping_address": {\n        "full_name": "{{customer_shipping_fullname}}",\n        "phone": "{{customer_shipping_phone}}",\n        "address": "{{customer_shipping_address}}",\n        "city": "{{customer_shipping_city}}",\n        "postal_code": "{{customer_postal_code}}",\n        "country": "{{customer_country_code, e.g: ID}}"\n    },\n    "save_card": {{default false. this variable will be used in future}},\n    "callback_url": "{{merchant_callback_url}}",\n    "success_redirect_url": "{{merchant_redirect_success_page_url}}",\n    "failed_redirect_url": "{{merchant_redirect_failed_page_url}}"\n}';

var config = {
  method: 'post',
maxBodyLength: Infinity,
  url: 'https://api-stage.ifortepay.id/payment-page/payment',
  headers: { 
    'Authorization': '{{Authorization}}', 
    'x-req-signature': '{{x-req-signature}}', 
    'sub-merchant-id': '{{optional. contact our support for usage}}'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
php
use GuzzleHttp\Client;

$client = new Client();
$headers = [
  'Authorization' => '{{Authorization}}',
  'x-req-signature' => '{{x-req-signature}}',
  'sub-merchant-id' => '{{optional. contact our support for usage}}'
];
$body = '{
    "order_id": "{{order_id}}",
    "external_id": "{{external_id}}",
    "amount": {{amount, min: 1000}},
    "description": "{{transaction_description}}",
    "customer_details": {
        "full_name": "{{customer_fullname}}",
        "email": "{{customer_email}}",
        "phone": "{{customer_phone}}",
        "address": "{{customer_address}}",
        "is_email_show":{{default false. this variable used to show email customer on credit card transaction based on customer details}},
        "is_phone_show":{{default false. this variable used to show phone customer on credit card transaction based on customer details}}
    },
    "item_details": [
        {
            "item_id": "{{item_id}}",
            "name": "{{item_name}}",
            "amount": {{item_price}},
            "qty": {{item_qty}}
        },
        {
            ....
        }
    ],
    "selected_channels": [
        {"channel":"CARD", "acq": "{{please contact MCP for this value}}"},
    ],
    "billing_address": {
        "full_name": "{{customer_billing_fullname}}",
        "phone": "{{customer_billing_phone}}",
        "address": "{{customer_billing_address}}",
        "city": "{{customer_billing_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "shipping_address": {
        "full_name": "{{customer_shipping_fullname}}",
        "phone": "{{customer_shipping_phone}}",
        "address": "{{customer_shipping_address}}",
        "city": "{{customer_shipping_city}}",
        "postal_code": "{{customer_postal_code}}",
        "country": "{{customer_country_code, e.g: ID}}"
    },
    "save_card": {{default false. this variable will be used in future}},
    "callback_url": "{{merchant_callback_url}}",
    "success_redirect_url": "{{merchant_redirect_success_page_url}}",
    "failed_redirect_url": "{{merchant_redirect_failed_page_url}}"
}';

$request = new Request('POST', 'https://api-stage.ifortepay.id/payment-page/payment', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Example Response
json
{
  "response_code": "00",
  "response_message": "Success",
  "data": {
    "payment_url": "https://payment-stage.mcpayment.id/en/1234567",
    "transaction_id": "123456789",
    "expired_time": "2021-07-17T09:17:05.003Z"
  }
}

iFortepay API Documentation