curl --location --request POST 'https://pay.deficopay.com/api/v1/deposits/fiat/initiate' \
--header 'X-API-Signature: {{x_api_signature}}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 1152.99,
"currency": "BRL",
"payment_method_code": "pix",
"merchant_transaction_id": "4adb427f-b062-4705-8d95-00c57916cd3a",
"order": {
"id": "339f8edb-cd94-4ea7-a6b6-d7621f57cf92",
"description": "Test"
},
"merchant_notification_url":"https://webhook.site/68c3b3fc-d5d2-4c83-bfef-517cb8584723",
"customer": {
"id": "2ce5f768-1256-40a9-b0ab-7eba5dfa0101",
"deficopay_customer_id": "f7e3d1c3-bf87-48ad-9c55-5e96076fa023",
"email": "test2@gmail.com",
"phoneNumber": "+380661234567",
"firstName": "Michal",
"lastName": "Lebowski",
"documentType": "CPF",
"documentNumber": "12345678909",
"address": {
"addressLine": "Victory street",
"addressNumber": "7B",
"addressAdditional": "Apt 3",
"addressNeighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"postalCode": "01001",
"country": "BR"
}
},
"sessionContext": {
"ip": "34.54.84.176",
"languageCode": "en",
"browserParameters": {
"accept": "text/html",
"language": "en-US",
"userAgent": "Mozilla/5.0",
"javaEnabled": true,
"javascriptEnabled": true,
"screenHeight": "1080",
"screenWidth": "1920",
"colorDepth": "12",
"tz": "-180"
}
},
"returnUrls": {
"default": "https://webhook.site/68c3b3fc-d5d2-4c83-bfef-517cb8584723?return=default",
"success": "https://webhook.site/68c3b3fc-d5d2-4c83-bfef-517cb8584723?return=success",
"failure": "https://webhook.site/68c3b3fc-d5d2-4c83-bfef-517cb8584723?return=failure"
}
}'{
"type": "object",
"properties": {
"trace_id": {
"type": "string",
"format": "uuid",
"description": "Trace ID of the request, useful for debugging"
},
"data": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
},
"data": {
"type": "object",
"properties": {
"order": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Merchant order ID"
},
"description": {
"type": "string",
"description": "Order description"
}
},
"required": ["id", "description"]
},
"merchant_transaction_id": {
"type": "string",
"format": "uuid",
"description": "Merchant-provided transaction ID"
},
"deficopay_transaction_id": {
"type": "string",
"format": "uuid",
"description": "Generated transaction ID on Deficopay side"
},
"status": {
"type": "string",
"enum": ["pending", "completed", "cancelled", "failed"],
"description": "Current transaction status"
},
"initial_amount": {
"type": "string",
"example": "30.00 R$",
"description": "Amount with currency"
},
"initial_currency": {
"type": "string",
"example": "BRL"
},
"created_at": {
"type": "string",
"format": "date-time",
"example": "2025-05-14T11:37:02.000000Z"
},
"pix_qr_code": {
"type": "string",
"description": "PIX QR code if applicable",
"example": "00020126850014br.gov.bcb.pix2563..."
}
},
"required": [
"order",
"merchant_transaction_id",
"deficopay_transaction_id",
"status",
"initial_amount",
"initial_currency",
"created_at"
]
}
},
"required": ["success", "data"]
}
},
"required": ["trace_id", "data"]
}