Complete a transaction
Tell Recuut whether your work succeeded or failed. Recuut then finishes the payment. A finished successful payment includes a receipt.
/merchant/v1/transactions/{transaction_id}/completeRequest
Path Parameters
Server-issued transaction identifier.
Header Parameters
Payment proof created by the payer. Forward this base64 text unchanged. It is required to finish this payment. See the decoded fields.
Authentication
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/jsonTell Recuut that your app finished the work successfully.
Response
application/jsonHeaders
- 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
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"}