curl --request POST \
--url https://api.malga.io/v1/charges \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"appInfo": {
"platform": {
"integrator": "malga",
"name": "pluging-vtex-ppp",
"version": "1.12"
},
"device": {
"name": "iOS",
"version": "10.12"
},
"system": {
"name": "VTEX",
"version": "13.12"
}
},
"merchantId": "38f43103-24b3-4349-9358-25d7c3975038",
"amount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"orderId": "df8d2258-bf33-44e7-97d1-c4b9d0bedf7f",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"card": {
"cardNumber": "5261424250184574",
"cardCvv": "321",
"cardExpirationDate": "06/2028",
"cardHolderName": "JOAO DA SILVA"
}
}
}
'{
"id": "a1d455eb-dafe-4a5c-b882-a5775422f850",
"clientId": "d353deef-dacb-40a0-8cab-931ff773f274",
"createdAt": "2012-06-30 23:59:59 +0000",
"amount": 150,
"currency": "BRL",
"orderId": "df8d2258-bf33-44e7-97d1-c4b9d0bedf7f",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"isDispute": false,
"status": "pre_authorized",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"cardId": "a1d455eb-dafe-4a5c-b882-a5775422f850"
},
"transactionRequests": [
{
"id": "2405d3ad-886e-4541-bd2e-8489e6f54dd4",
"idempotencyKey": "4ce7b3f5eb66499c96922fae84a8bf9e",
"providerId": "3022c70f-650f-4ef6-86e3-3b876df8948a",
"providerType": "STRIPE",
"transactionId": "ch_3JYE7MHjGFBGEeiP0lfTD3Ob",
"amount": 1500,
"authorizationNsu": "83abd7e6-2223-4773-b1ef-aee98be1ee99",
"requestStatus": "success",
"requestType": "authorization",
"responseTs": "2633ms",
"createdAt": "2021-08-12T16:08:39.536Z",
"updatedAt": "2021-08-12T16:08:42.212Z",
"providerAuthorization": {
"networkAuthorizationCode": "00",
"networkResponseCode": ""
}
}
],
"appInfo": {
"platform": {
"integrator": "malga",
"name": "pluging-vtex-ppp",
"version": "1.12"
},
"device": {
"name": "iOS",
"version": "10.12"
},
"system": {
"name": "VTEX",
"version": "13.12"
}
}
}Charges
Realizar nova cobrança
Crie uma nova cobrança na API da Malga via POST /v1/charges, com suporte a cartão de crédito, Pix, boleto, voucher e demais meios de pagamento.
POST
/
v1
/
charges
curl --request POST \
--url https://api.malga.io/v1/charges \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"appInfo": {
"platform": {
"integrator": "malga",
"name": "pluging-vtex-ppp",
"version": "1.12"
},
"device": {
"name": "iOS",
"version": "10.12"
},
"system": {
"name": "VTEX",
"version": "13.12"
}
},
"merchantId": "38f43103-24b3-4349-9358-25d7c3975038",
"amount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"orderId": "df8d2258-bf33-44e7-97d1-c4b9d0bedf7f",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"card": {
"cardNumber": "5261424250184574",
"cardCvv": "321",
"cardExpirationDate": "06/2028",
"cardHolderName": "JOAO DA SILVA"
}
}
}
'{
"id": "a1d455eb-dafe-4a5c-b882-a5775422f850",
"clientId": "d353deef-dacb-40a0-8cab-931ff773f274",
"createdAt": "2012-06-30 23:59:59 +0000",
"amount": 150,
"currency": "BRL",
"orderId": "df8d2258-bf33-44e7-97d1-c4b9d0bedf7f",
"statementDescriptor": "LOJA JOAO",
"description": "Descrição longa da cobrança",
"capture": false,
"isDispute": false,
"status": "pre_authorized",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"cardId": "a1d455eb-dafe-4a5c-b882-a5775422f850"
},
"transactionRequests": [
{
"id": "2405d3ad-886e-4541-bd2e-8489e6f54dd4",
"idempotencyKey": "4ce7b3f5eb66499c96922fae84a8bf9e",
"providerId": "3022c70f-650f-4ef6-86e3-3b876df8948a",
"providerType": "STRIPE",
"transactionId": "ch_3JYE7MHjGFBGEeiP0lfTD3Ob",
"amount": 1500,
"authorizationNsu": "83abd7e6-2223-4773-b1ef-aee98be1ee99",
"requestStatus": "success",
"requestType": "authorization",
"responseTs": "2633ms",
"createdAt": "2021-08-12T16:08:39.536Z",
"updatedAt": "2021-08-12T16:08:42.212Z",
"providerAuthorization": {
"networkAuthorizationCode": "00",
"networkResponseCode": ""
}
}
],
"appInfo": {
"platform": {
"integrator": "malga",
"name": "pluging-vtex-ppp",
"version": "1.12"
},
"device": {
"name": "iOS",
"version": "10.12"
},
"system": {
"name": "VTEX",
"version": "13.12"
}
}
}Body
application/json
Response
Created
Was this page helpful?