Skip to main content

Refund

POST 

/payment/refund

Enables you to perform a partial or full refund of a captured/settled transaction.

info

Each message sent via API is a request and should include a unique modificationId as request identifier for the purpose of detecting duplicate requests. If you need to retry a request due to a timeout or other exception, send the exact same message using the same modificationId to ensure the message is not processed multiple times.
In retry situations, please make sure to always use the same modificationId as provided in the initial request. SmartPay uses the modificationId to recognize retries and will always provide you this the same result as in the initial request posted with the same modificationId.

Request

Header Parameters

    Content-Type stringrequired

    Must be application/json

    Accept-Language stringrequired

    Must be be en-US

    Origin stringrequired

    The origin of the request

    User-Agent stringrequired

    The client making the request

Body

required

    transactionId stringrequired

    Unique transaction identifier for the original transaction to be refunded.

    modificationId stringrequired

    Your unique reference for the requested modification. This should be unique for each refund request to allow detection of duplicate requests.

    merchantKey stringrequired

    Possible values: <= 36 characters

    Merchant identifier.

    modifiedAmount

    object

    Additional transaction data for partial refunds. Required for partial refunds.

    amount decimal

    Refund transaction amount. Must be greater than 0 and less than or equal to the original transaction amount.

    currencyCode string

    Possible values: >= 3 characters and <= 3 characters

    The 3-letter currency ISO-4217 code.

    description string

    Description of the refund, e.g., the reason for the refund.

    customReferences object

    For external party usage. Please refer to Data Model for more details. Can be used to store additional information about the refund.

Responses

Successful cancellation

