Three steps add RocketRamp payments to your site: no script tag, no SDK, and no other checkout page. You need a backend server (any language), HTTPS, and a database. Before you start, finish the setup and credentials.
Create the payment (Prefill API)
Your server calls the Prefill API with the recipient email, and your Merchant ID and API Key in the headers. It returns an embed_code. Save it next to the customer and the order, then return it to the page.
curl -X POST https://api.vantack.com/v1/merchants/embed/prefill \
-H "Merchant-ID: YOUR_MERCHANT_ID" \
-H "API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"payments@your-business.example.com","memo":"Deposit for order 1234"}'
# {"embed_code":"ca678360-5ae6-4f6b-be1d-8583c02447cb","status":"created"}Open the checkout
Your page opens the address below with a new embed_code for every payment. On desktop it opens in a modal on your page. On phones it opens as its own page. The recipient is already filled in.
https://app.myrocketramp.com/embed/<embed_code>Receive the webhook and credit once
RocketRamp sends a signed webhook to your server when the transfer completes. Verify the signature, find the customer by embed_code, credit them once per transfer_id, and reply 200.
signature = base64( HMAC_SHA256( signing_secret, X-Webhook-Timestamp + "." + raw_body ) )BEGIN;
SELECT customer_id FROM rr_checkouts WHERE embed_code = :embed_code FOR UPDATE;
INSERT INTO rr_credits (transfer_id, embed_code, customer_id, amount)
VALUES (:transfer_id, :embed_code, :customer_id, :amount); -- UNIQUE (transfer_id)
UPDATE wallets SET balance = balance + :amount WHERE customer_id = :customer_id;
UPDATE rr_checkouts SET status = 'paid', transfer_id = :transfer_id WHERE embed_code = :embed_code;
COMMIT;
-- duplicate key on transfer_id => ROLLBACK, reply 200- Call the Prefill API from your server, never from the browser.
- Open the checkout at
/embed/<embed_code>with a new code for every payment. - Credit the customer only from the webhook, only on
status: "success", and only once pertransfer_id.
Paying users
To send money from your merchant wallet to a user's RocketRamp wallet, for example a player's winnings, use Disbursements.