Skip to main content

Documentación

Retrieve Payment Link

Retrieve details of a payment link.

    • payment_link

    • ID of the payment link. String starting with hp_reuse_.

Code Samples
    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string id = "hp_reuse_44298a945030cbd9e8347383ac9c0c80";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/hosted/collect/payments/{id}");
        
                        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/hosted/collect/payments/hp_reuse_44298a945030cbd9e8347383ac9c0c80'
            );
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }onst makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const body = {
              currency: 'USD',
              customer: 'cus_b3b8ad0174f4c415c663b35bcf542192',
              metadata: {
                merchant_defined: true
              },
              amount: 10
            };
            const result = await makeRequest('POST', '/v1/invoice_items', body);
        
            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/hosted/collect/payments/hp_reuse_44298a945030cbd9e8347383ac9c0c80');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        id = "hp_reuse_44298a945030cbd9e8347383ac9c0c80"
        response = make_request(method='get',
                                path=f'/v1/hosted/collect/payments/{id}')
        
        pprint(response)?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('get', '/v1/hosted/collect/payments/hp_reuse_44298a945030cbd9e8347383ac9c0c80');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>rom pprint import pprint
        
        from utilities import make_request
        
        invoice_item = {
            "currency": "USD",
            "customer": "cus_b3b8ad0174f4c415c663b35bcf542192",
            "metadata": {
                "merchant_defined": True
            },
            "amount": 10
        }
        result = make_request(method='post', path='/v1/invoice_items', body=invoice_item)
        pprint(result)
  • /v1/hosted/collect/payments/:payment_link

  • Retrieve Payment Link

  • curl -X get 'https://sandboxapi.rapyd.net/v1/hosted/collect/payments/hp_reuse_8214bae0231646e3080eff4a84b96941' \
    -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": "26c00e15-235c-43f5-ac25-432b53cacaa1"
        },
        "data": {
            "id": "hp_reuse_8214bae0231646e3080eff4a84b96941",
            "amount": 100,
            "currency": "GBP",
            "country": "GB",
            "amount_is_editable": false,
            "merchant_reference_id": "payment link",
            "template": {
                "error_payment_url": "https://error.rapyd.com",
                "complete_payment_url": "https://complete.rapyd.com"
            },
            "amount_range_per_currency_mapping": {
                "GBP": {
                    "min_amount": 0,
                    "max_amount": 1.7976931348623157e+308
                }
            },
            "customer": "",
            "requested_currency": null,
            "fixed_side": null,
            "max_payments": 3,
            "status": "NEW",
            "language": "en",
            "org_id": "153e08b8-4bf3-4cb9-bb03-79d405eaed2a",
            "merchant_color": "323fff",
            "merchant_logo": "",
            "merchant_website": "https://example1234.net",
            "merchant_customer_support": {
                "url": "https://example1234.net",
                "email": "support@example1234.net",
                "phone_number": "121255551213"
            },
            "merchant_alias": "Doc Team",
            "merchant_terms": "https://example1234.net/terms_and_conditions",
            "merchant_privacy_policy": "https://example1234.net/privacy_policy",
            "page_expiration": 1795434913,
            "redirect_url": "https://sandboxcheckout.rapyd.net/collect/payments?token=hp_reuse_8214bae0231646e3080eff4a84b96941",
            "region": "EMEA",
            "geo_country": "IL",
            "type": "CHECKOUT",
            "page_type": "REUSABLE_LINK"
        }
    }