Skip to main content

Documentation

Create Payment Link

Creates a reusable link for a hosted payment page.

A customer can use the link and the hosted payment page multiple times. After providing required information, the customer is redirected seamlessly to a Rapyd Checkout page to complete the payment.

You can create the link for everyone or for a specific customer. You can make the payment amount fixed, editable, or open.

  • /v1/hosted/collect/payments

  • Fixed amount

  • curl -X post
    https://sandboxapi.rapyd.net/v1/hosted/collect/payments
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '{
        "country": "GB",
        "currency": "GBP",
        "amount": "100",
        "merchant_reference_id": "payment link",
        "language": "EN",
        "checkout": {
            "error_payment_url": "https://www.rapyd.com",
            "complete_payment_url": "https://www.rapyd.com"
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "d8414827-aca3-43a9-84f3-2c775ec0794c"
        },
        "data": {
            "id": "hp_reuse_f2bbe41cc648c1459fbe372b911fd2e1",
            "amount": 100,
            "currency": "GBP",
            "country": "GB",
            "amount_is_editable": false,
            "merchant_reference_id": "payment link",
            "redirect_url": "https://sbox.rapyd.ly/pay/AZFGCpyr",
            "template": {
                "error_payment_url": "https://www.rapyd.com",
                "complete_payment_url": "https://www.rapyd.com"
            },
            "customer": "",
            "status": "NEW",
            "language": "en",
            "merchant_color": "09a677",
            "merchant_logo": "https://iconslib.rapyd.net/merchant-logos/ohpc_8df12e51102d26bdc7e2321209878.jpg",
            "merchant_website": "https://www.rapyd.net",
            "merchant_customer_support": {
                "url": "https://www.rapyd.net",
                "email": "johndoe@rapyd.net",
                "phone_number": "55555555555"
            },
            "merchant_alias": "rapyd",
            "merchant_terms": "https://www.termsfeed.com/terms-conditions-generator/",
            "merchant_privacy_policy": "https://www.privacypolicies.com/blog/privacy-policy-template/",
            "page_expiration": 1699952276
        }
    }
  • Editable amount

  • curl -X post
    https://sandboxapi.rapyd.net/v1/hosted/collect/payments
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '{
        "country": "GB",
        "currency": "GBP",
        "amount": "100",
        "amount_is_editable": true,
        "merchant_reference_id": "payment link",
        "language": "EN",
        "checkout": {
            "error_payment_url": "https://www.rapyd.com",
            "complete_payment_url": "https://www.rapyd.com"
        }
    }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "4411af1c-f390-4d8d-baf0-e98e35c2bfad"
        },
        "data": {
            "id": "hp_reuse_8eb6eddd298498fd0cfb145aca2efb70",
            "amount": 100,
            "currency": "GBP",
            "country": "GB",
            "amount_is_editable": true,
            "merchant_reference_id": "payment link",
            "redirect_url": "https://sbox.rapyd.ly/pay/9j3n8vrO",
            "template": {
                "error_payment_url": "https://www.rapyd.com",
                "complete_payment_url": "https://www.rapyd.com"
            },
            "customer": "",
            "status": "NEW",
            "language": "en",
            "merchant_color": "09a677",
            "merchant_logo": "https://iconslib.rapyd.net/merchant-logos/ohpc_8df12e51102d26bdc7e2321209878.jpg",
            "merchant_website": "https://www.rapyd.net",
            "merchant_customer_support": {
                "url": "https://www.rapyd.net",
                "email": "johndoe@rapyd.net",
                "phone_number": "55555555555"
            },
            "merchant_alias": "rapyd",
            "merchant_terms": "https://www.termsfeed.com/terms-conditions-generator/",
            "merchant_privacy_policy": "https://www.privacypolicies.com/blog/privacy-policy-template/",
            "page_expiration": 1699952336
        }
    }
  • Open amount

  • curl -X post
    https://sandboxapi.rapyd.net/v1/hosted/collect/payments
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '{
        "country": "GB",
        "currency": "GBP",
        "amount_is_editable": true,
        "merchant_reference_id": "payment link",
        "language": "EN",
        "checkout": {
            "error_payment_url": "https://www.rapyd.com",
            "complete_payment_url": "https://www.rapyd.com"
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "346a0171-ead9-48db-8765-d79c404cda56"
        },
        "data": {
            "id": "hp_reuse_8736c82276017fabf3953f34ae31e26a",
            "amount": null,
            "currency": "GBP",
            "country": "GB",
            "amount_is_editable": true,
            "merchant_reference_id": "payment link",
            "redirect_url": "https://sbox.rapyd.ly/pay/7VhtZQ2y",
            "template": {
                "error_payment_url": "https://www.rapyd.com",
                "complete_payment_url": "https://www.rapyd.com"
            },
            "customer": "",
            "status": "NEW",
            "language": "en",
            "merchant_color": "09a677",
            "merchant_logo": "https://iconslib.rapyd.net/merchant-logos/ohpc_8df12e51102d26bdc7e2321209878.jpg",
            "merchant_website": "https://www.rapyd.com",
            "merchant_customer_support": {
                "url": "https://www.rapyd.com",
                "email": "johndoe@rapyd.net",
                "phone_number": "55555555555"
            },
            "merchant_alias": "rapyd",
            "merchant_terms": "https://www.termsfeed.com/terms-conditions-generator/",
            "merchant_privacy_policy": "https://www.privacypolicies.com/blog/privacy-policy-template/",
            "page_expiration": 1699952396
        }
    }