Schema

    reconciliationReferenceId stringrequired

    External payment provider unique transaction identifier.
    Within SmartPay, each order on your side is represented by one checkout transactionID. You may use this transactionID to perform the initial checkout, retrieve an overall status or for later modifications, like manual capture or refunds.
    On the payment side, this may lead to multiple financial transactions, e.g., one payment transaction about the captured amount (which will be settled to your account), and later a refund transaction (which will be debited from your account / deducted from your payout).
    The reconciliationReferenceId has been introduced to allow you to keep track of those financial transactions, as it represents the financial transactionID, as you would see it in the payment provider's merchant portal (e.g., our Merchant Panel) or settlement files.

    description stringrequired

    Transaction description, as specified by you in the checkout API request.

    paymentStatus stringrequired

    Possible values: [CREATED, CAPTURED, AUTHORIZATION_PENDING, AUTHORIZATION_COMPLETED, FAILED, CAPTURE_PENDING, CANCELLATION_PENDING, EXPIRED, CANCELLED]

    Current payment status of the initial transaction. Please refer here for more information.

    creationDate stringrequired

    Transaction creation date and time.

    lastStatusDate stringrequired

    Transaction status changing date and time

    partnerReference string

    Transaction identifier provided by the merchant

    transactionOverview

    object

    required

    transactionId stringrequired

    Possible values: <= 36 characters

    The unique identifier of the transaction generated on transaction creation.

    acquirerResponse string

    paymentProviderResponse sent in the Complete Autorize response in case of error.

    amount decimalrequired

    Possible values: Value must match regular expression ^\d{1,18}\.\d{2}$

    Transaction modification amount

    currencyCode stringrequired

    Transaction modification currency. The 3-letter currency ISO-4217 code.

    customReferences

    object

    For external party usage. Please refer to Data Model for more details.

    custom1 string

    Possible values: <= 255 characters

    generic custom reference

    custom2 string

    Possible values: <= 255 characters

    generic custom reference

    custom3 string

    Possible values: <= 255 characters

    generic custom reference

    customerAccountId string

    Unique customer identifier

    deal

    object

    Details of the deal. Used only for 3RI payments (Partial or split shipment and Delayed shipment use cases).

    amount decimal

    Possible values: >= 0.01, Value must match regular expression ^\d{1,18}\.\d{2}$

    The total amount of the deal. The sum of all payments with the same dealReference may not exceed this amount. Used only for Split Shipment flow.

    dealReference string

    Possible values: <= 21 characters

    Deal identifier.

    typeCode string

    Possible values: <= 6 characters, [3RIPSS, 3RIDS]

    Deal type

    mit boolean

    Flag to show if created transaction relates to merchant-initiated transactions.

    paymentMethod string

    Used payment option code. Please refer to the Data Model for more information.
    Payment option CARDS is returned by SmartPay in case the actual card brand has not been selected by the consumer yet or if it could not be determined.

    paymentOrigin string

    Possible values: [HOSTED_PAYMENT_PAGE, PAYMENT_AUTHORIZE_S2S, CHECKOUT, SUBSCRIPTION_MIT, MERCHANT_MIT]

    Displays the origin flag marked upon creation of the transaction.

    targetMerchantAccountReference string

    If provided, the payment is processed in favour of the indicated submerchant account, and the main merchant account number is ignored.

    transactionReference string

    External payment provider reference of the Pre-Payment or Payment Upon Invoice. To be sent each time there is a value present in the data source.

    modification

    object

    required

    Array of all performed transaction modifications.

    creationDate date-time

    Date and time of the modification processing start.

    error

    errorBadRequestExternal

    error string

    Possible values: [gateway_processing, payment_provider_processing]

    indicates at which level of processing the error appeared

    errorDetails

    object

    context object

    Additional error details, as received from the third party

    gatewayDescription string

    Possible values: <= 400 characters

    Error message returned by payment gateway

    paymentProviderDescription string

    Possible values: <= 400 characters

    Error message returned by payment provider

    lastStatusDate date-time

    Date and time of the modification processing completion.

    modificationAmount

    object

    The payment amount to be charged against the payment option.

    amount decimalrequired

    Possible values: >= 0.01, Value must match regular expression ^\d{1,18}\.\d{2}$

    Transaction modification amount

    currencyCode stringrequired

    Possible values: >= 3 characters and <= 3 characters

    Transaction modification currency. The 3-letter currency ISO-4217 code

    description stringrequired

    Possible values: <= 127 characters

    A terse description of the good or service being sold i.e., the reason for the payment

    modificationData

    object

    Additional details of the modification

    cancelId uuid

    SmartPay internal unique identifier for cancel request.

    captureId uuid

    SmartPay internal unique identifier for capture request.

    customReferences

    object

    For external party usage. Please refer to Data Model for more details.

    custom1 string

    Possible values: <= 255 characters

    generic custom reference

    custom2 string

    Possible values: <= 255 characters

    generic custom reference

    custom3 string

    Possible values: <= 255 characters

    generic custom reference

    modificationId stringrequired

    For external party usage.

    paymentSplitResults

    object[]

    Defines destinations for which the payment was split and their results.

  • Array [

  • destinationReference string

    Destination merchant account alias

    error string

    In case of a failed Debit Account or Refund request, contains error description in the following format [ {'responseCode'} ] {responseDescription}.

    splitUniqueReference stringrequired

    Unique reference of the split transaction received in response of Debit Account or Refund.

    status stringrequired

    Possible values: <= 127 characters

    Mapped to responseCode received from Debit Account or Refund. If the code returns 0000, it is a SUCCESS, otherwise it's ERROR.

  • ]

  • programRefundErrorMessage string

    Message in case of error during KC Program refund.

    programRefundId string

    Stores the refund reference in case the merchant to program refund was successful.

    programRefundStatus string

    Reflects the status of the refund from merchant to program level in SmartPay - success/error.

    reconciliationReferenceId string

    External provider unique transaction identifier - unique reference for capture or cancel and refund unique reference for refund.

    refundId uuid

    SmartPay internal unique identifier for refund request.

    type stringrequired

    Possible values: [CAPTURE, CANCELATION, CHARGEBACK, SETTLEMENT, REFUND]

    Type of the performed transaction modification.

    status string

    Actualized transaction or refund status after the performed modification.

    statusHistory

    object[]

  • Array [

  • error string

    Text message explaining the error issue

    modificationAmount

    object

    required

    option string

    SmartPay code of the payment option used.

    storedPaymentOptionReference string

    stored payment option reference

    amount decimalrequired

    Possible values: >= 0.01, Value must match regular expression ^\d{1,18}\.\d{2}$

    Transaction modification amount

    currencyCode stringrequired

    Possible values: >= 3 characters and <= 3 characters

    Transaction modification currency. The 3-letter currency ISO-4217 code

    description stringrequired

    Possible values: <= 127 characters

    A terse description of the good or service being sold i.e., the reason for the payment

    status string

    Status of the transaction modification or initial payment transaction.

    statusDate date-timerequired

    Modification transaction status changing date and time.

  • ]

Loading...