Your first sandbox transfer

This quickstart walks you through one transfer in the PayMitto Sandbox, from your first API call to a status update. It uses the Web SDK, and the backend steps are the same if you're building with a native SDK. Sandbox transfers don't move real money, so you can try things freely.

Before you begin

Before you start, make sure you have the following in place:

What you'll do

Here's what you'll do on this page:

  1. Get a client level access token.
  2. Create a sender.
  3. Request an SLA token.
  4. Launch the Web SDK.
  5. Create the transfer.
  6. Report the result to the SDK.
  7. Receive a status update.
  8. Try a failure.

1. Get a client level access token

Call Get Access Token from your backend with your client_id and client_secret, without a sender_id. The expires_in value in the response tells you how long the token is valid, so request a new one before it expires. See Web SDK authentication.

2. Create a sender

Call Get Sender Fields to see which fields to collect, then Create Sender. Save the senderId with your account holder's record. See Create senders.

3. Request an SLA token

Call POST /v1/oauth/sla-token with your client level access token and a body of {"senderId": "..."}. The response contains a slaToken that is short-lived and single-use, so request it right before you launch the SDK. See Web SDK authentication.

4. Launch the Web SDK

Add the snippet and iframe to your page, then call window.rremit.init(...) with the SLA token. See Web SDK and the Snippet API reference. Pick a destination, amount, and recipient in the SDK, then select Send transfer.

5. Create the transfer

The SDK calls your create-transfer callback with the transfer details. On your backend:

  1. Look up the quote by quoteHistoryId with Get Quote Details, so you work from PayMitto's price rather than values from the browser.
  2. Check that the account holder has funds to cover totalCost.
  3. Get a sender level access token and call Create Transfer.

See Posting a transfer for each request.

6. Report the result to the SDK

Call window.rremit.completed(transferId) to show the confirmation screen, or window.rremit.failed(error) to show an error. See Error handling for what the account holder sees.

7. Receive a status update

As the transfer moves through its statuses, PayMitto sends updates to your endpoint. See Transfer status updates.

8. Try a failure

Repeat the flow with one of the test triggers, such as a sender named Jennifer Doe to simulate a 504 Gateway Timeout on Create Transfer. See Test case simulation for the full list.

The flow at a glance

sequenceDiagram
    participant SDK as PayMitto SDK
    participant FE as Your frontend
    participant BE as Your server
    participant API as PayMitto API
    BE->>API: Get access token (client level)
    BE->>API: Create Sender
    API-->>BE: senderId
    BE->>API: POST /v1/oauth/sla-token
    API-->>BE: slaToken
    BE-->>FE: slaToken
    FE->>SDK: rremit.init(...)
    SDK->>FE: create-transfer callback
    FE->>BE: Transfer details
    BE->>API: Get Quote Details, then Create Transfer
    API-->>BE: transferId
    BE-->>FE: transferId
    FE->>SDK: rremit.completed(transferId)
    API-->>BE: Status updates

Next steps

Once you've finished here, these pages are good places to go next:


Did this page help you?