API Reference - Update Deposit
¶ Update deposit
Update the deposit after collecting user data, and before confirming the payment. Make your request at this endpoint:
POST /v1/payments/deposits/:id
¶ Authentication
OAuth 2.0 bearer token with the payments.deposits
scope.
¶ Path parameters
Name | Type | Description |
---|---|---|
id | UUID | Deposit ID |
¶ Request headers
Name | Type | Description |
---|---|---|
X-Idempotency-Key | String | See the idempotency section. |
¶ Body parameters
Name | Type | Required | Description |
---|---|---|---|
merchant_reference | String | required | Payment transaction reference id on partner side. |
description | String | optional | Up to 128 characters. |
metadata | Map |
optional | Set of key-value pairs used for storing additional information. |
amount | optional | Value of currency, ISO4217. The value is in E5 format (x * 100000). For example, 20 BRL is: {"value": 2000000, "currency": "BRL"}
The field is optional. Provide the amount field if it differs from the amount in Init-Deposit call. It may happen if the end-user overpaid or underpaid for the deposit after initiation. |
¶ Example request and response
The following is an example request for the update deposit resource. To use this request, replace $token
in the example below with the access token.
curl -X POST \
https://sandbox-api.uber.com/v1/payments/deposits/cd562368-55c9-41ff-9be1-a875da9c0b8c \
-H "Authorization: Bearer $token" \
-H 'Content-Type: application/json' \
-H 'X-Idempotency-Key: cd562368-55c9-41ff-9be1-a875da9c0b8c-update' \
-d '{
"description": "Updating existing order : cd562368-55c9-41ff-9be1-a875da9c0b8c",
"merchant_reference": "1d2681b6-3fff-4971-86df-3c7e6a109ed8",
"metadata" : {
"foo": "bar"
},
"amount" : {
"value": 2000000,
"currency": “BRL”
}
}'
This is an example of what you can expect to see in response:
{
"deposit": {
"id": "84e993dc-9266-ead6-a20a-10757d04363b",
"destination": {
"id": "cHBfYjA3NDA5MzItYzI2Mi00MTk5LThkZGItY2Y2NGRhMTU0OWQ4",
"owner_id": "e00905e1-066d-4c44-bd9d-ea8fd7d7be8e",
"type": "Account",
"uri": "//payments/customers/e00905e1-066d-4c44-bd9d-ea8fd7d7be8e/accounts/cHBfYjA3NDA5MzItYzI2Mi00MTk5LThkZGItY2Y2NGRhMTU0OWQ4"
},
"source": {
"id": "Z3NfZjNmMmU2MDYtMjYzYS0zMzY2LThjOWMtMmQ0MGU1ODE2ZWZj",
"owner_id": "a7b46663-3b97-40be-9b3e-ab805a56b269",
"type": "Account",
"uri": "//payments/customers/a7b46663-3b97-40be-9b3e-ab805a56b269/accounts/Z3NfZjNmMmU2MDYtMjYzYS0zMzY2LThjOWMtMmQ0MGU1ODE2ZWZj"
},
"state": {
"value": "PENDING"
},
"amount": {
"value": 1000000,
"currency": "EUR"
},
"description": "Test update deposit",
"merchant_reference": "b36340d75701-a02a-6dae-6629-cd399e48",
"country_iso2": "NL",
"session_id": "36adcbfd-15fc-45e6-bd51-0f2a52c17c93",
"funding_method": "TEST_FUNDING_METHOD",
"type": "Deposit",
"uri": "//payments/deposits/84e993dc-9266-ead6-a20a-10757d04363b"
}
}
¶ Update deposit errors
HTTP Status | Description |
400 | Bad request |
403 | Forbidden |
404 | Not Found |
409 | Conflict |