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

    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

    Possible values: <= 10 characters

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

    reason RefundReason (string)

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

    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

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.

Loading...