Update transaction
Updates an existing transaction. Every field is optional: send only what you want to change.
When child records are sent (items, addresses, payments, refunds, customer), they fully replace the existing records.
Endpoint
Section titled “Endpoint”PATCH
https://api.rapidchargeback.com/api/v1/transactions/:idAuthentication
Section titled “Authentication”Authorization: Basic base64(client_id:client_secret)Content-Type: application/jsonURL parameter
Section titled “URL parameter”| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | Transaction ID (returned in the id field of the creation response) |
Did not keep the id? Find the transaction by your system’s ID.
Accepted fields
Section titled “Accepted fields”Every field accepted by Create transaction can be sent here, all optional:
- Fields sent replace the current value
- Fields omitted keep the current value
- Child records sent (
items,addresses, etc.) fully replace the existing ones
Validations
Section titled “Validations”- If
merchant_idis changed, the new merchant must belong to your company - If
external_idorexternal_sourceare changed, the combination cannot duplicate another existing transaction - If the transaction was already used by a solution (e.g. queried by Prevention), the update is blocked with
409 Conflict
Request example
Section titled “Request example”Update only the ARN and auth_code
Section titled “Update only the ARN and auth_code”curl -X PATCH https://api.rapidchargeback.com/api/v1/transactions/00000000-0000-0000-0000-000000000042 \ -H "Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=" \ -H "Content-Type: application/json" \ -d '{ "arn": "74537119547024600128228", "auth_code": "AUTH999" }'Update items (replaces all existing items)
Section titled “Update items (replaces all existing items)”curl -X PATCH https://api.rapidchargeback.com/api/v1/transactions/00000000-0000-0000-0000-000000000042 \ -H "Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ=" \ -H "Content-Type: application/json" \ -d '{ "amount": 300.00, "items": [ { "product_description": "Plano Premium", "unit_price": 150.00 }, { "product_description": "Taxa de Setup", "unit_price": 150.00 } ] }'Response examples
Section titled “Response examples”Success
Section titled “Success”{ "data": { "id": "00000000-0000-0000-0000-000000000042", "merchant_id": "00000000-0000-0000-0000-000000000001", "amount": 300.00, "transaction_items": [ { "product_description": "Plano Premium", "unit_price": 150.00 }, { "product_description": "Taxa de Setup", "unit_price": 150.00 } ] }}Transaction not found
Section titled “Transaction not found”{ "error": { "code": "TRANSACTION_NOT_FOUND", "message": "Transaction not found" }}Immutable transaction (already used by a solution)
Section titled “Immutable transaction (already used by a solution)”{ "error": { "code": "TRANSACTION_IMMUTABLE", "message": "Transaction cannot be modified, it has been used by a network event" }}Duplicate external_id
Section titled “Duplicate external_id”{ "error": { "code": "TRANSACTION_DUPLICATE", "message": "Another transaction with this external_source/external_id already exists" }}