Appearance
Create VA V2
Create Virtual Account with valid data PG3
JSON Attributes
Name | Data Type | Required | Details |
---|---|---|---|
external_id | String (64) | M | Unique from merchant for each channel. Only accepts Alphabet, numeric and special character dash (-) |
order_id | String (25) | M | Alphanumeric and dash (-), Not unique |
currency | String (3) | M | Fixed value: IDR |
payment_method | String (25) | M | Fixed value: bank_transfer |
payment_channel | String (50) | M | Bank Names |
payment_details | Object | M | |
1) billing_name | string (100) | M | Biller's Name |
2) va_number | string (12) | C | Free digit for virtual account numbers |
3) payment_system | ENUM | O | Loop payment system. Available values: OPEN, PARTIAL, CLOSED. Default: CLOSED |
4) is_multi_use | boolean | O | Default: false |
5) amount | Numeric (13) | C | Fill 0 for OPEN payment_system. Maximum amount refers to amount validation |
6) expired_time | DATETIME | O | ISO-8601 format: YYYY-mm-ddTHH:mm:ss.vvv+07:00 • Single Closed & Partial = default 24 hours • Multi Closed & Open = default 10 years • Min 10 mins * Max 24 hrs for Finpay |
7) transaction_description | string (100) | M | Transaction’s description |
customer_details | Object | M | |
1) email | String (255) | M | Email format validation |
2) full_name | String (100) | M | |
3) phone | String (18) | O | Must be in range of 8-15 digits |
item_details | Object Array | O | |
1) item_id | String (25) | C | Mandatory if item_details is used |
2) name | String (100) | C | Mandatory if item_details is used |
3) amount | Numeric (13) | C | Mandatory if item_details is used |
4) qty | Numeric (5) | C | Mandatory if item_details is used |
5) description | String (100) | O | |
billing_address | Object | O | Billing address |
1) full_name | String (100) | O | |
2) phone | String (18) | O | |
3) address | String (150) | O | |
4) city | String (50) | O | |
5) postal_code | String (10) | O | |
6) country | String (100) | O | |
shipping_address | Object | O | |
1) full_name | String (100) | O | |
2) phone | String (18) | O | |
3) address | String (150) | O | |
4) city | String (50) | O | |
5) postal_code | String (10) | O | |
6) country | String (100) | O | |
additional_data | TEXT | O | Free Text |
callback_url | TEXT | M | Valid URL format |
Information
Key | Value |
---|---|
Hostname | https://api-stage.ifortepay.id |
Path | /va |
HTTP Method | POST |
Headers
Key | Format | Required | Value |
---|---|---|---|
Content-Type | application/json | M | |
Authorization | String | M | |
x-req-signature | String | M | |
x-version | String | M | v3 |
Example
Body raw
json
{
"external_id": "",
"order_id": "",
"currency": "IDR",
"payment_method": "bank_transfer",
"payment_channel": "{{channel}}",
"payment_details": {
"billing_name": "Nanas",
"payment_system": "CLOSED",
"va_number": "",
"is_multi_use": false,
"amount": 10000,
"is_customer_paying_fee": false,
"expired_time": "{{expired_time}}",
"transaction_description": "this is order description"
},
"customer_details": {
"email": "customer@email.com",
"full_name": "My FullName",
"phone": "0888888888"
},
"item_details": [
{
"item_id": "ID 12",
"name": "item 1",
"amount": 10000,
"qty": 1,
"description": "item description"
}
],
"shipping_address": {
"full_name": "MC Payment",
"phone": "123456",
"address": "Warung jati 8a ",
"city": "Jakarta",
"postal_code": "11111",
"country": "Indonesia"
},
"billing_address": {
"full_name": "MC Payment",
"phone": "123456",
"address": "Warung jati 8a ",
"city": "Jakarta",
"postal_code": "11111",
"country": "Indonesia"
},
"payment_options": {
"referral_code": "agen 1",
"promo_code": "",
"source": "payment_page"
},
"additional_data": "remarks text or any json text",
"callback_url": "https://testcallback.com"
}
Example Request
sh
curl --location 'https://api-stage.ifortepay.id/va' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{Authorization}}' \
--header 'x-req-signature: {{x-req-signature}}' \
--header 'x-version: v3' \
--data-raw '{
"external_id": "",
"order_id": "",
"currency": "IDR",
"payment_method": "bank_transfer",
"payment_channel": "PERMATA",
"payment_details": {
"billing_name": "Testing",
"payment_system": "CLOSED",
"va_number": "",
"is_multi_use" : false,
"amount": 10000,
"expired_time": "2023-02-09T13:45:05.842+07:00",
"transaction_description": "this is order description"
},
"customer_details": {
"email": "testing@email.com",
"full_name" : "My FullName",
"phone": "131888888888"
},
"item_details": [
{
"item_id": "ID 12",
"name": "item 1",
"amount": 10000,
"qty": 1,
"description": "item description"
}
],
"shipping_address": {
"full_name":"MC Payment",
"phone":"123456",
"address":"Warung jati 8a ",
"city":"Jakarta",
"postal_code":"11111",
"country":"Indonesia"
},
"billing_address": {
"full_name":"MC Payment",
"phone":"123456",
"address":"Warung jati 8a ",
"city":"Jakarta",
"postal_code":"11111",
"country":"Indonesia"
},
"additional_data": "remarks text or any json text",
"callback_url": "https://testcallback.com"
}'
go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api-stage.ifortepay.id/va"
method := "POST"
payload := strings.NewReader(`{
"external_id": "",
"order_id": "",
"currency": "IDR",
"payment_method": "bank_transfer",
"payment_channel": "PERMATA",
"payment_details": {
"billing_name": "Testing",
"payment_system": "CLOSED",
"va_number": "",
"is_multi_use" : false,
"amount": 10000,
"expired_time": "2023-02-09T13:45:05.842+07:00",
"transaction_description": "this is order description"
},
"customer_details": {
"email": "testing@email.com",
"full_name" : "My FullName",
"phone": "131888888888"
},
"item_details": [
{
"item_id": "ID 12",
"name": "item 1",
"amount": 10000,
"qty": 1,
"description": "item description"
}
],
"shipping_address": {
"full_name":"MC Payment",
"phone":"123456",
"address":"Warung jati 8a ",
"city":"Jakarta",
"postal_code":"11111",
"country":"Indonesia"
},
"billing_address": {
"full_name":"MC Payment",
"phone":"123456",
"address":"Warung jati 8a ",
"city":"Jakarta",
"postal_code":"11111",
"country":"Indonesia"
},
"additional_data": "remarks text or any json text",
"callback_url": "https://testcallback.com"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "{{Authorization}}")
req.Header.Add("x-req-signature", "{{x-req-signature}}")
req.Header.Add("x-version", "v3")
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 = JSON.stringify({
"external_id": "",
"order_id": "",
"currency": "IDR",
"payment_method": "bank_transfer",
"payment_channel": "PERMATA",
"payment_details": {
"billing_name": "Testing",
"payment_system": "CLOSED",
"va_number": "",
"is_multi_use": false,
"amount": 10000,
"expired_time": "2023-02-09T13:45:05.842+07:00",
"transaction_description": "this is order description"
},
"customer_details": {
"email": "testing@email.com",
"full_name": "My FullName",
"phone": "131888888888"
},
"item_details": [
{
"item_id": "ID 12",
"name": "item 1",
"amount": 10000,
"qty": 1,
"description": "item description"
}
],
"shipping_address": {
"full_name": "MC Payment",
"phone": "123456",
"address": "Warung jati 8a ",
"city": "Jakarta",
"postal_code": "11111",
"country": "Indonesia"
},
"billing_address": {
"full_name": "MC Payment",
"phone": "123456",
"address": "Warung jati 8a ",
"city": "Jakarta",
"postal_code": "11111",
"country": "Indonesia"
},
"additional_data": "remarks text or any json text",
"callback_url": "https://testcallback.com"
});
var config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-stage.ifortepay.id/va',
headers: {
'Content-Type': 'application/json',
'Authorization': '{{Authorization}}',
'x-req-signature': '{{x-req-signature}}',
'x-version': 'v3'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
rust
extern crate reqwest;
use reqwest::header;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut headers = header::HeaderMap::new();
headers.insert("Content-Type", "application/json".parse().unwrap());
headers.insert("Authorization", "{{Authorization}}".parse().unwrap());
headers.insert("x-req-signature", "{{x-req-signature}}".parse().unwrap());
headers.insert("x-version", "v3".parse().unwrap());
let client = reqwest::blocking::Client::new();
let res = client.post("https://api-stage.ifortepay.id/va")
.headers(headers)
.body(r#"
{
"external_id": "",
"order_id": "",
"currency": "IDR",
"payment_method": "bank_transfer",
"payment_channel": "PERMATA",
"payment_details": {
"billing_name": "Testing",
"payment_system": "CLOSED",
"va_number": "",
"is_multi_use" : false,
"amount": 10000,
"expired_time": "2023-02-09T13:45:05.842+07:00",
"transaction_description": "this is order description"
},
"customer_details": {
"email": "testing@email.com",
"full_name" : "My FullName",
"phone": "131888888888"
},
"item_details": [
{
"item_id": "ID 12",
"name": "item 1",
"amount": 10000,
"qty": 1,
"description": "item description"
}
],
"shipping_address": {
"full_name":"MC Payment",
"phone":"123456",
"address":"Warung jati 8a ",
"city":"Jakarta",
"postal_code":"11111",
"country":"Indonesia"
},
"billing_address": {
"full_name":"MC Payment",
"phone":"123456",
"address":"Warung jati 8a ",
"city":"Jakarta",
"postal_code":"11111",
"country":"Indonesia"
},
"additional_data": "remarks text or any json text",
"callback_url": "https://testcallback.com"
}
"#
)
.send()?
.text()?;
println!("{}", res);
Ok(())
}
Example Response
json
{
"response_code": "00",
"transaction_id": "8393c208-8b83-49eb-8c0b-0b50016e7401",
"external_id": "18457738645627",
"order_id": "Test-01",
"currency": "IDR",
"transaction_status": "ACTIVE",
"payment_method": "BANK_TRANSFER",
"payment_channel": "PERMATA",
"additional_data": "remarks text or any json text",
"callback_url": "https://testvav4.free.beeceptor.com",
"payment_details": {
"payment_system": "CLOSED",
"billing_name": "Testing",
"va_number": "7888003586035980",
"amount": 10000,
"total_fee_amount": 872,
"total_promo_amount": 0,
"total_amount": 10872,
"is_multi_use": false,
"is_customer_paying_fee": true,
"expired_time": "2023-02-09T13:45:05.842+07:00",
"transaction_description": "this is order description"
},
"customer_details": {
"email": "testing@email.com",
"full_name": "My FullName",
"phone": "131888888888"
},
"item_details": [
{
"item_id": "ID 12",
"name": "item 1",
"amount": 10000,
"qty": 1,
"description": "item description"
}
],
"billing_address": {
"full_name": "MC Payment",
"phone": "123456",
"address": "Warung jati 8a ",
"city": "Jakarta",
"country": "Indonesia",
"postal_code": "11111"
},
"shipping_address": {
"full_name": "MC Payment",
"phone": "123456",
"address": "Warung jati 8a ",
"city": "Jakarta",
"country": "Indonesia",
"postal_code": "11111"
}
}