Overview
The cards sandbox environment enables you to test your card issuance logic and product experience from your first day developing, without requiring any approval by our bank partner, issuance partner, or card network. While most endpoints are the same as the standard Bridge API, we do offer some additional features in order to allow you to test money movement in a safe and entirely programmatic fashion.
📘When interacting with the sandbox, all requests should go to https://api.sandbox.bridge.xyz
Integration
Setup
In order to start your integration, you will need to call the following API which bootstraps your sandbox environment and funds flow.
While you likely use a different funding strategy in production, top_up
is the only funding strategy supported in the sandbox.
Creating a card account
Please follow the steps outlined here to create a customer, using the sandbox API URL. Now you can use the follwoing API to create a card account in Sandbox:Simulate balance top up
In production, you could top up the card balance by sending funds to the address specified in thefunding_instructions
of the card account. As it is a normal crypto address, this could be done in a variety of ways, including using Bridge’s very own transfers and virtual accounts APIs.
In sandbox, you can simulate topping up the card balance with the following API:
Simulate card transactions
Simulate authorization and settlement
Scenario A cardholder dines at a restaurant with a bill totaling $100. The cardholder adds a $15 tip. The transaction is authorized at the point of sale for $100 and later settled for $$115. Step 1 Use the following API call to simulate the initial card authorization:Simulate incremental authorization
Scenario A cardholder checks into a hotel and the front desk puts a hold on the card for $200 for incidental charges. The cardholder incurs $20 charge for room service during their stay. At check-out, the charge for the card holder for the whole stay is $20 and the transaction is settled for $20. Step 1 Start with simulating a card preauthorization of the initial hold:authorization_id
from the response in Step 1, and use it as the original_authorization_id
by calling the following API:
authorization_id
from the response in Step 2, and use it as the original_authorization_id
by calling the following API:
authorization_id
from the response in Step 3, and use it as the authorization_id
in the call to the the following API:
Simulate authorization and reversal
Scenario A cardholder completes a $40 purchase at a retail store and returns the item shortly after. The merchant processes a full $40 reversal before the transaction is settled. Step 1 Use the following API call to simulate the initial card authorization:authorization_id
from the latest authorization response and use it as the original_authorization_id
by calling the following API: