Sessions
Pagar uma sessão
Visão Geral
Tokens
Charges
Sessions
Customers
Merchants
Vendors
Sellers
Webhooks
Reports
Sessions
Pagar uma sessão
POST
/
v1
/
sessions
/
{id}
/
charge
curl --request POST \
--url https://api.malga.io/v1/sessions/{id}/charge \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '{
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"card": {
"cardNumber": "5261424250184574",
"cardCvv": "321",
"cardExpirationDate": "06/2028",
"cardHolderName": "JOAO DA SILVA"
}
}
}'
{
"id": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"merchantId": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"description": "Descrição longa da cobrança",
"orderId": "32c68ff7-902c-408b-b464-cf487c7cda97",
"createdAt": "2012-06-30 23:59:59 +0000",
"amount": 150,
"originalAmount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"status": "pending",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"cardId": "148d5db0-f1c3-439f-902d-f1f268086e1d"
},
"transactionRequests": [
{
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"idempotencyKey": "fafe857b176e45d6b12e32fcaf228996",
"providerId": "2c3b57d8-ee43-4b19-bc8a-949a88c51df1",
"providerType": "STRIPE",
"transactionId": "ch_3JYE7MHjGFBGEeiP0lfTD3Ob",
"amount": 1500,
"authorizationNsu": "1cc8391c-f0d5-4b7a-9fcf-653cea26be13",
"requestStatus": "success",
"requestType": "authorization",
"responseTs": "2633ms",
"createdAt": "2021-08-12T16:08:39.536Z",
"updatedAt": "2021-08-12T16:08:42.212Z",
"providerAuthorization": {
"networkAuthorizationCode": "00",
"networkResponseCode": ""
}
}
]
}
Path Parameters
Identificação da sessão a ser paga
Body
application/json
Response
201 - application/json
Created
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.malga.io/v1/sessions/{id}/charge \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '{
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"card": {
"cardNumber": "5261424250184574",
"cardCvv": "321",
"cardExpirationDate": "06/2028",
"cardHolderName": "JOAO DA SILVA"
}
}
}'
{
"id": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"merchantId": "148d5db0-f1c3-439f-902d-f1f268086e1d",
"description": "Descrição longa da cobrança",
"orderId": "32c68ff7-902c-408b-b464-cf487c7cda97",
"createdAt": "2012-06-30 23:59:59 +0000",
"amount": 150,
"originalAmount": 150,
"currency": "BRL",
"statementDescriptor": "LOJA JOAO",
"status": "pending",
"paymentMethod": {
"paymentType": "credit",
"installments": 1
},
"paymentSource": {
"sourceType": "card",
"cardId": "148d5db0-f1c3-439f-902d-f1f268086e1d"
},
"transactionRequests": [
{
"id": "78601913-a176-4d71-b7e8-abb6fc49a340",
"idempotencyKey": "fafe857b176e45d6b12e32fcaf228996",
"providerId": "2c3b57d8-ee43-4b19-bc8a-949a88c51df1",
"providerType": "STRIPE",
"transactionId": "ch_3JYE7MHjGFBGEeiP0lfTD3Ob",
"amount": 1500,
"authorizationNsu": "1cc8391c-f0d5-4b7a-9fcf-653cea26be13",
"requestStatus": "success",
"requestType": "authorization",
"responseTs": "2633ms",
"createdAt": "2021-08-12T16:08:39.536Z",
"updatedAt": "2021-08-12T16:08:42.212Z",
"providerAuthorization": {
"networkAuthorizationCode": "00",
"networkResponseCode": ""
}
}
]
}