Skip to main content

Documentation

Subscription - Hosted Page

Defines a customer-facing page for creating periodic payments.

The subscription hosted page collects personal identifying information (PII) from the customer and creates a subscription that charges the customer periodically.

Subscription - Hosted Page Message Sequences

Diagrams and steps for using a hosted page to create a recurring payment for a service.

Collects personal identifying information (PII) from the customer and creates a subscription with payment from a card.

Prerequisites

Note

Subscriptions automatically create draft invoices during each billing cycle. Invoice payments are processed immediately when simultaneous_invoice is set to true. When simultaneous_invoice is undefined or set to false, the first invoice payment is processed one hour after the first invoice is created.

Create a Subscription by Hosted Page
Card Payment with Automatic Capture

This diagram shows the sequence of events when a subscription is created using a card with authorization and capture occurring simultaneously. The fraud check illustrated here is part of all card payment requests.

  1. The client sends a Create Subscription by Hosted Page request to Rapyd.

  2. Rapyd sends a response containing a redirect URL to the client.

  3. The client sends the URL to the customer.

  4. The customer completes the payment information on the hosted page and submits it directly to Rapyd.

  5. Rapyd sends Webhook - Subscription Created to the client. The status of the subscription is set to active.

  6. Rapyd sends Webhook - Invoice Created to the client. The status of the invoice is set to draft.

  7. Rapyd sends New Cycle Started Webhook to the client.

  8. Rapyd sends Webhook - Invoice Finalized to the client. The status of the invoice is set to open.

  9. Rapyd requests a fraud check and payment from the card network.

  10. The card network approves the card and transfers the funds to Rapyd.

  11. Rapyd credits the designated wallet and sends Webhook - Payment Completed to the client. The status of the payment is set to CLO.

  12. Rapyd sends Webhook - Payment Succeeded to the client.

  13. Rapyd sends Webhook - Invoice Payment Created to the client.

  14. Rapyd sends Webhook - Invoice Payment Succeeded to the client. The status of the invoice is set to paid and the status of the payment is set to CLO.

Subscription with a Trial Period

This diagram shows the sequence of events when a subscription with a trial period is created via a hosted page. See Subscription Object - Hosted Page.

During Subscription Creation and Trial Period
  1. The client sends a Create Subscription by Hosted Page request to Rapyd.

  2. Rapyd sends a response containing a redirect URL to the client.

  3. The client sends the hosted page URL to the customer.

  4. The customer completes the payment information on the hosted page and submits it directly to Rapyd.

  5. Rapyd sends Webhook - Subscription Created to the client. The status of the subscription is set to trialing.

  6. Rapyd sends Webhook - Invoice Created to the client. The status of the invoice is set to draft.

  7. Rapyd sends New Cycle Started Webhook to the client.

  8. Rapyd sends Webhook - Invoice Payment Succeeded to the client. The status of the invoice is set to paid with the amount set to zero.

  9. Three days before the end of the trial period, Rapyd sends Webhook - Trial Nearing End to the client.

When Trial Period Ends
  1. At the end of the trial period, Rapyd sends New Cycle Started Webhook to the client. The status of the subscription is set to active.

  2. Rapyd sends Webhook - Invoice Created to the client. The status of the invoice is set to draft.

  3. At the end of the trial period, Rapyd sends Webhook - Invoice Finalized to the client. The status of the invoice is set to open.

  4. Rapyd requests a fraud check and payment from the card network.

  5. The card network approves the card and transfers the funds to Rapyd.

  6. Rapyd credits the designated wallet and sends Webhook - Payment Completed to the client. The status of the payment is set to CLO.

  7. Rapyd sends Webhook - Payment Succeeded to the client.

  8. Rapyd sends Webhook - Invoice Payment Created to the client.

  9. Rapyd sends Webhook - Invoice Payment Succeeded to the client. The status of the invoice is set to paid and the status of the payment is set to CLO.

Card Payment with 3DS Authentication

This diagram shows the sequence of events when creating a subscription via hosted page with a card. After 3DS authentication, the payment proceeds to successful completion.

During Subscription Creation and 3DS Authentication
  1. The client sends a Create Subscription by Hosted Page request to Rapyd.

  2. Rapyd sends a response containing a redirect URL to the client.

  3. The client sends the URL to the customer.

  4. The customer completes the payment information on the hosted page and submits it directly to Rapyd.

  5. Rapyd sends URL of 3DS authentication site to the customer.

  6. The customer successfully completes the authentication requirements.

  7. The 3DS authentication site notifies Rapyd that the customer is authenticated.

After 3DS Authentication
  1. Rapyd sends Webhook - Subscription Created to the client. The status of the subscription is set to active.

  2. Rapyd sends Webhook - Invoice Created to the client. The status of the invoice is set to draft.

  3. Rapyd sends New Cycle Started Webhook to the client.

  4. Rapyd sends Webhook - Invoice Finalized to the client. The status of the invoice is set to open.

  5. Rapyd requests a payment from the card network.

  6. The card network approves the payment and transfers the funds to Rapyd.

  7. Rapyd credits the designated wallet and sends Webhook - Payment Completed to the client. The status of the payment is set to CLO.

  8. Rapyd sends Webhook - Payment Succeeded to the client.

  9. Rapyd sends Webhook - Invoice Payment Created to the client.

  10. Rapyd sends Webhook - Invoice Payment Succeeded to the client. The status of the invoice is set to paid.