KeelsonDocs
    Judge Mode

    API reference Purchases

    Record a live purchase's PayPal transaction

    PUT/v1/purchases/{id}/paypal-transaction

    For a purchase countersigned with live, once its Alibi is issued: the PayPal transaction id of the buyer's payment at the store, as PayPal reported it on its confirmation. Recorded once; the Alibi carries it from then on, marked as not signed. Only the client that asked for the countersign records it.

    Path parameters

    idstringRequired

    Headers

    Content-Typeapplication/jsonRequired

    Request body

    application/json

    transactionIdstringRequired
    PayPal's 17-character transaction id.
    orderobject
    PayPal's order as its checkout stated it right before the pay click: its intent and its only payee's merchant id.
    conversionvalue

    Responses

    • 200The purchase
    • 404No such purchase of this client
    • 409The purchase is not live, its Alibi is not issued yet, or another transaction id is recorded
    • 422The order's payee is not one the mandate allows, or the conversion is not the countersigned amount at PayPal's rate, does not use the reference rate the evidence binds, or is over the mandate's spread. The transaction id is recorded without them.

    200 response

    idstringRequired
    mandateIdstringRequired
    modestringRequired
    One of 2of2degradednull
    amountobjectRequired
    statestringRequired
    logIndexstring
    The leaf's index in the Alibi log.
    coverageobject
    The lockCoverage transaction of the operator's bond.
    captureobject
    The PayPal capture of the countersigned amount.
    failureobject
    The step that failed and why; nothing was captured.
    blockedarray of string
    For a DENIED cart, the mandate fields whose check failed.
    reasonsarray of object
    For a DENIED cart, each failed field with what the mandate allowed and what the cart had, as text.
    checksarray of object
    For a purchase the engine checked, each mandate field with what the mandate allowed, what the cart had and whether it held.
    cardobject
    A card purchase: its single-use card (never its number) and every authorization the card network sent it, with both legs' decision. CAPTURED once the merchant's capture settles.
    liveobject
    A purchase the buyer pays at the store's own checkout: the store's origin and the PayPal transaction id once the agent recorded it. Never covered nor captured.