Skip to main content

Request to cancel a charge

POST 

/charge/:merchantChargeId/refund

Cancel all or part of a charge

Request​

Path Parameters

    merchantChargeId stringrequired

    Possible values: >= 6 characters and <= 36 characters, Value must match regular expression ^([a-zA-Z0-9-]+$)$

    Unique external identifier for the charge, defined by the merchant's system.

    Example: 8086bfd7-6241-4f76-81d8-70460533ce74

Header Parameters

    caller-origin string

    Include the 'caller-origin' property as a string in the header of REST requests only if the application is an e-commerce platform, otherwise, don't include it.

Body

    amount int32

    Possible values: >= 1

    Payment amount in cents

Responses​

OK

Schema

    merchantChargeId string
    id string
    chargeStatus string

    Possible values: [CANCELED, DENIED, ERROR, PAID, PARTIAL, PRE_AUTHORIZED, REFUNDED, CHARGEBACK]

    amount int32
    originalAmount int32
    refundedAmount int32

    transactions

    object[]

  • Array [

  • paymentType string

    Possible values: [CREDIT, WALLET, PIX]

    Enum [ CREDIT(Credit card), WALLET(QRCode PicPay), PIX(Pix)]

    amount int32
    originalAmount int32
    refundedAmount int32
    transactionStatus string

    Possible values: [CANCELED, CHARGEBACK, DENIED, ERROR, EXPIRED, PAID, PARTIALLY_REFUNDED, PENDING, PRE_AUTHORIZED, REFUNDED]

    createdAt date-time

    ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it was created on 01/05/2022 at 16:00 in the -03:00 time zone)

    updatedAt date-time

    ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it was updated on 01/05/2022 at 16:00 in the -03:00 time zone)

    transactionId string
    softDescriptor string
    errorMessage string

    credit

    object

    nsu string
    cardNumber string
    authorizationCode string
    authorizationResponseCode string
    brand string

    Possible values: [VISA, MASTERCARD, AMEX, ELO, HIPERCARD]

    cardholderName string

    Possible values: non-empty, Value must match regular expression ^[\p{L} ]+$

    cardholderDocument String

    Possible values: Value must match regular expression ^\d{9}$|^\d{11}$|^[A-Z0-9]{9}$

    expirationMonth int32
    expirationYear int32
    installmentNumber int32
    installmentType string

    Possible values: [NONE, MERCHANT]

    Default value: NONE

    Enum [ NONE(Spot transaction), MERCHANT(Transaction in installments by the merchant, i.e. without interest)]

    wallet

    object

    Wallet response

    qrCode string
    qrCodeBase64 string
    expiresAt date-time

    ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it will expire on 01/05/2022 at 16:00 in the -03:00 time zone)

  • ]

Loading...