Retrieve Payment
Retrieve details of a payment.
payment
ID of the payment. String starting with payment_.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string payment = "payment_19e3edad1e9102cd24006a34c52c9a0b"; string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/payments/{payment}"); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const result = await makeRequest( 'GET', '/v1/payments/payment_19e3edad1e9102cd24006a34c52c9a0b' ); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); try { $object = make_request('get', '/v1/payments/payment_19e3edad1e9102cd24006a34c52c9a0b'); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request payment = "payment_19e3edad1e9102cd24006a34c52c9a0b" response = make_request(method='get', path=f'/v1/payments/{payment}') pprint(response)
/v1/payments/:payment
Retrieve Payment
curl -X get 'https://sandboxapi.rapyd.net/v1/payments/payment_f2e57196a80852a24b644ef6ceea56f7' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "9086f0f7-8e57-4952-a607-71574d5f2a09" }, "data": { "id": "payment_f2e57196a80852a24b644ef6ceea56f7", "amount": 0, "original_amount": 1000, "is_partial": false, "currency_code": "PLN", "country_code": "pl", "status": "ACT", "description": "Bank transfer payment using prerequisite PM", "merchant_reference_id": "", "customer_token": "cus_f3d4d8575d30b27aa39230e76fb83a54", "payment_method": "other_2d1a55ed70548f259f6a488fd81ed96a", "payment_method_data": { "id": "other_2d1a55ed70548f259f6a488fd81ed96a", "type": "pl_p24_bank", "category": "bank_redirect", "metadata": { "merchant_defined": true }, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "bic_swift": "", "account_last4": "" }, "auth_code": null, "expiration": 1755097289, "captured": true, "refunded": false, "refunded_amount": 0, "receipt_email": "", "redirect_url": "https://sandboxcheckout.rapyd.net/complete-bank-payment?token=payment_f2e57196a80852a24b644ef6ceea56f7&complete_payment_url=&error_payment_url=", "complete_payment_url": "", "error_payment_url": "", "receipt_number": "", "flow_type": "", "address": null, "statement_descriptor": "Doc Team", "transaction_id": "", "created_at": 1753887689, "metadata": {}, "failure_code": "", "failure_message": "", "paid": false, "paid_at": 0, "dispute": null, "refunds": null, "order": null, "outcome": null, "visual_codes": {}, "textual_codes": {}, "instructions": {}, "ewallet_id": "ewallet_c1943cfeda5f98247ab117e5d2648861", "ewallets": [ { "ewallet_id": "ewallet_c1943cfeda5f98247ab117e5d2648861", "amount": 1000, "percent": 100, "refunded_amount": 0 } ], "payment_method_options": {}, "payment_method_type": "pl_p24_bank", "payment_method_type_category": "bank_redirect", "fx_rate": 1, "merchant_requested_currency": null, "merchant_requested_amount": null, "fixed_side": "", "payment_fees": null, "invoice": "", "escrow": null, "group_payment": "", "cancel_reason": null, "initiation_type": "customer_present", "mid": "", "next_action": "pending_confirmation", "error_code": "", "remitter_information": {}, "save_payment_method": false, "merchant_advice_code": null, "merchant_advice_message": null, "transaction_link_id": null } }