Skip to main content
Payouts quickstart hero This quickstart covers an example of sending a prefunded cross-border payout for a business customer on an unregulated platform.

Understanding Entity Mapping for B2B Payouts

In this guide, the entities map as follows: Flow: Your customer (a business) funds their internal account → uses your platform to send payments → to their vendors’ external bank accounts.

Get API credentials

Create Sandbox API credentials in the dashboard, then set environment variables for local use.
Use Basic Auth in cURL with -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET".

Onboard a Customer

Onboard a customer using the hosted KYC/KYB link flow. Call the /customers/kyc-link endpoint with your redirectUri parameter to generate a hosted KYC URL for your customer.
The redirectUri parameter is embedded in the generated KYC URL and will be used to automatically redirect the customer back to your application after they complete verification.
Response:

Redirect Customer

Redirect your customer to the returned kycUrl where they can complete their identity verification in the hosted interface.
The KYC link is single-use and expires after a limited time period for security.

Customer Completes Verification

The customer completes the identity verification process in the hosted KYC interface, providing required documents and information.
The hosted interface handles document collection, verification checks, and compliance requirements automatically.
After verification processing, you’ll receive a KYC status webhook notification indicating the final verification result.

Redirect back to your app

Upon successful KYC completion, the customer is automatically redirected to your specified redirectUri URL. On your redirect page, handle the completed KYC flow and integrate the new customer into your application.
The customer account will be automatically created by the system upon successful KYC completion. You can identify the new customer using your platformCustomerId or other identifiers.

Get the Customer’s Internal Account

Once the customer is created, internal accounts will automatically be created on their behalf. Get their internal account in the desired currency for funding instructions.
Response:
The fundingPaymentInstructions provide the bank account details and reference code needed to fund this internal account via ACH or wire transfer from the customer’s bank. It might also include stablecoin funding details for instant funding of the internal account.

Fund the Internal Account

For this quickstart, we’ll fund the account using the /sandbox/internal-accounts/{accountId}/fund endpoint to simulate receiving funds. In production, your customer would initiate a transfer from their bank or wallet to the account details provided in the funding instructions, making sure to include the reference code FUND-ABC123 in the transfer memo if applicable.
During the funding process, you’ll receive transaction status update webhooks. Webhook Notification:
The internal account now has a balance of $1,000.00 (100000 cents).

Add the beneficiary as an External Account

Now add the beneficiary bank account where you want to send the funds. In this example, we’ll add a Mexican CLABE account as the external account.
Response:

Create a quote

Create a quote to lock in the exchange rate, fees, and get the transfer details.
Amount Locking: You can lock either the sending amount (SENDING) or receiving amount (RECEIVING). In this example, we’re locking the sending amount to exactly $500.00 USD (50000 cents). Alternatively, you can lock the receiving amount to ensure that the receiver receives exactly some amount of the destination currency.
Response:
The quote shows:
  • Sending: $500.00 USD (including $2.50 fee)
  • Receiving: $8,612.50 MXN
  • Exchange rate: 17.25 MXN per USD
  • Quote expires: In 5 minutes
Quotes typically expire in 1-5 minutes. Make sure to execute the quote before the expiresAt timestamp, or you’ll need to create a new quote.

Execute the quote

Execute the quote to initiate the transfer from the internal account to the external bank account.
Response:
The quote status changes to PROCESSING and the transfer is initiated. You’ll receive a webhook when the transfer completes: Completion Webhook:
Congrats, you’ve sent a real time cross-border payout to a Mexican bank account!