Documentation
  • Welcome!
  • Card (server to server)
    • Overview
      • Authentication
      • Process Flow
      • API Endpoints
      • Testing
    • API Commands
      • 700 – Start Credit Card charge (3DS Enabled)
      • 701 – Request Capture Authorization
      • 702 – Request Cancel Authorization
      • 708 – Check transaction details
      • 709 – Check transaction status
      • 720 – Credit Request
      • 756 – Manual Rebill Request
      • 760 – Request Refund
    • Notifications
      • Notifications
      • 850 – Transaction state Notification
      • 860 – Refund Notification
      • 880 – Dispute Notification
    • Transaction Status Codes
    • 3D Secure Integration
  • APM Checkout (Blik)
    • Overview
      • Process Flow
      • Testing
    • Errors
      • Error object
      • Errors type list
      • Decline errors code list
    • Create a checkout session
    • Retrieve a Checkout Session
    • Webhoook Event Notification
    • Pay a Checkout Session
  • Refund a Checkout Session
  • Retrieve checkout session refund
  • Wallet API
    • Introduction
      • Authentication
      • Metadata
    • Errors
      • Error object
      • Errors type list
      • Decline errors code list
    • Payout
      • Create a payout
      • Retrieve a payout
  • Wallet payment page
    • Payment Page
Powered by GitBook
On this page

Refund a Checkout Session

Arguments

Field
Type
Required
Description

session_id

string

yes

The ID of the Checkout Session

amount

int

no

The amount to refund, in the smallest currency unit (e.g., cents). If omitted, the entire checkout session amount will be refunded.

reason

string

no

The reason of the refund is either “requested_by_customer”, “duplicated”, or “fraudulent”.

metadata

hash

no

A set of key-value pairs attached to a payout object. It can be useful for storing additional information about the payout in a structured format.

POST https://{provided url}/v1/refunds

curl https://{provided url}/v1/refunds \
  -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
  -d amount=1000 \
  -d session_id=AW-kLcRRC5P8U68CYe0kVA \
  -d reason=requested_by_customer \

The above command returns JSON structured like this:

{
	"id": "kLcRRC5P8U68CYe0kVA",
	"amount": 1000,
	"status": "pending",
	"reason": "requested_by_customer",
	"created_at": 1534255857,
	"livemode": false
}
PreviousPay a Checkout SessionNextRetrieve checkout session refund

Last updated 13 days ago