Hosted Agreements
The BVNK Agreements API enables you to create and manage agreements between BVNK and your customers (referred to as Embedded Partner Customers). This document outlines the core endpoints, request/response formats, and example usage.
Early Access
Please note that this endpoint is currently in early access, and it may undergo changes as we continue to improve and refine the functionality.
This section describes the BVNK Hosted Agreements redirect flow, enabling your customers (Embedded Partner Customers) to review and accept required agreements seamlessly.
Overall Flow
Create a Hosted Agreement Session
You call POST /customers/agreement/session
to generate a unique signing session. BVNK responds with a hostedUrl
where your customer can sign the agreements.
Open BVNK’s Agreement Page (1st redirect)
- Your front end redirects the user to the returned
hostedUrl
concantenated withredirectUri
parameter. - The user sees a public page with all of the necessary agreements and buttons to Submit or Cancel.
Sign the Agreements
- When the user clicks Submit, status session will be changed to
SIGNED
automatically. This finalises the signature of the session.
Complete the Process (2nd redirect)
- The BVNK-hosted page then issues a 302 redirect back to your redirectUri. This ensures the user is returned to your application with the updated session and status set to either
SIGNED
orDECLINED
.
Create the Embedded Customer
- Finally, if the user status session is
SIGNED
you include thesignedAgreementSessionReference
from theSIGNED
session in aPOST /customers
call to create a new Embedded Customer.
Create a Hosted Agreement Session
Request
Environment | Endpoint |
---|---|
Production | POST https://api.bvnk.com/platform/v1/customers/agreement/sessions |
Sandbox | POST https://api.sandbox.bvnk.com/platform/v1/customers/agreement/sessions |
Request Body
Parameter | Type | Description | Required |
---|---|---|---|
countryCode | string | Customer’s ISO country code. Example: "US" | Yes |
Example Request
{
"countryCode": "US"
}
Response
Parameter | Type | Description |
---|---|---|
reference | string | Unique identifier for the agreement session. |
status | string | Agreement status (PENDING , SIGNED , DECLINED ). |
expiresOn | string | ISO8601 timestamp when the session expires. |
hostedUrl | string | URL to redirect the customer to for agreement signing. |
Example Response
{
"reference": "92c9ae05-5b58-4b16-990a-19adfb8101cf",
"status": "PENDING",
"expiresOn": "2025-05-06T07:32:29.829482151Z",
"hostedUrl": "https://signup.sandbox.bvnk.com/agreements?session=92c9ae05-5b58-4b16-990a-19adfb8101cf"
}
Key Considerations
- Ensure your frontend handles session expirations appropriately based on the
expiresOn
field. - Clearly inform users that agreements are legally binding upon acceptance.
- Store the session reference securely, as it is necessary for subsequent customer creation.
Updated 13 days ago