Testing & Sandbox
Test your Obligo integration end to end in the sandbox, then move it to production.
The sandbox is a separate Obligo environment where you build and test your integration before you set it up in production. It has its own data, API keys and hosts. Bank linking and ACH payments run in test mode there, so use the test values below instead of real bank accounts and cards.
Hosts
| Purpose | Sandbox | Production |
|---|---|---|
| API | https://api.sandbox.myobligo.com | https://api.obligo.com |
| Obligo dashboard, for apps and webhook endpoints | https://management.sandbox.myobligo.com | https://management.obligo.com |
| SDK script | https://cdn.sandbox.myobligo.com/libraries/obligoSDK.min.js | https://cdn.obligo.com/libraries/obligoSDK.min.js |
| Renter app, shown in the move-in widget | https://tenant.sandbox.myobligo.com | https://tenant.obligo.com |
API keys, session tokens, webhook endpoints and data exist only in the environment where you created them. For a sandbox account, contact Obligo.
Check that you can reach the sandbox API with GET /health:
curl https://api.sandbox.myobligo.com/health \
-u "$CLIENT_ID:$CLIENT_SECRET" \
-H "Obligo-Version: 1.2"{
"status": "OK"
}Test values
Bank accounts
In the bank-linking window, choose Regions Bank, then sign in with one of these usernames and any password:
| Username | Outcome |
|---|---|
custom_obq | The bank account qualifies. |
custom_nobq | The bank account doesn't qualify. |
Cards
Use any future expiry date.
| Card number | Outcome |
|---|---|
4242 4242 4242 4242 | The card qualifies. |
4000 0000 0000 0341 | The card doesn't qualify. |
Email codes
The renter confirms their email with a code that Obligo emails to them, so give test renters email addresses whose inboxes you can open.
Run a lease end to end
- In the sandbox Obligo dashboard, create an app on API version
1.2and a webhook endpoint for it. See Webhooks. - If you're a platform, create a connected account and complete its account setup through the API.
- Create a property, a renter and a lease that links them, with
POST /properties,POST /rentersandPOST /leases. - Confirm the lease is eligible:
GET /leases/{leaseId}shows the product'sstatusasEligible. If it'sNotEligible,eligibility.restrictionslists the rules the lease doesn't meet. Each later status change sendslease.availableProducts.statusChanged. - Open the move-in widget from the sandbox SDK script with a renter session, or follow the invitation email. Complete the flow with the test values above.
- When the renter is approved, expect
lease.availableProducts.statusChangedwithstatusActive, andlease.financials.securityItemCommitted. If qualification is declined, expectstatusChangedwithDeclined, andlease.availableProducts.optedOut. - At move-out, create the charges and commit them with
POST /leases/{leaseId}/commit-financials. Obligo sends nolease.financials.*webhooks for them, because an API app made the change, so retrieve them withGET /leases/{leaseId}/financials. When Obligo pays out the charges, the payout's balance item sendslease.financials.balanceItemInProgress, thenlease.financials.balanceItemSettledorlease.financials.balanceItemFailed.
Go live
- Contact Obligo for production access.
- In the production Obligo dashboard,
https://management.obligo.com, create a new app. It has new API keys: sandbox keys don't work in production. - Create your webhook endpoints again on the production app. Each one has a new signing secret.
- Switch your API base URL, SDK script and Content Security Policy to the production hosts.
In production, renters qualify and pay with their real bank accounts and cards.
Common pitfalls
| Pitfall | Fix |
|---|---|
| Mixing environments | Use API keys, session tokens, data and the SDK script from the same environment. |
An app on API version 1 or 1.1 | Such apps receive only the lease.financials.* events. Update the app to 1.2 on its page in Developers. |
| Waiting for webhooks about API changes | Obligo sends no lease.financials.* webhooks for changes any API app makes. Retrieve the lease's financials with GET /leases/{leaseId}/financials. |
| A lease without a property | It sends no lease or financial events. Set the lease's propertyId. |
| A rejected webhook URL | Use https and a hostname that resolves to a public IP address, with no username or password. To test on your machine, use a public HTTPS tunnel instead of localhost. |
| A signature that doesn't match | Compute it over the raw request body, with t exactly as sent and the endpoint's signing secret, not your client secret. |
| Failed deliveries | Return a 2xx within 10 seconds, and process the event after you respond. |