Refunds
Return a payment to its payer, in whole or in parts, in its own asset, to an address they give.
On this page
A refund pays a payment's own asset back to its payer, from your available balance. You can refund
a finished payment, or a partially paid one once it has closed, in one go or in parts, up to what it
credited (amount_credited). Nowgate keeps its payment fee, so a full refund draws the whole
credited amount from your balance. Like a payout, a refund is reserved as soon as it
is created, and a refund that is canceled, or that fails, returns it.
The network fee comes out of the refund by default (fee_paid_by: "payee"). Send
fee_paid_by: "merchant" to pay it yourself.
If you know the payer's address, send it with the refund. Otherwise the refund waits in
awaiting_address, and its refund_url opens a page where the payer gives their address, once.
Either way the address becomes one of your destinations and waits like any new one before it is
paid: 24 hours in live, 5 minutes in the sandbox.
The payment keeps account of its refunds: refund_pending is what refunds under way will return,
and amount_refunded what finished ones did. Once that reaches amount_credited, the payment is
refunded and payment.refunded is sent.
Creating and canceling refunds needs a key with the payouts scope.
Refund a payment#
/v1/payments/{id}/refundsAPI key, payouts scopeReturns a payment's asset to its payer, from your available balance: by default all it credited (before Nowgate's fee, which Nowgate keeps) less its other refunds. The network fee comes out of the refund unless you pay it (fee_paid_by: merchant). Without the payer's address, the refund waits in awaiting_address with a refund_url you send them, where they give it once. Their address then waits like any new destination before it is paid: 24 hours in live.
await nowgate.refunds.create(id, { … });client.refunds.create(id, …)$nowgate->refunds->create($id, […]);Headers
Idempotency-KeystringrequiredA unique key for this request, such as a UUID: 1-255 visible ASCII characters, without spaces. Retrying with the same key and the same request replays the original response (for at least 24 hours); the same key with a different request is refused with
422 idempotency_key_reused. Failed requests are not stored, so they can be retried with the same key.1 to 255 characters. Pattern:
^[!-~]+$.
Path parameters
idPaymentID (string)required
Body
amountAmount (string)By default, all the payment can still return.
addressstringThe payer's address, when you have it; without it they give it on the refund's page.
1 to 128 characters.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostring1 to 28 characters.
fee_paid_byPayoutFeePaidBy (string)payeeby default: the network fee comes out of the refund.One of:
merchant,payee.external_idstring1 to 100 characters.
webhook_urlstringmetadatamap of string
Responses
201 The refund, reserved from your balance.
The Refund object
idRefundID (string)requiredobject"refund"requiredpaymentPaymentID (string)requiredstatusPayoutStatus (string)requiredOne of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
amountAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_sentAmount (string)requiredWhat the payer gets.
network_feeAmount (string)requiredThe network fee, quoted in this asset when the refund was created.
payout_feeAmount (string)requiredNowgate's payout fee.
amount_debitedAmount (string)requiredWhat your balance pays for it.
fee_paid_byPayoutFeePaidBy (string)requiredWho pays the network fee:
merchanton top of the amount (the destination gets the whole amount), orpayeeout of it.One of:
merchant,payee.destinationPayoutDestination (object)The payer's address, once given.
12 fields of PayoutDestination
idPayoutDestinationID (string)requiredobject"payout_destination"requiredstatusstringrequiredOne of:
pending,active,disabled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
addressstringrequiredThe address in its canonical form.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostringlabelstringkindstringrequiredrefundwhen a payer gave it for a refund.One of:
payout,refund.active_atTimestamp (string (date-time))requiredWhen it became, or will become, payable.
created_atTimestamp (string (date-time))requireddisabled_atTimestamp (string (date-time))
refund_urlstringWhile it is awaiting_address, the page where the payer gives their address. Send it to them.
waiting_reasonstringPresent on a queued refund that is waiting for something on Nowgate's side.
One of:
liquidity,gas_funding,fees,signer_limit.failure_reasonstringPresent on a failed refund.
external_idstringapproved_atTimestamp (string (date-time))transactionstringThe transaction that carries it
metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredclosed_atTimestamp (string (date-time))versioninteger (int64)requiredIncreases with every change; use it to ignore stale webhook events.
4xx, 5xx An error, as problem details.
Retrieve a refund#
/v1/refunds/{id}API key, read scopeawait nowgate.refunds.retrieve(id);client.refunds.retrieve(id)$nowgate->refunds->retrieve($id);Path parameters
idRefundID (string)required
Responses
200 The refund.
The Refund object
idRefundID (string)requiredobject"refund"requiredpaymentPaymentID (string)requiredstatusPayoutStatus (string)requiredOne of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
amountAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_sentAmount (string)requiredWhat the payer gets.
network_feeAmount (string)requiredThe network fee, quoted in this asset when the refund was created.
payout_feeAmount (string)requiredNowgate's payout fee.
amount_debitedAmount (string)requiredWhat your balance pays for it.
fee_paid_byPayoutFeePaidBy (string)requiredWho pays the network fee:
merchanton top of the amount (the destination gets the whole amount), orpayeeout of it.One of:
merchant,payee.destinationPayoutDestination (object)The payer's address, once given.
12 fields of PayoutDestination
idPayoutDestinationID (string)requiredobject"payout_destination"requiredstatusstringrequiredOne of:
pending,active,disabled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
addressstringrequiredThe address in its canonical form.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostringlabelstringkindstringrequiredrefundwhen a payer gave it for a refund.One of:
payout,refund.active_atTimestamp (string (date-time))requiredWhen it became, or will become, payable.
created_atTimestamp (string (date-time))requireddisabled_atTimestamp (string (date-time))
refund_urlstringWhile it is awaiting_address, the page where the payer gives their address. Send it to them.
waiting_reasonstringPresent on a queued refund that is waiting for something on Nowgate's side.
One of:
liquidity,gas_funding,fees,signer_limit.failure_reasonstringPresent on a failed refund.
external_idstringapproved_atTimestamp (string (date-time))transactionstringThe transaction that carries it
metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredclosed_atTimestamp (string (date-time))versioninteger (int64)requiredIncreases with every change; use it to ignore stale webhook events.
4xx, 5xx An error, as problem details.
List refunds#
/v1/refundsAPI key, read scopeawait nowgate.refunds.list({ … });
for await (const item of nowgate.refunds.listAll({ … })) { … }client.refunds.list(…)
for item in client.refunds.list_all(…): …$nowgate->refunds->list([…]);
foreach ($nowgate->refunds->listAll([…]) as $item) { … }Query parameters
limitintegerFrom 1 to 100. Default:
20.starting_afterRefundID (string)Return the page after (older than) this ID.
ending_beforeRefundID (string)Return the page before (newer than) this ID.
paymentPaymentID (string)Only this payment's refunds.
statusPayoutStatus (string)One of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.
Responses
200 A page of refunds, newest first.
The RefundList object
object"list"requireddataarray of Refund (object)required24 fields of Refund
idRefundID (string)requiredobject"refund"requiredpaymentPaymentID (string)requiredstatusPayoutStatus (string)requiredOne of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
amountAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_sentAmount (string)requiredWhat the payer gets.
network_feeAmount (string)requiredThe network fee, quoted in this asset when the refund was created.
payout_feeAmount (string)requiredNowgate's payout fee.
amount_debitedAmount (string)requiredWhat your balance pays for it.
fee_paid_byPayoutFeePaidBy (string)requiredWho pays the network fee:
merchanton top of the amount (the destination gets the whole amount), orpayeeout of it.One of:
merchant,payee.destinationPayoutDestination (object)The payer's address, once given.
12 fields of PayoutDestination
idPayoutDestinationID (string)requiredobject"payout_destination"requiredstatusstringrequiredOne of:
pending,active,disabled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
addressstringrequiredThe address in its canonical form.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostringlabelstringkindstringrequiredrefundwhen a payer gave it for a refund.One of:
payout,refund.active_atTimestamp (string (date-time))requiredWhen it became, or will become, payable.
created_atTimestamp (string (date-time))requireddisabled_atTimestamp (string (date-time))
refund_urlstringWhile it is awaiting_address, the page where the payer gives their address. Send it to them.
waiting_reasonstringPresent on a queued refund that is waiting for something on Nowgate's side.
One of:
liquidity,gas_funding,fees,signer_limit.failure_reasonstringPresent on a failed refund.
external_idstringapproved_atTimestamp (string (date-time))transactionstringThe transaction that carries it
metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredclosed_atTimestamp (string (date-time))versioninteger (int64)requiredIncreases with every change; use it to ignore stale webhook events.
has_morebooleanrequired
4xx, 5xx An error, as problem details.
Cancel a refund#
/v1/refunds/{id}/cancelAPI key, payouts scopeCancels a refund that hasn't been signed yet, from any status before sending, and returns its amount to your available balance.
await nowgate.refunds.cancel(id);client.refunds.cancel(id)$nowgate->refunds->cancel($id);Headers
Idempotency-KeystringrequiredA unique key for this request, such as a UUID: 1-255 visible ASCII characters, without spaces. Retrying with the same key and the same request replays the original response (for at least 24 hours); the same key with a different request is refused with
422 idempotency_key_reused. Failed requests are not stored, so they can be retried with the same key.1 to 255 characters. Pattern:
^[!-~]+$.
Path parameters
idRefundID (string)required
Responses
200 The canceled refund.
The Refund object
idRefundID (string)requiredobject"refund"requiredpaymentPaymentID (string)requiredstatusPayoutStatus (string)requiredOne of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
amountAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_sentAmount (string)requiredWhat the payer gets.
network_feeAmount (string)requiredThe network fee, quoted in this asset when the refund was created.
payout_feeAmount (string)requiredNowgate's payout fee.
amount_debitedAmount (string)requiredWhat your balance pays for it.
fee_paid_byPayoutFeePaidBy (string)requiredWho pays the network fee:
merchanton top of the amount (the destination gets the whole amount), orpayeeout of it.One of:
merchant,payee.destinationPayoutDestination (object)The payer's address, once given.
12 fields of PayoutDestination
idPayoutDestinationID (string)requiredobject"payout_destination"requiredstatusstringrequiredOne of:
pending,active,disabled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
addressstringrequiredThe address in its canonical form.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostringlabelstringkindstringrequiredrefundwhen a payer gave it for a refund.One of:
payout,refund.active_atTimestamp (string (date-time))requiredWhen it became, or will become, payable.
created_atTimestamp (string (date-time))requireddisabled_atTimestamp (string (date-time))
refund_urlstringWhile it is awaiting_address, the page where the payer gives their address. Send it to them.
waiting_reasonstringPresent on a queued refund that is waiting for something on Nowgate's side.
One of:
liquidity,gas_funding,fees,signer_limit.failure_reasonstringPresent on a failed refund.
external_idstringapproved_atTimestamp (string (date-time))transactionstringThe transaction that carries it
metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredclosed_atTimestamp (string (date-time))versioninteger (int64)requiredIncreases with every change; use it to ignore stale webhook events.
4xx, 5xx An error, as problem details.
Refund events#
your endpoint (you choose the URL)Sent by NowgateNowgate POSTs refund.created, then refund.<status> on every change of a refund's status, signed and retried as payment events are. A refund with its own webhook_url sends its events there instead. The payment gets payment.refunded once its refunds return all it credited.
Headers
Nowgate-SignaturestringrequiredNowgate-Event-IdEventID (string)required
Body
idEventID (string)requiredobject"event"requiredtypestringrequiredrefund.created or refund.<status>.
Example:
"refund.finished".api_versionstringrequiredExample:
"2026-11-01".environmentstringrequiredOne of:
live,sandbox,dev,test.created_atTimestamp (string (date-time))requireddataobjectrequired1 fields
objectRefund (object)required24 fields of Refund
idRefundID (string)requiredobject"refund"requiredpaymentPaymentID (string)requiredstatusPayoutStatus (string)requiredOne of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
amountAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_sentAmount (string)requiredWhat the payer gets.
network_feeAmount (string)requiredThe network fee, quoted in this asset when the refund was created.
payout_feeAmount (string)requiredNowgate's payout fee.
amount_debitedAmount (string)requiredWhat your balance pays for it.
fee_paid_byPayoutFeePaidBy (string)requiredWho pays the network fee:
merchanton top of the amount (the destination gets the whole amount), orpayeeout of it.One of:
merchant,payee.destinationPayoutDestination (object)The payer's address, once given.
12 fields of PayoutDestination
idPayoutDestinationID (string)requiredobject"payout_destination"requiredstatusstringrequiredOne of:
pending,active,disabled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
addressstringrequiredThe address in its canonical form.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostringlabelstringkindstringrequiredrefundwhen a payer gave it for a refund.One of:
payout,refund.active_atTimestamp (string (date-time))requiredWhen it became, or will become, payable.
created_atTimestamp (string (date-time))requireddisabled_atTimestamp (string (date-time))
refund_urlstringWhile it is awaiting_address, the page where the payer gives their address. Send it to them.
waiting_reasonstringPresent on a queued refund that is waiting for something on Nowgate's side.
One of:
liquidity,gas_funding,fees,signer_limit.failure_reasonstringPresent on a failed refund.
external_idstringapproved_atTimestamp (string (date-time))transactionstringThe transaction that carries it
metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredclosed_atTimestamp (string (date-time))versioninteger (int64)requiredIncreases with every change; use it to ignore stale webhook events.
Responses
200 Any 2xx acknowledges the event.
The refund object#
idRefundID (string)requiredobject"refund"requiredpaymentPaymentID (string)requiredstatusPayoutStatus (string)requiredOne of:
awaiting_address,awaiting_approval,scheduled,waiting_destination,queued,sending,finished,failed,canceled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
amountAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_sentAmount (string)requiredWhat the payer gets.
network_feeAmount (string)requiredThe network fee, quoted in this asset when the refund was created.
payout_feeAmount (string)requiredNowgate's payout fee.
amount_debitedAmount (string)requiredWhat your balance pays for it.
fee_paid_byPayoutFeePaidBy (string)requiredWho pays the network fee:
merchanton top of the amount (the destination gets the whole amount), orpayeeout of it.One of:
merchant,payee.destinationPayoutDestination (object)The payer's address, once given.
12 fields of PayoutDestination
idPayoutDestinationID (string)requiredobject"payout_destination"requiredstatusstringrequiredOne of:
pending,active,disabled.networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
addressstringrequiredThe address in its canonical form.
memo_typeMemoType (string)A Stellar memo's type.
idis a number up to 2^64-1,textat most 28 bytes.One of:
id,text.memostringlabelstringkindstringrequiredrefundwhen a payer gave it for a refund.One of:
payout,refund.active_atTimestamp (string (date-time))requiredWhen it became, or will become, payable.
created_atTimestamp (string (date-time))requireddisabled_atTimestamp (string (date-time))
refund_urlstringWhile it is awaiting_address, the page where the payer gives their address. Send it to them.
waiting_reasonstringPresent on a queued refund that is waiting for something on Nowgate's side.
One of:
liquidity,gas_funding,fees,signer_limit.failure_reasonstringPresent on a failed refund.
external_idstringapproved_atTimestamp (string (date-time))transactionstringThe transaction that carries it
metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredclosed_atTimestamp (string (date-time))versioninteger (int64)requiredIncreases with every change; use it to ignore stale webhook events.