Paying too much to process cards? Get a cheaper quote today.Schedule a call →

Refunds

3 endpoints. Base URL https://api.paymentsonline.io, sandbox https://api.sandbox-paymentsonline.io.

Every request needs payments-api-key and payments-account.

GET/v1/refunds

List all Refunds

Returns a list of Refunds. The Refunds are sorted with the most recently created appearing first.

Query parameters

  • metadataobjectoptional

    metadata key-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.

  • offsetnumberoptional

    The (zero-based) offset of the first item in the collection to return.

  • limitnumberoptional

    The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

Header parameters

  • payments-accountstringrequired

    The 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_morebooleanrequired

    Whether or not there are more elements available after this set. If false, this set comprises the end of the list.

  • limitnumberoptional

    The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

  • offsetnumberoptional

    The (zero-based) offset of the first item in the collection to return.

  • totalnumberoptional

    The total items count.

  • itemsarray of Refundrequired

POST/v1/refunds

Create a Refund

Creates a Refund.

Header parameters

  • payments-accountstringrequired

    The 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

  • amountnumberoptional

    A 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.*

  • metadataobjectoptional

    Set 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. '' or null) to them. All keys can be unset by posting an empty value (i.e. {} or null) to metadata.

  • payment_intent_idstringrequired

    ID of the PaymentIntent to refund.

  • reasonstring (duplicate | fraudulent | requested_by_customer)optional

    String indicating the reason for the refund. If set, possible values are duplicate, fraudulent, and requested_by_customer. Providing a refund reason is recommended to reduce the need for merchant contact in the event of a risk inquiry.

  • refund_platform_feebooleanoptional

    Boolean 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

  • amountnumberrequired

    Amount (in the smallest currency unit) refunded, excluding any surcharge. The total amount returned to the customer is amount + surcharge_amount.

  • balance_transactionBalanceTransactionrequired

    The 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_idstringrequired

    ID of the Charge that was refunded.

  • created_atstring date-timerequired

    Time 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 | …)optional

    Error code explaining reason for refund failure.

  • failure_messagestringoptional

    Message to user further explaining the reason for the refund failure.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set 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_idstringrequired

    ID of the PaymentIntent that was refunded.

  • payment_method_idstringoptional

    ID of the payment method that was refunded.

  • reasonstring (duplicate | fraudulent | requested_by_customer | expired_uncaptured_charge | partial_capture | reversal)optional

    Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Paydude (expired_uncaptured_charge, partial_capture, or reversal)

  • statusstring (canceled | pending | succeeded | failed | requires_action)required

    Status of the refund, one of pending, succeeded, failed, canceled or requires_action.

  • surcharge_amountnumberrequired

    Amount (in the smallest currency unit) of the surcharge refunded, in addition to amount.

  • updated_atstring date-timerequired

    Time at which the object was last updated.

GET/v1/refunds/{id}

Get a Refund

Retrieves the details of an existing Refund.

Path parameters

  • idstringrequired

Header parameters

  • payments-accountstringrequired

    The 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

  • amountnumberrequired

    Amount (in the smallest currency unit) refunded, excluding any surcharge. The total amount returned to the customer is amount + surcharge_amount.

  • balance_transactionBalanceTransactionrequired

    The 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_idstringrequired

    ID of the Charge that was refunded.

  • created_atstring date-timerequired

    Time 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 | …)optional

    Error code explaining reason for refund failure.

  • failure_messagestringoptional

    Message to user further explaining the reason for the refund failure.

  • idstringrequired

    Unique identifier for the object.

  • metadataobjectoptional

    Set 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_idstringrequired

    ID of the PaymentIntent that was refunded.

  • payment_method_idstringoptional

    ID of the payment method that was refunded.

  • reasonstring (duplicate | fraudulent | requested_by_customer | expired_uncaptured_charge | partial_capture | reversal)optional

    Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Paydude (expired_uncaptured_charge, partial_capture, or reversal)

  • statusstring (canceled | pending | succeeded | failed | requires_action)required

    Status of the refund, one of pending, succeeded, failed, canceled or requires_action.

  • surcharge_amountnumberrequired

    Amount (in the smallest currency unit) of the surcharge refunded, in addition to amount.

  • updated_atstring date-timerequired

    Time at which the object was last updated.