Reference
- Pricing
- Checkout
- Contracts
- Credits
- Customer Dashboards
- Customers
- Entitlements
- Events
- Invoices
- Objects
- One-Time
- Payments
- Metrics
- Subscriptions
Payments
Refund a payment transaction
Refund a specific payment transaction.
POST
/
companies
/
{company_id}
/
payments
/
transactions
/
{id}
/
refund
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/payments/transactions/{id}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": {
"currency": "<string>",
"value_in_cents": 123
},
"note": "<string>",
"reason": "duplicate"
}'
{
"application_fee_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"company_id": "<string>",
"connected_account_transaction": true,
"created_at": "2023-11-07T05:31:56Z",
"customer": {
"email": "<string>",
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"org_name": "<string>",
"parent_customer": {},
"parent_customer_id": "<string>"
},
"customer_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"invoice_number": "<string>",
"invoice_uuid": "<string>",
"is_refundable": true,
"is_voidable": true,
"net_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"note": "<string>",
"payment_method": {
"brand": "<string>",
"last_4": "<string>",
"name": "<string>",
"type": "<string>"
},
"proposal_id": "<string>",
"provider_transaction_id": "<string>",
"provider_type": "<string>",
"status": "<string>",
"status_message": "<string>",
"stripe_fee_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"total_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"total_amount_default_currency": {
"currency": "<string>",
"value_in_cents": 123
},
"total_fee_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"transaction_type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
The idempotency key that will be used to ensure the request is only performed once
Path Parameters
Company ID. It should have a prefix 'cmp_'.
resource id
Body
application/json
Response
200 - application/json
OK
The response is of type object
.
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/payments/transactions/{id}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": {
"currency": "<string>",
"value_in_cents": 123
},
"note": "<string>",
"reason": "duplicate"
}'
{
"application_fee_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"company_id": "<string>",
"connected_account_transaction": true,
"created_at": "2023-11-07T05:31:56Z",
"customer": {
"email": "<string>",
"id": "<string>",
"identifier": "<string>",
"name": "<string>",
"org_name": "<string>",
"parent_customer": {},
"parent_customer_id": "<string>"
},
"customer_id": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"invoice_number": "<string>",
"invoice_uuid": "<string>",
"is_refundable": true,
"is_voidable": true,
"net_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"note": "<string>",
"payment_method": {
"brand": "<string>",
"last_4": "<string>",
"name": "<string>",
"type": "<string>"
},
"proposal_id": "<string>",
"provider_transaction_id": "<string>",
"provider_type": "<string>",
"status": "<string>",
"status_message": "<string>",
"stripe_fee_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"total_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"total_amount_default_currency": {
"currency": "<string>",
"value_in_cents": 123
},
"total_fee_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"transaction_type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
Assistant
Responses are generated using AI and may contain mistakes.