Transactions

Complete a transaction

Tell Recuut whether your work succeeded or failed. Recuut then finishes the payment. A finished successful payment includes a receipt.

POST/merchant/v1/transactions/{transaction_id}/complete

Request

Path Parameters

transaction_id*

Server-issued transaction identifier.

Header Parameters

PAYMENT-SIGNATURE*

Payment proof created by the payer. Forward this base64 text unchanged. It is required to finish this payment. See the decoded fields.

Authentication

Authorization*Bearer <token>

Private API key for your Recuut account. A recuut_test_ key uses test payers and transactions. A recuut_live_ key uses live data. Send this key only from your server.

In: header

Request body

application/json

Tell Recuut that your app finished the work successfully.

Response

application/json

Headers

PAYMENT-RESPONSE

Proof that payment succeeded. Return this base64 text unchanged. See the decoded fields.

Schema

Result of finishing work and attempting its payment.

Request example

curl --request POST \  --url "$RECUUT_API_URL/merchant/v1/transactions/txn_00000000000070008000000000000000/complete" \  --header "Authorization: Bearer $RECUUT_API_KEY" \  --header 'Content-Type: application/json' \  --header "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE" \  --data '{"failure_code":"merchant_operation_failed","outcome":"failed","resource_execution":{"duration_ms":148,"response_content_type":"application/json","response_size_bytes":96,"response_status":500},"revision_id":"acr_00000000000070008000000000000000"}'

HTTP response examples

200 · OKapplication/json

Response headers

PAYMENT-RESPONSE

The work failed, so no payment receipt is returned.

{  "payment_response": null,  "receipt": null,  "status": "failed",  "transaction_hash": null,  "transaction_id": "txn_00000000000070008000000000000000"}