Skip to content
Console
Menu

Getting Started

Authentication

KV Store

Refund a checkout session

Refund all or part of a paid one-time checkout.

Refund all or part of a paid one-time checkout.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/checkout_sessions/checkout-session:refund
  • Scope billing:write
  • Effect write — a successful call changes state.
  • Collection checkout_sessions

#Request

FieldTypeWhat it is
namestringThe Money checkout resource to refund. Required.
amount_minorint64Optional partial amount in minor units; empty refunds the remaining amount.
reasonstringOptional processor refund reason.
metadatamap<string, string>Caller metadata, such as the app's return and order ids. At most 20 keys.

#Response

FieldTypeWhat it is
refundRefundThe refund receipt, read back from the processor after creation. Output only.

#Refund

FieldTypeWhat it is
idstringThe processor's refund id. Output only.
checkout_sessionstringThe Money checkout resource this refund belongs to. Output only.
payment_intentstringThe processor payment intent the refund applies to. Output only.
amount_minorint64Amount refunded in minor units. Output only.
currency_codestringISO 4217 currency code. Output only.
statusstringThe processor's refund status. Output only.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/checkout_sessions/checkout-session:refund" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'