Refunds
3 endpoints. Base URL https://api.paymentsonline.io, sandbox https://api.sandbox-paymentsonline.io.
Every request needs payments-api-key and payments-account.
/v1/refundsList all Refunds
Returns a list of Refunds. The Refunds are sorted with the most recently created appearing first.
Query parameters
metadataobjectoptionalmetadatakey-value pairs to filter by. Only exact matches on the key-value pair(s) will be returned. Example:?metadata[internal_customer_id]=7cb1159d-875e-47ae-a309-319fa7ff395b.offsetnumberoptionalThe (zero-based) offset of the first item in the collection to return.
limitnumberoptionalThe maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
Header parameters
payments-accountstringrequiredThe id of the Paydude Account (usually starting with the prefix
acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.
Responses
200PaginatedDto | object
has_morebooleanrequiredWhether or not there are more elements available after this set. If
false, this set comprises the end of the list.limitnumberoptionalThe maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.
offsetnumberoptionalThe (zero-based) offset of the first item in the collection to return.
totalnumberoptionalThe total items count.
itemsarray of Refundrequired
/v1/refundsCreate a Refund
Creates a Refund.
Header parameters
payments-accountstringrequiredThe id of the Paydude Account (usually starting with the prefix
acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.
Request body application/jsonrequired
amountnumberoptionalA positive integer representing how much of this charge to refund in the smallest currency unit (e.g., 100 cents to refund $1.00), excluding any surcharge. Must be less than or equal to the PaymentIntent's
amount_refundable. If a surcharge was applied to the payment, a proportional amount of the surcharge is refunded automatically in addition to this amount (e.g., refunding 1000 of a 2000 payment with a 60 surcharge refunds 1030 in total). *The default is the remaining refundable amount, plus any remaining surcharge.*metadataobjectoptionalSet of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value (i.e.
''ornull) to them. All keys can be unset by posting an empty value (i.e.{}ornull) tometadata.payment_intent_idstringrequiredID of the PaymentIntent to refund.
reasonstring (duplicate | fraudulent | requested_by_customer)optionalString indicating the reason for the refund. If set, possible values are
duplicate,fraudulent, andrequested_by_customer. Providing a refund reason is recommended to reduce the need for merchant contact in the event of a risk inquiry.refund_platform_feebooleanoptionalBoolean indicating whether the platform fee should be refunded when refunding this charge. If a full charge refund is given, the full platform fee will be refunded. Otherwise, the platform fee will be refunded in an amount proportional to the amount of the charge refunded.
Responses
201Refund
amountnumberrequiredAmount (in the smallest currency unit) refunded, excluding any surcharge. The total amount returned to the customer is
amount+surcharge_amount.balance_transactionBalanceTransactionrequiredThe balance transaction that describes the impact of this refund on your account balance. Note: Multiple balance transactions may be associated with this resource and you can fetch them all with
/balance-transactions?source_id={id}.charge_idstringrequiredID of the Charge that was refunded.
created_atstring date-timerequiredTime at which the object was created.
failure_codestring (expired_or_canceled_card | lost_or_stolen_card | fraudulent | risk_blocked | declined | proprietary_card_activity_regulations | blacklisted_card | not_permitted | …)optionalError code explaining reason for refund failure.
failure_messagestringoptionalMessage to user further explaining the reason for the refund failure.
idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
payment_intent_idstringrequiredID of the PaymentIntent that was refunded.
payment_method_idstringoptionalID of the payment method that was refunded.
reasonstring (duplicate | fraudulent | requested_by_customer | expired_uncaptured_charge | partial_capture | reversal)optionalReason for the refund, either user-provided (
duplicate,fraudulent, orrequested_by_customer) or generated by Paydude (expired_uncaptured_charge,partial_capture, orreversal)statusstring (canceled | pending | succeeded | failed | requires_action)requiredStatus of the refund, one of
pending,succeeded,failed,canceledorrequires_action.surcharge_amountnumberrequiredAmount (in the smallest currency unit) of the surcharge refunded, in addition to
amount.updated_atstring date-timerequiredTime at which the object was last updated.
/v1/refunds/{id}Get a Refund
Retrieves the details of an existing Refund.
Path parameters
idstringrequired
Header parameters
payments-accountstringrequiredThe id of the Paydude Account (usually starting with the prefix
acct_) that the request is performed on behalf of. Must be a merchant (connected) account id, not the partner account you signed up with; a partner account passes GET /v1/accounts and then fails with "not enabled for this account" on the first payment call.
Responses
200Refund
amountnumberrequiredAmount (in the smallest currency unit) refunded, excluding any surcharge. The total amount returned to the customer is
amount+surcharge_amount.balance_transactionBalanceTransactionrequiredThe balance transaction that describes the impact of this refund on your account balance. Note: Multiple balance transactions may be associated with this resource and you can fetch them all with
/balance-transactions?source_id={id}.charge_idstringrequiredID of the Charge that was refunded.
created_atstring date-timerequiredTime at which the object was created.
failure_codestring (expired_or_canceled_card | lost_or_stolen_card | fraudulent | risk_blocked | declined | proprietary_card_activity_regulations | blacklisted_card | not_permitted | …)optionalError code explaining reason for refund failure.
failure_messagestringoptionalMessage to user further explaining the reason for the refund failure.
idstringrequiredUnique identifier for the object.
metadataobjectoptionalSet of [key-value pairs](#section/Metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
payment_intent_idstringrequiredID of the PaymentIntent that was refunded.
payment_method_idstringoptionalID of the payment method that was refunded.
reasonstring (duplicate | fraudulent | requested_by_customer | expired_uncaptured_charge | partial_capture | reversal)optionalReason for the refund, either user-provided (
duplicate,fraudulent, orrequested_by_customer) or generated by Paydude (expired_uncaptured_charge,partial_capture, orreversal)statusstring (canceled | pending | succeeded | failed | requires_action)requiredStatus of the refund, one of
pending,succeeded,failed,canceledorrequires_action.surcharge_amountnumberrequiredAmount (in the smallest currency unit) of the surcharge refunded, in addition to
amount.updated_atstring date-timerequiredTime at which the object was last updated.
