curl --location 'https://api.malga.io/v1/charges' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <client-id>' \
--data-raw '{
"merchantId": "<merchant-id>",
"amount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"orderId": "<order-id>",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"card": {
"cardNumber": "5261424250184574",
"cardCvv": "321",
"cardExpirationDate": "06/2028",
"cardHolderName": "JOAO DA SILVA"
}
},
"fraudAnalysis": {
"mfa": {
"smsOtpUsed": true,
"emailOtpUsed": true
},
"customer": {
"name": "John Doe",
"identity": "12345678909",
"identityType": "CPF",
"secondaryIdentity": "11222333000181",
"secondaryIdentityType": "CNPJ",
"email": "[email protected]",
"birthdate": "1990-01-01",
"registrationDate": "2023-01-01 10:00:00",
"phone": "+5511999999999",
"maritalStatus":"Solteiro",
"education":"Ensino Superior Completo",
"billingAddress": {
"street": "Rua A",
"number": "123",
"complement": "Apto 45",
"zipCode": "01000-000",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"district": "Centro",
"reference": "Próximo à praça"
},
"deliveryAddress": {
"street": "Rua B",
"number": "456",
"complement": "Casa",
"zipCode": "02000-000",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"district": "Vila X",
"reference": "Portão azul"
},
"browser": {
"browserFingerprint": "fp-abc-123",
"cookiesAccepted": true,
"email": "[email protected]",
"hostName": "example.com",
"ipAddress": "203.0.113.10",
"type": "Chrome"
},
"gender": "male"
},
"cart": {
"items": [
{
"name": "Produto 1",
"quantity": 1,
"sku": "SKU-001",
"unitPrice": 1000,
"risk": "Low",
"description": "Descrição do produto",
"categoryId": "123",
"locality": "SP",
"date": "2025-09-10 12:00:00",
"type": 1,
"genre": "xpto"
}
],
"isGift": true,
"giftMessage": "Parabéns!"
},
"device": {
"id": "device-123",
"os": {
"type": "iOS",
"version": "16.5"
},
"model": "iPhone 14",
"resolution": "1170x2532",
"ramCapacity": 4096,
"diskCapacity": 128000,
"freeDiskSpace": 64000,
"vendors": [
{
"name": "carrier",
"value": "Vivo"
}
],
"vendorAttributes": {
"flash": true,
"phoneCalls": true,
"sendSms": true,
"videoCamera": true,
"cpuCount": 8,
"simulator": false,
"retinaDisplay": true,
"frontCamera": true,
"camera": true,
"language": "pt-BR",
"idiom": "pt-BR",
"platform": "mobile",
"name": "Apple",
"family": "iPhone",
"model": "14"
}
},
"airline": {
"passengers": [
{
"name": "John Doe",
"companyMileCard": "LATAM",
"mileCard": "MILE-12345",
"identityType": "CPF",
"identityNumber": "12345678909",
"gender": "male",
"birthdate": "1990-01-01",
"cpf": "12345678909"
}
],
"connections": [
{
"company": "LATAM",
"identificationNumber": 1234,
"date": "2025-09-15 10:00:00",
"seatClass": "Economy",
"origin": "GRU",
"destination": "GIG",
"boarding": "2025-09-15 09:30:00",
"arriving": "2025-09-15 11:30:00",
"fareClass": "Y"
}
],
"reservation": "2025-09-01"
},
"orderOrigin": "web",
"operationalSystem": "iOS 16.5",
"marketplaceType": "b2c",
"purchaseInformation": {
"lastDateInsertedMail": "2025-06-01",
"lastDateChangePassword": "2025-07-01",
"lastDateChangePhone": "2025-06-15",
"lastDateChangeMobilePhone": "2025-06-16",
"lastDateInsertedAddress": "2025-05-20",
"purchaseLogged": true,
"email": "[email protected]",
"login": "userlogin"
},
"socialNetwork": {
"optInCompreConfie": true,
"socialNetworkType": "facebook",
"authenticationToken": "token-abc"
},
"giftList": {
"type": "wedding_list",
"id": "list-123"
},
"hotels": [
{
"name": "Hotel ABC",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"reservationDate": "2025-10-01",
"reserveExpirationDate": "2025-09-20",
"checkInDate": "2025-10-05",
"checkOutDate": "2025-10-10"
}
],
"country": "BR",
"sessionId": "session-123"
}
}'