curl --request POST \
  --url http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder \
  --header 'apikey: DdfPbcNdK98uqrhe' \
  --header 'signature: D197D62CD80D4BB6C79B0D0B6F78531B' \
  --data '{"noRef":"CF-30887","customer":{"Name":"John Doe","idCard":"123456789","dateOfBirth":"2019-08-02","address":"Jl. Contoh alamat","city":"Kota","zipCode":"123456","occupation":"Karyawan","phoneNumber":"0211234567","mobilePhone":"02112345678","email":"contoh@email.com"},"insuredBeneficiary":[{"name":"John Doe Child","relationship":"Anak","percentage":"25"},{"name":"John Doe Wife","relationship":"Istri","percentage":"75"}],"insuredDetail":{"totalSumInsured":"12000200","package":"SAMPLEPACKAGE","inseptionDate":"2019-08-02","premium":"30000","duration":"30"},"callBackUrl":"https:\/\/www.yourdomain.com\/callbackapi"}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"noRef\":\"CF-30887\",\"customer\":{\"Name\":\"John Doe\",\"idCard\":\"123456789\",\"dateOfBirth\":\"2019-08-02\",\"address\":\"Jl. Contoh alamat\",\"city\":\"Kota\",\"zipCode\":\"123456\",\"occupation\":\"Karyawan\",\"phoneNumber\":\"0211234567\",\"mobilePhone\":\"02112345678\",\"email\":\"contoh@email.com\"},\"insuredBeneficiary\":[{\"name\":\"John Doe Child\",\"relationship\":\"Anak\",\"percentage\":\"25\"},{\"name\":\"John Doe Wife\",\"relationship\":\"Istri\",\"percentage\":\"75\"}],\"insuredDetail\":{\"totalSumInsured\":\"12000200\",\"package\":\"SAMPLEPACKAGE\",\"inseptionDate\":\"2019-08-02\",\"premium\":\"30000\",\"duration\":\"30\"},\"callBackUrl\":\"https:\\/\\/www.yourdomain.com\\/callbackapi\"}",
  CURLOPT_HTTPHEADER => array(
    "apikey: DdfPbcNdK98uqrhe",
    "signature: D197D62CD80D4BB6C79B0D0B6F78531B"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
require 'uri'
require 'net/http'

url = URI("http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["apikey"] = 'DdfPbcNdK98uqrhe'
request["signature"] = 'D197D62CD80D4BB6C79B0D0B6F78531B'
request.body = "{\"noRef\":\"CF-30887\",\"customer\":{\"Name\":\"John Doe\",\"idCard\":\"123456789\",\"dateOfBirth\":\"2019-08-02\",\"address\":\"Jl. Contoh alamat\",\"city\":\"Kota\",\"zipCode\":\"123456\",\"occupation\":\"Karyawan\",\"phoneNumber\":\"0211234567\",\"mobilePhone\":\"02112345678\",\"email\":\"contoh@email.com\"},\"insuredBeneficiary\":[{\"name\":\"John Doe Child\",\"relationship\":\"Anak\",\"percentage\":\"25\"},{\"name\":\"John Doe Wife\",\"relationship\":\"Istri\",\"percentage\":\"75\"}],\"insuredDetail\":{\"totalSumInsured\":\"12000200\",\"package\":\"SAMPLEPACKAGE\",\"inseptionDate\":\"2019-08-02\",\"premium\":\"30000\",\"duration\":\"30\"},\"callBackUrl\":\"https:\\/\\/www.yourdomain.com\\/callbackapi\"}"

response = http.request(request)
puts response.read_body
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"apikey": @"DdfPbcNdK98uqrhe",
                           @"signature": @"D197D62CD80D4BB6C79B0D0B6F78531B" };
NSDictionary *parameters = @{ @"noRef": @"CF-30887",
                              @"customer": @{ @"Name": @"John Doe", @"idCard": @"123456789", @"dateOfBirth": @"2019-08-02", @"address": @"Jl. Contoh alamat", @"city": @"Kota", @"zipCode": @"123456", @"occupation": @"Karyawan", @"phoneNumber": @"0211234567", @"mobilePhone": @"02112345678", @"email": @"contoh@email.com" },
                              @"insuredBeneficiary": @[ @{ @"name": @"John Doe Child", @"relationship": @"Anak", @"percentage": @"25" }, @{ @"name": @"John Doe Wife", @"relationship": @"Istri", @"percentage": @"75" } ],
                              @"insuredDetail": @{ @"totalSumInsured": @"12000200", @"package": @"SAMPLEPACKAGE", @"inseptionDate": @"2019-08-02", @"premium": @"30000", @"duration": @"30" },
                              @"callBackUrl": @"https://www.yourdomain.com/callbackapi" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
import Foundation

let headers = [
  "apikey": "DdfPbcNdK98uqrhe",
  "signature": "D197D62CD80D4BB6C79B0D0B6F78531B"
]
let parameters = [
  "noRef": "CF-30887",
  "customer": [
    "Name": "John Doe",
    "idCard": "123456789",
    "dateOfBirth": "2019-08-02",
    "address": "Jl. Contoh alamat",
    "city": "Kota",
    "zipCode": "123456",
    "occupation": "Karyawan",
    "phoneNumber": "0211234567",
    "mobilePhone": "02112345678",
    "email": "contoh@email.com"
  ],
  "insuredBeneficiary": [
    [
      "name": "John Doe Child",
      "relationship": "Anak",
      "percentage": "25"
    ],
    [
      "name": "John Doe Wife",
      "relationship": "Istri",
      "percentage": "75"
    ]
  ],
  "insuredDetail": [
    "totalSumInsured": "12000200",
    "package": "SAMPLEPACKAGE",
    "inseptionDate": "2019-08-02",
    "premium": "30000",
    "duration": "30"
  ],
  "callBackUrl": "https://www.yourdomain.com/callbackapi"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
import http.client

conn = http.client.HTTPConnection("micro.fuse.co.id")

payload = "{\"noRef\":\"CF-30887\",\"customer\":{\"Name\":\"John Doe\",\"idCard\":\"123456789\",\"dateOfBirth\":\"2019-08-02\",\"address\":\"Jl. Contoh alamat\",\"city\":\"Kota\",\"zipCode\":\"123456\",\"occupation\":\"Karyawan\",\"phoneNumber\":\"0211234567\",\"mobilePhone\":\"02112345678\",\"email\":\"contoh@email.com\"},\"insuredBeneficiary\":[{\"name\":\"John Doe Child\",\"relationship\":\"Anak\",\"percentage\":\"25\"},{\"name\":\"John Doe Wife\",\"relationship\":\"Istri\",\"percentage\":\"75\"}],\"insuredDetail\":{\"totalSumInsured\":\"12000200\",\"package\":\"SAMPLEPACKAGE\",\"inseptionDate\":\"2019-08-02\",\"premium\":\"30000\",\"duration\":\"30\"},\"callBackUrl\":\"https:\\/\\/www.yourdomain.com\\/callbackapi\"}"

headers = {
    'apikey': "DdfPbcNdK98uqrhe",
    'signature': "D197D62CD80D4BB6C79B0D0B6F78531B"
    }

conn.request("POST", "/stage-x-api/creditFailure/makeOrder", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
package main

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

func main() {

	url := "http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder"

	payload := strings.NewReader("{\"noRef\":\"CF-30887\",\"customer\":{\"Name\":\"John Doe\",\"idCard\":\"123456789\",\"dateOfBirth\":\"2019-08-02\",\"address\":\"Jl. Contoh alamat\",\"city\":\"Kota\",\"zipCode\":\"123456\",\"occupation\":\"Karyawan\",\"phoneNumber\":\"0211234567\",\"mobilePhone\":\"02112345678\",\"email\":\"contoh@email.com\"},\"insuredBeneficiary\":[{\"name\":\"John Doe Child\",\"relationship\":\"Anak\",\"percentage\":\"25\"},{\"name\":\"John Doe Wife\",\"relationship\":\"Istri\",\"percentage\":\"75\"}],\"insuredDetail\":{\"totalSumInsured\":\"12000200\",\"package\":\"SAMPLEPACKAGE\",\"inseptionDate\":\"2019-08-02\",\"premium\":\"30000\",\"duration\":\"30\"},\"callBackUrl\":\"https:\\/\\/www.yourdomain.com\\/callbackapi\"}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("apikey", "DdfPbcNdK98uqrhe")
	req.Header.Add("signature", "D197D62CD80D4BB6C79B0D0B6F78531B")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
var http = require("http");

var options = {
  "method": "POST",
  "hostname": "micro.fuse.co.id",
  "port": null,
  "path": "/stage-x-api/creditFailure/makeOrder",
  "headers": {
    "apikey": "DdfPbcNdK98uqrhe",
    "signature": "D197D62CD80D4BB6C79B0D0B6F78531B"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  noRef: 'CF-30887',
  customer: {
    Name: 'John Doe',
    idCard: '123456789',
    dateOfBirth: '2019-08-02',
    address: 'Jl. Contoh alamat',
    city: 'Kota',
    zipCode: '123456',
    occupation: 'Karyawan',
    phoneNumber: '0211234567',
    mobilePhone: '02112345678',
    email: 'contoh@email.com'
  },
  insuredBeneficiary: [
    {name: 'John Doe Child', relationship: 'Anak', percentage: '25'},
    {name: 'John Doe Wife', relationship: 'Istri', percentage: '75'}
  ],
  insuredDetail: {
    totalSumInsured: '12000200',
    package: 'SAMPLEPACKAGE',
    inseptionDate: '2019-08-02',
    premium: '30000',
    duration: '30'
  },
  callBackUrl: 'https://www.yourdomain.com/callbackapi'
}));
req.end();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"noRef\":\"CF-30887\",\"customer\":{\"Name\":\"John Doe\",\"idCard\":\"123456789\",\"dateOfBirth\":\"2019-08-02\",\"address\":\"Jl. Contoh alamat\",\"city\":\"Kota\",\"zipCode\":\"123456\",\"occupation\":\"Karyawan\",\"phoneNumber\":\"0211234567\",\"mobilePhone\":\"02112345678\",\"email\":\"contoh@email.com\"},\"insuredBeneficiary\":[{\"name\":\"John Doe Child\",\"relationship\":\"Anak\",\"percentage\":\"25\"},{\"name\":\"John Doe Wife\",\"relationship\":\"Istri\",\"percentage\":\"75\"}],\"insuredDetail\":{\"totalSumInsured\":\"12000200\",\"package\":\"SAMPLEPACKAGE\",\"inseptionDate\":\"2019-08-02\",\"premium\":\"30000\",\"duration\":\"30\"},\"callBackUrl\":\"https:\\/\\/www.yourdomain.com\\/callbackapi\"}");
Request request = new Request.Builder()
  .url("http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder")
  .post(body)
  .addHeader("apikey", "DdfPbcNdK98uqrhe")
  .addHeader("signature", "D197D62CD80D4BB6C79B0D0B6F78531B")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("http://micro.fuse.co.id/stage-x-api/creditFailure/makeOrder");
var request = new RestRequest(Method.POST);
request.AddHeader("apikey", "DdfPbcNdK98uqrhe");
request.AddHeader("signature", "D197D62CD80D4BB6C79B0D0B6F78531B");
request.AddParameter("undefined", "{\"noRef\":\"CF-30887\",\"customer\":{\"Name\":\"John Doe\",\"idCard\":\"123456789\",\"dateOfBirth\":\"2019-08-02\",\"address\":\"Jl. Contoh alamat\",\"city\":\"Kota\",\"zipCode\":\"123456\",\"occupation\":\"Karyawan\",\"phoneNumber\":\"0211234567\",\"mobilePhone\":\"02112345678\",\"email\":\"contoh@email.com\"},\"insuredBeneficiary\":[{\"name\":\"John Doe Child\",\"relationship\":\"Anak\",\"percentage\":\"25\"},{\"name\":\"John Doe Wife\",\"relationship\":\"Istri\",\"percentage\":\"75\"}],\"insuredDetail\":{\"totalSumInsured\":\"12000200\",\"package\":\"SAMPLEPACKAGE\",\"inseptionDate\":\"2019-08-02\",\"premium\":\"30000\",\"duration\":\"30\"},\"callBackUrl\":\"https:\\/\\/www.yourdomain.com\\/callbackapi\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);