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 with maximum payments defined

  • 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"
        },
        "max_payments":"3"
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "60d647c7-f7e5-4849-864c-92f94a072591"
        },
        "data": {
            "id": "hp_reuse_1921d09bf0fe23922887fb4282be51dc",
            "amount": 100,
            "currency": "GBP",
            "country": "GB",
            "amount_is_editable": false,
            "merchant_reference_id": "payment link",
            "template": {
                "error_payment_url": "https://www.rapyd.com",
                "complete_payment_url": "https://www.rapyd.com"
            },
            "customer": "",
            "requested_currency": null,
            "fixed_side": null,
            "max_payments": 3,
            "status": "NEW",
            "language": "en",
            "org_id": "b73f63ba-ee20-4070-a994-2c0d5f0c2f7c",
            "merchant_color": "",
            "merchant_logo": "",
            "merchant_website": "https://www.rapyd.net",
            "merchant_customer_support": {},
            "merchant_alias": "Doc Team",
            "merchant_terms": "",
            "merchant_privacy_policy": "",
            "page_expiration": 1716201269,
            "redirect_url": "https://qa.rapyd.ly/pay/STVh06Pg"
        }
    }
  • 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"
            },
            "max_payments": null,
            "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"
            },
            "max_payments": null,
            "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
        }
    }