The pay/getPayment method is an Elance Developer API Pay method that returns a description for a specific payment, including the payment amount, the payment method used, and the date the payment was processed.

The invoice related to the specified payment can be retrieved by using the pay/getInvoice method, and supplying the value of the invoiceId parameter of the PaymentData object (described below) as an argument for the id parameter of the pay/getInvoice method.

pay/getPayment is an authenticated method. It requires a Developer API key and an OAuth Consumer Secret, both issued by Elance. It is invoked using an HTTP or HTTPS GET request. For more details on the OAuth authentication protocol, see Using OAuth with Authenticated Methods.

This method does not support the JSONP response format.

For more information on the format of an Elance Developer API request, see Getting Started.

tableofcontents_number_textRequired Query String Parameters

Parameter Data Type Description
id integer The unique ID, assigned by Elance, to the requested payment object. This ID is obtained from the paymentIds array of the InvoiceData object, which is returned by both the pay/getBilling and pay/getInvoice methods.

tableofcontents_number_textResponse Data Description

Property Data Type Description
bidDetails BidData object The details regarding this bid and associated Workroom, including project name, client, and provider.
invoice PaymentData object Detailed information about the payment, including the amount paid, the currency, and the form of payment used.

tableofcontents_number_textRequest/Response Examples in JSON

tableofcontents_number_textRetrieving a Payment Record

The following HTTP GET request demonstrates retrieving a specific payment record using its payment ID. The HTTP headers for the GET request are shown below. (NOTE: Elance recommends that developers access OAuth APIs using one of the many publicly available libraries.)


GET /api/pay/getPayment?id=10396168 HTTP/1.1
User-Agent: anyMeta/OAuth 1.0 - ($LastChangedRevision: 134 $)
Accept: */*
Authorization: OAuth realm="",oauth_signature_method="HMAC-SHA1",oauth_signature="YHpUKkLbUI6B%2B%2BUwY54rFpml2wk%3D",oauth_nonce="4c8bba92d8a91",oauth_timestamp="1284225682",oauth_token="988078256-1425962-1425962-76.99.193-fd76b324028bef6-%2B",oauth_consumer_key="8cfc475b57fee5b7dc08cc0f1d5a0fcdab409b3c",oauth_version="1.0"


    "api" : "pay\/getBilling",
    "apiVersion" : 1,
    "rcode" : 1,
    "data" :  {
        "bidDetails" :  {
            "bidId" : "24170489",
            "jobId" : "24170488",
            "jobName" : "PHP scripting for SuperGeeks",
            "userType" : "PROVIDER",
            "clientUserId" : "1969228",
            "clientName" : "SuperGeeks",
            "clientImageURL" : "https : \/\/\/file\/SG_logo100x100.jpg?crypted=Y3R4JTNEc2VhcmNoX3RodW1ibmFpbCUyNmZpZCUzRDIwMzEwMTczJTI2cmlkJTNELTElMjZwaWQlM0QxOTY5MjI4",
            "clientCountry" : "United States",
            "clientCountryCode" : "US",
            "clientCity" : "Honolulu",
            "providerUserId" : "1976925",
            "providerName" : "John Smith",
            "providerImageURL" : "https : \/\/\/file\/cry_face_4056.jpg?crypted=Y3R4JTNEc2VhcmNoX3RodW1ibmFpbCUyNmZpZCUzRDMwMTAxODEyJTI2cmlkJTNELTElMjZwaWQlM0QxOTc2OTI1",
            "providerCountry" : "United States",
            "providerCountryCode" : "US",
            "providerCity" : "Mountain View",
            "phase" : "5",
            "status" : "Working",
            "secondaryStatus" : "",
            "isHourly" : false,
            "isSponsored" : false,
            "isPreBid" : false,
            "bidAmount" : "200",
            "hoursPerWeek" : "0",
            "duration" : "",
            "submissionDate" : 1306900800
        "payment" :  {
            "id" : 10396168,
            "date" : 1306900800,
            "bidId" : 24170489,
            "jobId" : 24170488,
            "client" : "SuperGeeks",
            "provider" : "johnsmithinc",
            "clientUserId" : 1969228,
            "providerUserId" : 1976925,
            "fromAccountId" : 2,
            "toAccountId" : 2214625,
            "invoiceId" : 6730313,
            "internalPaymentDisplay" : "Elance Escrow",
            "externalPaymentId" : 0,
            "externalPaymentDisplay" : "",
            "fromAmount" : 200,
            "fromCurrency" : "USD",
            "toAmount" : 200,
            "toCurrency" : "USD",
            "amount" : 200,
            "fromDescription" : "Release of Payment for PHP scripting for SuperGeeks to johnsmithinc from Escrow Account for project bid ID 24170489.   Document #6730313",
            "toDescription" : "Release of Payment for PHP scripting for SuperGeeks from Escrow Account for project bid ID 24170489.   Document #6730313"

tableofcontents_number_textError Codes

For a list of other common errors that can be thrown by this method, see Common API Error Codes.