Show sandbox cURL quick start20 examples
Replace <YOUR_SANDBOX_API_KEY> and placeholder IDs with your sandbox values. Every JSON response includes meta.requestId; include it when reporting an integration issue.
Sandbox: https://api.globalx.roecny.com. Production: https://api-globalx.roecny.com. Use the matching API key and IDs. Samples below use Sandbox; keep credentials on your server. Generate a new idempotency key only for a new operation or a corrected request after a confirmed rejection, not to retry a payment whose result is unknown.
1. Check API key accessView endpoint
export GX_API_BASE="https://api.globalx.roecny.com"
export GX_API_KEY="<YOUR_SANDBOX_API_KEY>"
curl -sS "$GX_API_BASE/v1/business/access" \
-H "x-api-key: $GX_API_KEY"2. Register a business userView endpoint
curl -sS -X POST "$GX_API_BASE/v1/business/users/register" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"email": "applicant@example.sg",
"firstName": "Mei",
"lastName": "Tan",
"companyName": "Example Trading Pte. Ltd.",
"registeredCountry": "SG",
"phoneCountryCode": "65",
"phoneNumber": "88889999"
}'3. Get onboarding requirementsView endpoint
curl -sS "$GX_API_BASE/v1/business/onboarding/requirements?registeredCountry=SG" \
-H "x-api-key: $GX_API_KEY"4. Create an onboarding applicationView endpoint
curl -sS -X POST "$GX_API_BASE/v1/business/onboarding/applications" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"userEmail": "applicant@example.sg",
"businessName": "Example Trading Pte. Ltd.",
"registeredCountry": "SG",
"website": "https://www.example.sg",
"v5Payload": {
"type": "corporate",
"kycType": "full",
"region": "SG",
"registeredCountry": "SG",
"businessType": "private_company",
"businessName": "Example Trading Pte. Ltd.",
"tradeName": "Example Trading",
"businessRegistrationNumber": "202605020001K",
"registeredDate": "2020-07-20",
"website": "https://www.example.sg"
}
}'5. Upload an onboarding documentView endpoint
export APPLICATION_ID="<APPLICATION_ID>"
curl -sS -X POST "$GX_API_BASE/v1/business/onboarding/applications/$APPLICATION_ID/documents" \
-H "x-api-key: $GX_API_KEY" \
-F "type=business_registration_doc" \
-F "file=@/path/to/business-registration.pdf;type=application/pdf"6. Submit onboarding for reviewView endpoint
curl -sS -X POST "$GX_API_BASE/v1/business/onboarding/applications/$APPLICATION_ID/submit-kyb-kyc" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>"7. List wallets, receiving accounts and transactionsView endpoint
export CUSTOMER_HASH_ID="<CUSTOMER_HASH_ID>"
export WALLET_HASH_ID="<WALLET_HASH_ID>"
curl -sS "$GX_API_BASE/v1/business/wallets?customerHashId=$CUSTOMER_HASH_ID" \
-H "x-api-key: $GX_API_KEY"
curl -sS "$GX_API_BASE/v1/business/accounts?customerHashId=$CUSTOMER_HASH_ID&walletHashId=$WALLET_HASH_ID" \
-H "x-api-key: $GX_API_KEY"
curl -sS "$GX_API_BASE/v1/business/transactions?customerHashId=$CUSTOMER_HASH_ID&walletHashId=$WALLET_HASH_ID¤cy=USD&dateFrom=2026-07-01&dateTo=2026-07-31" \
-H "x-api-key: $GX_API_KEY"8. Open a receiving accountView endpoint
# Use the customer's onboarding region. Read the returned options first.
curl -sS "$GX_API_BASE/v1/business/reference/receiving-account-rails?region=SG" \
-H "x-api-key: $GX_API_KEY"
# Replace bankName and currencyCode with a pair returned by that catalog.
curl -sS -X POST "$GX_API_BASE/v1/business/accounts/payment-ids" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"customerHashId": "<CUSTOMER_HASH_ID>",
"walletHashId": "<WALLET_HASH_ID>",
"payload": {
"accountCategory": "SELF_FUNDING_ACCOUNT",
"bankName": "<BANK_NAME_FROM_CATALOG>",
"currencyCode": "<CURRENCY_CODE_FROM_SAME_OPTION>"
}
}'9. Create an FX quoteView endpoint
curl -sS -X POST "$GX_API_BASE/v1/business/fx/quotes" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"walletHashId": "<WALLET_HASH_ID>",
"payload": {
"quoteType": "balance_transfer",
"sourceCurrencyCode": "USD",
"destinationCurrencyCode": "SGD",
"sourceAmount": 100,
"lockPeriod": "5_mins",
"conversionSchedule": "immediate",
"executionType": "at_conversion_time"
}
}'10. Create a recipientView endpoint
# Check the selected route and load its required fields before showing the form.
curl -sS "$GX_API_BASE/v1/business/corridors?customerHashId=$CUSTOMER_HASH_ID&destinationCountry=SG&destinationCurrency=USD&payoutMethod=SWIFT&beneficiaryAccountType=CORPORATE&customerType=CORPORATE" \
-H "x-api-key: $GX_API_KEY"
curl -sS "$GX_API_BASE/v1/business/beneficiaries/validation-schemas?customerHashId=$CUSTOMER_HASH_ID¤cyCode=USD&destinationCountry=SG&destinationCurrency=USD&payoutMethod=SWIFT&beneficiaryAccountType=CORPORATE&customerType=CORPORATE" \
-H "x-api-key: $GX_API_KEY"
# Save only when the route is available and the required fields are complete.
curl -sS -X POST "$GX_API_BASE/v1/business/beneficiaries" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"customerHashId": "<CUSTOMER_HASH_ID>",
"payload": {
"beneficiaryName": "EXAMPLE GLOBAL LTD",
"beneficiaryAccountType": "Corporate",
"beneficiaryCountryCode": "SG",
"destinationCountry": "SG",
"destinationCurrency": "USD",
"payoutMethod": "SWIFT",
"beneficiaryAccountNumber": "123456789",
"beneficiaryBankAccountType": "Current",
"beneficiaryBankName": "DBS Bank Ltd",
"routingCodeType1": "SWIFT",
"routingCodeValue1": "DBSSSGSG",
"beneficiaryAddress": "12 Marina Boulevard",
"beneficiaryCity": "Singapore",
"beneficiaryPostcode": "018982",
"beneficiaryEmail": "treasury@example.sg",
"remitterBeneficiaryRelationship": "SUPPLIER"
}
}'11. Check the recipient and validate a payoutView endpoint
export BENEFICIARY_ID="<BENEFICIARY_HASH_ID>"
# Check before any payout-related FX. Stop if this requires an address update.
curl -sS -X POST "$GX_API_BASE/v1/business/payouts/recipient-check" \
-H "x-api-key: $GX_API_KEY" \
-H "content-type: application/json" \
--data-raw '{
"customerHashId": "<CUSTOMER_HASH_ID>",
"payload": { "beneficiary": { "id": "'"$BENEFICIARY_ID"'" } }
}'
# Continue only after recipient-check succeeds and sufficient funds are available.
curl -sS -X POST "$GX_API_BASE/v1/business/payouts/validate" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"walletHashId": "<WALLET_HASH_ID>",
"payload": {
"beneficiary": { "id": "'"$BENEFICIARY_ID"'" },
"payout": { "sourceCurrency": "USD", "sourceAmount": 100.25 },
"purposeCode": "IR01801",
"sourceOfFunds": "Corporate Account"
}
}'12. Submit the validated payoutView endpoint
# Generate once for this payment. Keep this value for an identical retry.
export PAYOUT_IDEMPOTENCY_KEY="<ONE_UUID_FOR_THIS_PAYMENT>"
# Run only after successful validation and the customer's confirmation.
curl -sS -X POST "$GX_API_BASE/v1/business/payouts" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: $PAYOUT_IDEMPOTENCY_KEY" \
-H "content-type: application/json" \
--data-raw '{
"walletHashId": "<WALLET_HASH_ID>",
"payload": {
"beneficiary": { "id": "'"$BENEFICIARY_ID"'" },
"payout": { "sourceCurrency": "USD", "sourceAmount": 100.25 },
"purposeCode": "IR01801",
"sourceOfFunds": "Corporate Account"
}
}'13. Wallet-to-wallet transfer by business emailView endpoint
curl -sS -X POST "$GX_API_BASE/v1/business/transfers/recipient-lookup" \
-H "x-api-key: $GX_API_KEY" \
-H "content-type: application/json" \
--data-raw '{
"recipientEmail": "recipient@example.hk",
"currency": "USD"
}'
curl -sS -X POST "$GX_API_BASE/v1/business/transfers" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"walletHashId": "<SOURCE_WALLET_HASH_ID>",
"payload": {
"recipientEmail": "recipient@example.hk",
"currency": "USD",
"destinationAmount": 100,
"customerComments": "Invoice 1001",
"purposeCode": "IR01802"
}
}'14. Configure webhook callbacksView endpoint
curl -sS -X POST "$GX_API_BASE/v1/business/webhook-endpoints" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"label": "Operations callback",
"url": "https://partner.example.com/globalx/webhooks",
"topics": ["*"]
}'
curl -sS "$GX_API_BASE/v1/business/webhook-endpoints" \
-H "x-api-key: $GX_API_KEY"
curl -sS "$GX_API_BASE/v1/business/webhook-deliveries" \
-H "x-api-key: $GX_API_KEY"15. Complete a saved recipient addressView endpoint
curl -sS "$GX_API_BASE/v1/business/beneficiaries/$BENEFICIARY_ID?customerHashId=$CUSTOMER_HASH_ID" \
-H "x-api-key: $GX_API_KEY"
# Keep the existing name/country/currency/method. Supply the real recipient address.
# Never copy masked bank or address values into the update.
curl -sS -X PUT "$GX_API_BASE/v1/business/beneficiaries/$BENEFICIARY_ID" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"customerHashId": "<CUSTOMER_HASH_ID>",
"payload": {
"beneficiaryName": "<EXISTING_RECIPIENT_NAME>",
"beneficiaryCountryCode": "SG",
"destinationCurrency": "USD",
"payoutMethod": "SWIFT",
"beneficiaryAddress": "12 Marina Boulevard",
"beneficiaryCity": "Singapore",
"beneficiaryPostcode": "018982"
}
}'
# Re-run recipient-check and payout validation after the update succeeds.16. Request and download a monthly statementView endpoint
# Requires statement access enabled for your integration.
curl -sS -X POST "$GX_API_BASE/v1/business/statements" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{
"customerHashId": "<CUSTOMER_HASH_ID>",
"walletHashId": "<WALLET_HASH_ID>",
"month": "2026-09",
"timezone": "Asia/Singapore",
"currencies": ["USD", "SGD"]
}'
export STATEMENT_ID="<RETURNED_STATEMENT_ID>"
curl -sS "$GX_API_BASE/v1/business/statements/$STATEMENT_ID" \
-H "x-api-key: $GX_API_KEY"
# Download only after status=issued. The response is a PDF, not JSON.
curl --fail-with-body -sS "$GX_API_BASE/v1/business/statements/$STATEMENT_ID/download" \
-H "x-api-key: $GX_API_KEY" -o monthly-statement.pdf17. Simulate approval of a submitted application (Sandbox only)View endpoint
# Sandbox only. Requires a submitted application owned by your integration.
curl -sS -X POST "https://api.globalx.roecny.com/v1/business/simulations/onboarding/$APPLICATION_ID/transition" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{"payload":{"nextAction":"clear"}}'
# Refresh the application, then list its wallets. Do not submit a new draft.
curl -sS "https://api.globalx.roecny.com/v1/business/onboarding/applications/$APPLICATION_ID" \
-H "x-api-key: $GX_API_KEY"18. Advance a payout past compliance (Sandbox only)View endpoint
# Use only for a test payout awaiting compliance. No new payment is created.
curl -sS -X POST "https://api.globalx.roecny.com/v1/business/simulations/transactions/$SYSTEM_REFERENCE_NUMBER/transition" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{"payload":{"nextStatus":"COMPLIANCE_COMPLETED"}}'
curl -sS "https://api.globalx.roecny.com/v1/business/payouts/$SYSTEM_REFERENCE_NUMBER/audit?customerHashId=$CUSTOMER_HASH_ID&walletHashId=$WALLET_HASH_ID" \
-H "x-api-key: $GX_API_KEY"19. Add test wallet funds with PREFUND (Sandbox example)View endpoint
# This example is for Sandbox balance testing, not an external bank pay-in.
curl -sS -X POST "https://api.globalx.roecny.com/v1/business/wallets/$WALLET_HASH_ID/fund" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{"customerHashId":"<CUSTOMER_HASH_ID>","payload":{"amount":10,"sourceCurrencyCode":"USD","destinationCurrencyCode":"USD","fundingChannel":"PREFUND","description":"Sandbox funding test"}}'20. Simulate a receiving-account pay-in (Sandbox only)View endpoint
# Use an active account owned by your integration; match its bank and currency.
# Keep all three unique references unchanged on retries of the same test.
curl -sS -X POST "https://api.globalx.roecny.com/v1/business/funding/simulate-incoming" \
-H "x-api-key: $GX_API_KEY" \
-H "idempotency-key: <ONE_UUID_FOR_THIS_OPERATION>" \
-H "content-type: application/json" \
--data-raw '{"customerHashId":"<CUSTOMER_HASH_ID>","walletHashId":"<WALLET_HASH_ID>","payload":{"amount":1,"currency":"SGD","country":"SG","bankSource":"DBS_SG","virtualAccountNumber":"<YOUR_SGD_ACCOUNT_NUMBER>","bankReferenceNumber":"<UNIQUE_TEST_REFERENCE>","transactionId":"<UNIQUE_TEST_REFERENCE>","type":"CREDIT","instructionType":"PROCESS","remitterName":"Test Sender","narrative":"Sandbox pay-in test"}}'
# Acceptance is not a posted credit. Check the ledger and status webhooks.
curl -sS "https://api.globalx.roecny.com/v1/business/transactions?customerHashId=$CUSTOMER_HASH_ID&walletHashId=$WALLET_HASH_ID&refresh=live" \
-H "x-api-key: $GX_API_KEY"