> For the complete documentation index, see [llms.txt](https://docs.coridor.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coridor.fun/developers/integrate.md).

# Integrate

Coridor enables wallets to **on-ramp** (IDR → USDC) and **off-ramp** (USDC → IDR) on Stellar testnet using standard SEPs, with **Indonesian local payments** (VA, QRIS, e-wallet) via Xendit.

## Who this is for

* Stellar wallet teams adding IDR on/off-ramp for Indonesia
* Integrators using SEP-10 + SEP-24 (no proprietary Coridor SDK)

Non-Stellar wallets need a bridge to Stellar USDC first (out of scope here).

## Integration overview

| Step            | What happens                                                                          |
| --------------- | ------------------------------------------------------------------------------------- |
| Onboard         | Use public anchor at `sep.coridor.fun`                                                |
| Acquire USDC    | Testnet trustline + Demo Wallet / deposit flow                                        |
| Auth            | SEP-10 to **`sep.coridor.fun`**                                                       |
| Initiate        | SEP-24 → **Coridor interactive widget** (`api.coridor.fun`)                           |
| Customer info   | SEP-12 KYC (auto-accept on staging); bank details in widget for withdraw              |
| Close UI        | Close popup at **`pending_user_transfer_start`** (withdraw); deposit stays until paid |
| On-chain        | **Withdraw:** wallet sends USDC. **Deposit:** anchor sends USDC after IDR paid        |
| Status          | Poll anchor SEP-24                                                                    |
| Fiat completion | **Bank transfer IDR** (Xendit payout); `more_info_url` for status                     |

## Integration path (Stellar wallet)

1. [Acquire USDC & trustline](/developers/acquire-usdc-and-xlm.md)
2. [Authenticate (SEP-10)](/developers/authenticate-sep-10.md)
3. [Initiate transaction (SEP-24)](/developers/initiate-transaction-sep-24.md)
4. [Customer / bank info](/developers/customer-and-bank-info.md)
5. [Close interactive flow](/developers/close-interactive-flow.md)
6. [Send or receive USDC on-chain](/developers/send-receive-usdc.md)
7. [Poll transaction status](/developers/poll-transaction-status.md)
8. [Withdraw payout & more\_info](/developers/withdraw-payout-and-more-info.md)

Reference: [stellar.toml & SEP](/developers/stellar.toml-and-sep.md) · [HTTP API](/developers/http-api.md)

## Production endpoints

| Resource           | URL                                                   |
| ------------------ | ----------------------------------------------------- |
| Home domain        | `sep.coridor.fun`                                     |
| stellar.toml       | `https://sep.coridor.fun/.well-known/stellar.toml`    |
| SEP-10             | `https://sep.coridor.fun/auth`                        |
| SEP-24             | `https://sep.coridor.fun/sep24`                       |
| Interactive widget | `https://api.coridor.fun/sep24/interactive?token=...` |

## Transaction flow overview

```
1. SEP-10 authenticate
2. SEP-24 deposit or withdraw → receive interactive URL + transaction id
3. Open interactive URL (popup / webview)
4. User completes widget (pay IDR or enter bank details)
5. Close popup when pending_user_transfer_start (withdraw only)
6. Withdraw: wallet sends USDC with memo | Deposit: wait for anchor to send USDC
7. Poll SEP-24 until completed / error
```

## Sandbox (testnet)

* Network: **Test SDF Network**
* USDC issuer: `GATALTGTWIOT6BUDBCZM3Q4OQ4BO2COLOAZ7IYSKPLC2PMSOPPGF5V56`
* Xendit: development key → VA/QRIS use **Simulate** in widget
* Easiest wallet: [Stellar Demo Wallet](https://demo-wallet.stellar.org/) with home domain `sep.coridor.fun`

## SDK

Use the [Stellar TypeScript Wallet SDK](https://developers.stellar.org/docs/build/apps/wallet/intro):

```bash
yarn add @stellar/typescript-wallet-sdk
```

## Resources

* [Stellar SEP-1 (TOML)](https://developers.stellar.org/docs/learn/fundamentals/stellar-ecosystem-proposals)
* [SEP-10](https://developers.stellar.org/docs/build/apps/wallet/sep10)
* [SEP-24](https://developers.stellar.org/docs/build/apps/wallet/sep24)
* [Anchor Platform](https://developers.stellar.org/docs/platforms/anchor-platform)
* Coridor user flows: [deposit](/user/deposit.md) · [withdraw](/user/withdraw.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coridor.fun/developers/integrate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
