Skip to main content

Create a refund

POST 

/v3/payments/:paymentId/refunds

To create a payment refund, you use a refund resource.

Request

Path Parameters

    paymentId stringrequired

    Possible values: >= 16 characters and <= 16 characters, Value must match regular expression ^([a-zA-Z0-9]{4}(-[a-zA-Z0-9]{3}){3})$

    Unique ID of a payment generated by Paynow

Header Parameters

    Api-Key stringrequired

    Unique key used to authenticate API requests.

    Signature stringrequired

    The Signature header is used to ensure the request’s body integrity and to confirm that its content has not changed.

    Idempotency-Key stringrequired

    Possible values: <= 45 characters

    A unique identifier used to ensure idempotent behavior. If the business application request fails or you receive a timeout you can retry the request with the same Idempotency-Key to guarantee that only one business object is created.

    User-Agent string

    The User-Agent request header contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent.

    Accept stringrequired

    The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Can be set to */*.

    Content-Type stringrequired

    The Content-Type entity header is used to indicate the media type of the resource.

Body

required

Request body for refund request

    amount int64required

    A positive integer in the smallest currency unit. Currency of the refund amount is the same as payment currency.

    Possible values: <= 10 characters

    reason RefundReason (string)

    Refund reason

    • RMA- complaint
    • REFUND_BEFORE_14 - refund before 14 days from purchase
    • REFUND_AFTER_14 - refund after 14 days from purchase
    • OTHER - other reason

    Possible values: [RMA, REFUND_BEFORE_14, REFUND_AFTER_14, OTHER]

    transfers

    object[]

    Sellers transfer list used only for Marketplace refunds

  • Array [

  • sellerId stringrequired

    Seller ID

    Possible values: <= 15 characters

    grossAmount int64required

    Transfer gross amount in the smallest currency unit. This amount minus feeAmount will be charged from seller balance.

    Possible values: <= 10 characters, <= 100000000

    feeAmount int64required

    Transfer fee amount in the smallest currency unit. This amount will be charged from marketplace balance

    Possible values: <= 10 characters, <= 100000000

  • ]

Responses

Created

Schema

    refundId refundIdrequired

    Unique ID of a refund generated by Paynow

    status stringrequired

    Current status of the refund. More information you can find here.

    Possible values: [NEW, PENDING, SUCCESSFUL]

    payerAmount int64

    The total amount returned to the payer for this refund. Represents the smallest unit of the order currency (grosz in the case of PLN). This field will only be included if a voucher reservation was used in the payment related to this refund.

    Possible values: <= 10 characters

    voucherAmount int64

    The total amount returned to the voucher card used for given payment related to this refund. Represents the smallest unit of the order currency (grosz in the case of PLN). This field will only be included if a voucher reservation was used in the payment related to this refund.

    Possible values: <= 10 characters

Loading...