Reusable deposit addresses
A reusable deposit address is a named address that belongs to you and can be paid any number of times. It does not expire and has no amount attached.
Typical uses are one address per customer, so that every payment to it is credited to that customer’s balance, or one address per purpose.
Deposit address or invoice?
Section titled “Deposit address or invoice?”| Invoice | Reusable deposit address | |
|---|---|---|
| Amount | Fixed when the invoice is created or when the payer selects an option. | Any amount. |
| Lifetime | Expires. | Stays active until you disable it. |
| Checkout page | Yes. | No. You show the address yourself. |
| Paid or underpaid | cTpeWay works it out. | You decide what each payment means. |
| Address | A new one for each invoice option. | The same one every time. |
Creating one
Section titled “Creating one”You create a deposit address with a name and one of three ways to say where it should exist:
| Field | Result |
|---|---|
network |
An address on that one network, for example Tron. |
networks |
An address on each of several networks of the same family. |
family |
An address on every network of that family that you have enabled. For evm it is one address that is valid on all of them, such as Ethereum and BNB Smart Chain. |
The answer contains one object for each network, each with its own id. On EVM networks they all carry the same address. A payment refers to the object of the network it arrived on, so you always know which network was used.
Names are unique on each network. Creating a name that already exists returns the existing address instead of making a second one, so the call is safe to repeat.
curl -X POST "https://api.ctpeway.com/v1/deposit_addresses" \ -H "Authorization: Bearer $CTPEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Customer 42", "network": "tron" }'const address = await ctpeway.depositAddresses.create({ name: 'Customer 42', network: 'tron' });console.log(address.address);What happens when it is paid
Section titled “What happens when it is paid”Each transfer to a deposit address becomes a payment, just as with an invoice:
- The payment is detected and you receive deposit.payment_detected.
- It is confirmed and you receive deposit.payment_confirmed. This is the moment to credit your customer.
- The funds are released to your master wallet and you receive deposit.payment_released.
The same 0.5% platform fee applies, charged the same way as for invoices. A token deposit can be Held until your master wallet has enough native coin. See Settlement and the platform fee.
An invoice with its checkout page open is checked every few seconds. A deposit address has no page, so it is checked on a slower regular schedule, and detection can take a little longer.
Status
Section titled “Status”A deposit address is active, disabled or archived. You can rename an address, disable it and enable it again. A disabled address is still watched, so a payment sent to it is recorded and not lost.
Wallets from cTpeWay v1
Section titled “Wallets from cTpeWay v1”Every deposit wallet you created in cTpeWay v1 is a reusable deposit address in v2, with the same address and the same name. Payments sent to it are still received. The v1 API itself stops at the cutover, so your integration reads these addresses through the v2 API. See Moving from the v1 API.
Endpoints
Section titled “Endpoints”| Endpoint | What it does |
|---|---|
| POST/v1/deposit_addresses | Create a named address. |
| GET/v1/deposit_addresses | List your addresses. |
| GET/v1/deposit_addresses/{id} | Retrieve one address. |
| PATCH/v1/deposit_addresses/{id} | Change its name or status. |
| GET/v1/deposit_addresses/{id}/payments | List the payments it has received. |

