$items = [
[
"name" => "Product 1",
"amount" => 1,
"value" => 1000
],
[
"name" => "Product 2",
"amount" => 2,
"value" => 2000
]
];
$shippings = [
[
"name" => "Shipping to City",
"value" => 1200
]
];
$metadata = [
"notification_url" => "https://your-domain.com.br/notification/"
];
$customer = [
"name" => "Gorbadoc Oldbuck",
"cpf" => "94271564656",
"phone_number" => "5144916523",
"email" => "[email protected]",
"birth" => "1990-01-15"
];
$billingAddress = [
"street" => "Av JK",
"number" => 909,
"neighborhood" => "Bauxita",
"zipcode" => "35400000",
"city" => "Ouro Preto",
"state" => "MG"
];
$discount = [
"type" => "currency",
"value" => 599
];
$credit_card = [
"customer" => $customer,
"installments" => 1,
"discount" => $discount,
"billing_address" => $billingAddress,
"payment_token" => $paymentToken,
"message" => "This is a space\n of up to 80 characters\n to tell\n your client something"
];
$payment = [
"credit_card" => $credit_card
];
$body = [
"items" => $items,
"shippings" => $shippings,
"metadata" => $metadata,
"payment" => $payment
];
Termos mais procurados: