Skip to main content

Retrieve proposal by ID

Last updated: 08-Jul-2020
Rate this article:

Overview

Use the getProposalById method via JSON-RPC APIv6 to retrieve a proposal/quote using a specific ID.

Request Parameters

Request parameters for the getProposalById JSON-RPC APIv6 method
Parameters Type Required/Optional Description
proposalId String

Required

The unique merchant proposal ID generated by the 2Checkout system.

sessionId String Required Unique 2Checkout session ID code.

Request Sample

<?php

require ('PATH_TO_AUTH');

$proposalID = "0573e71d-38bb-4d61-88ca-b3c557517c68";

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'getProposalById';
$jsonRpcRequest->params = array($sessionID, $proposalID);
$jsonRpcRequest->id = $i++;

try {
    $result = callRPC($jsonRpcRequest, $host);
    echo "Proposal: </br>", 
    var_dump($result);
}
catch (SoapFault $e) {
    echo "Could not fetch proposal: " . $e->getMessage();
    exit;
}

Response

The getProposalById call via JSON-RPC APIv6 returns the Proposal object.

Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo