Three lines

Uber

Developers

API Reference - Deposit interface

Deposit interface

Use the Deposit interface to manage deposits. A draft deposit is created once the partner accepts the request.

Uber will invoke this API server-side (note that cookies will not be made available). Unlike the remaining interfaces, this API is exposed by partners.

Interface authentication

For authentication, use the RSA-SHA256 signature with the Uber payments public key. See the Signature request header for more details.

The sandbox public key:

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnYzMrDq+EnccKtcs5gQM
uP5aDe9WzdBGyUiervrFCEXmVW+T2nsSKJJR02H84LBKPjz2ioI3L289q1Qx1gj7
gvV9VZCaKejIsdKWnM5QW/1VvARWL2diScZzp5OxKX78X8aevvts79B9cVZUiEOU
E4+TTe9qLOQvbc9SssTbdqiA+1xqU+wW7IfHm5cC5kLb+Kv3pqJ63lMTx2L1iNuO
xinwun8lpdRl2+c7LswqqpUfI7Hfk0QF/XJO01BXsDxCzxkuHoWa4SNL+gNx3M69
vc5ymlZHJNZRPLMIe4+VVRaDe0dCOUcHz3cmXCjkLKfdd3JFAG+8FU/CvE1qzyP4
pwIDAQAB
-----END PUBLIC KEY-----

If the authentication fails, you’ll receive the response: 401 Unauthorized.

Request parameters

Name Type Description
id UUID Deposit ID.
session_id String Uber’s client session id such as web session or mobile session.
destination <Object> Owner ID, Account ID.
source <Object> Owner ID, Account ID.
amount <Object> Value of currency, ISO4217. The value is in E5 format. For example, 10 BRL is: {"value": 1000000, "currency": "BRL"}
description String Up to 128 characters
country_iso2 String The country in which this deposit is being created in ISO3166 format.
funding_method String The payment method to be used to fund this deposit
initiated_at String Deposit initiation date in ISO 8601 format. For security reasons, a deposit initiation request will be rejected if this date is more than 15 minutes old (this buffer allows for clock skew, retries, etc).
return_url String The URL to which to return user control at the end of the flow. It may be an https scheme or a deep link.
destination_owner <Object> Details about the owner of the destination account. Contains information needed to complete payment for the funding method and country in the request.

Request headers

Name Type Description
Accept-Language String User preferred language as a BCP 47 code, for example en-GB or pt-BR
Date String Date in GMT as per RFC7231 section 7.1.1.2
Digest String Cryptographic hash of request body as per RFC3230 using SHA256 algorithm (see also RFC5843)
Signature String RSA signature of request-target, host, date and digest headers with PKCS v1.5 Padding

The following is an example request for the deposit initiation: Replace https://uber.partner.com/v1/payments/init-deposit in the example below with the relevant partner url.

curl -X POST \
  https://uber.partner.com/v1/payments/init-deposit \
  -H 'Accept-Language: pt-BR' \
  -H 'Date: Sat, 08 Jun 2019 20:51:35 GMT' \
  -H 'Digest: SHA-256=FkJ3miKx7I099a8n7q3Kmn7P8/dFS1Ebx5POQd185PM=' \
  -H 'Signature: keyId="rsa-key", algorithm="rsa-sha256",
     headers="(request-target) host date digest",
     signature="INCLUDED_SIGNATURE"'
  -H 'Content-Type: application/json' \
  -d '{
    "funding_method": "TEST_FUNDING_METHOD",
    "destination": {
      "owner_id": "13137032-c27e-41e8-a4c3-c392600c4caa",
      "id": "cHBfZGY1NzZlOGMtZGRlYy00NzVhLTk3MDEtOWM1MDA4Zjk4ZjE2",
      "type": "Account",
      "uri": "//payments/customers/13137032-c27e-41e8-a4c3-c392600c4caa/accounts/cHBfZGY1NzZlOGMtZGRlYy00NzVhLTk3MDEtOWM1MDA4Zjk4ZjE2"
    },
    "source": {
      "owner_id": "a7b46663-3b97-40be-9b3e-ab805a56b269",
      "id": "Z3NfMjgzYjgwNzMtNzc3NS0zZTFiLTllODUtYjhhMDJjOGQ2MzI3",
      "type": "Account",
      "uri": "//payments/customers/a7b46663-3b97-40be-9b3e-ab805a56b269/accounts/Z3NfMjgzYjgwNzMtNzc3NS0zZTFiLTllODUtYjhhMDJjOGQ2MzI3"
    },
    "amount": {
      "value": 200000,
      "currency": "CLP"
    },
    "country_iso2": "CL",
    "description": "Test deposit",
    "session_id": "36adcbfd-15fc-45e6-bd51-0f2a52c17c93",
    "initiated_at": "2021-03-11T14:03:46.841Z",
    "return_url": "uber://payments/deposit",
    "destination_owner": {
      "id": "13137032-c27e-41e8-a4c3-c392600c4caa",
      "details": {
        "mobile": "+123456788",
        "firstname": "John",
        "lastname": "Doe"
      },
      "type": "Customer",
      "uri": "//payments/customers/13137032-c27e-41e8-a4c3-c392600c4caa"
    },
    "id": "b6dd4e62-a1de-45d6-82ab-bc405dab7059"
  }'

Response headers

Name Type Description
Location String The redirect location may either be an absolute https URL or a deep-link.

Example response

HTTP/1.1 201 Created
Location: https://api.partner.com/checkout?id=merchant_reference

Deposit errors

initDeposit errors

HTTP status code Reasons for error
400
  • Any request parameter is missing
  • No Accept-Language header specified
  • Body format error, such as:
    • Description is too long
    • Invalid currency ISO2
    • Negative value
    • Merchant reference is too long
    • Invalid metadata (such as a string instead of a map)
401
  • Date header not provided
  • Digest header not provided
  • Signature header wrong or not provided
  • initiated_at not in range of +/- 900 sec (15 mins) from now

Uber

Developers
© 2023 Uber Technologies Inc.