Sandbox
Alterar status da cobrança
Tokenization SDK
API SDKs
- Introdução
- Getting started
- Documentação
- Introdução
- Auth
- Charges
- Cards
- Customers
- Sandbox
- Sellers
- Sessions
- Webhooks
- Exemplos
UI SDKs
- Introdução
- Checkout
- Checkout Full
Sandbox
Alterar status da cobrança
API SDK Documentação - Sandbox
Altere os status das suas cobranças em sandbox para simular cada cenário da sua integração.
Método
import { Malga } from 'malga'
const malga = new Malga({
apiKey: '17a64c8f-a387-4682-bdd8-d280493715e0',
clientId: 'd1d2b51a-0446-432a-b055-034518c2660e',
options: { sandbox: true }
})
await malga.sandbox.changeChargeStatus(
'e09ef791-1aaa-4b11-8173-698f2689a04d',
{ status: 'authorized' }
)
{
id: 'e09ef791-1aaa-4b11-8173-698f2689a04d',
clientId: 'd1d2b51a-0446-432a-b055-034518c2660e',
merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1',
description: null,
orderId: null,
providerReferenceKey: null,
createdAt: '2023-12-31T18:19:44.993Z',
amount: 100,
originalAmount: 100,
currency: 'BRL',
statementDescriptor: null,
capture: true,
isDispute: false,
status: 'authorized',
paymentMethod: {
installments: 1,
paymentType: 'credit',
},
paymentSource: {
sourceType: 'card',
cardId: '3db399d3-44c1-49fe-ab26-6fb00c161337',
},
transactionRequests: [
{
id: '5da7d8d4-55e9-4268-bfff-a5992a0b1d43',
createdAt: '2023-12-31T19:19:45.013Z',
updatedAt: '2023-12-31T19:19:45.044Z',
idempotencyKey: '4bd7cd89-ef1d-44aa-a35d-b1eabafc86a6',
providerId: '694f7eee-2966-4825-a847-65d070cbdece',
providerType: 'SANDBOX',
transactionId: '18242a4d-dd35-475f-b79b-5cbe8f9d1fea',
amount: 100,
authorizationCode: '123123',
authorizationNsu: '123123',
requestStatus: 'success',
requestType: 'authorization',
responseTs: '11ms',
providerAuthorization: {
networkAuthorizationCode: '123123',
networkResponseCode: '123123',
}
},
{
id: 'a6cc6bda-3f6d-4277-8ea2-e4bbd9166f16',
createdAt: '2023-12-31T18:19:45.013Z',
updatedAt: '2023-12-31T18:19:45.044Z',
idempotencyKey: '3b42ede3-15a8-4d81-b6e9-54c5762776c6',
providerId: '694f7eee-2966-4825-a847-65d070cbdece',
providerType: 'SANDBOX',
transactionId: '18242a4d-dd35-475f-b79b-5cbe8f9d1fea',
amount: 100,
authorizationCode: '123123',
authorizationNsu: '123123',
requestStatus: 'success',
requestType: 'pre_authorization',
responseTs: '11ms',
providerAuthorization: {
networkAuthorizationCode: '123123',
networkResponseCode: '123123',
}
}
],
appInfo: null
}
Parâmetros
Lista de todos os parâmetros suportados pelo método.
id
uuid
requiredID da Cobrança
payload
object
requiredSegundo parâmetro
status
string
requiredDefine o novo status da cobrança
Was this page helpful?
On this page