tumbuh.ai
tumbuh.ai Public API
GET
https://<domain-anda>
/api/v1/public/payments

Return customer payment links with their amount and settlement status.

Returns payment links raised for customers, newest first, with the amount, provider and whether they have been paid, expired or cancelled. Use it to check whether a customer has already paid before chasing them, or before raising a second link. Read-only. Paginated: follow meta.pagination.nextCursor until hasMore is false.

List payment links › query Parameters

limit
​integer · min: 1 · max: 100

Rows to return, 1-100. Defaults to 25.

Rows to return, 1-100. Defaults to 25.

cursor
​string

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

customerId
​string

Only this customer, id from customers.list.

Only this customer, id from customers.list.

conversationId
​string

Only this conversation, id from conversations.list.

Only this conversation, id from conversations.list.

status
​string

Payment status, e.g. PENDING, PAID, EXPIRED or CANCELLED.

Payment status, e.g. PENDING, PAID, EXPIRED or CANCELLED.

List payment links › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

POST
https://<domain-anda>
/api/v1/public/payments

Raise a payment link for a customer and send it to them.

Creates a payment link at the configured provider and returns it (paymentUrl). It does not message the customer: send the link yourself with messages.send. It asks a real person for real money and cannot be recalled once the customer has it — cancelling invalidates the link but does not unsend a message that carries it. Use it only for an amount the workspace owner has confirmed, and check payments.list first so you do not raise a second link for something already paid. Requires the separate payments:write scope and is limited to 5 calls per minute. Send an Idempotency-Key header (1-255 characters, e.g. a UUID) and reuse it when you retry: the same key and body return the link the first call created instead of raising a second one, 409 PaymentIntentInProgress means the first call is still waiting on the gateway, and 422 IdempotencyKeyReused means the key was used for a different body. A 504/502 PaymentGatewayUnavailable with retryable: true created no link and is safe to retry. Use payments.providers to see which provider ids and paymentMethod codes exist.

Create a payment link › Request Body

customerId
​string · required

Customer id from customers.list.

amount
​integer · max: 9007199254740991 · required

Amount in whole units of the currency (whole rupiah for IDR), no decimals.

description
​string · required

What the customer is paying for. They will see this.

conversationId
​string

Attach the payment to a conversation from conversations.list.

channelType
​string · enum

Channel of the conversation the payment belongs to.

Enum values:
WHATSAPP
INSTAGRAM
MESSENGER
TELEGRAM
WEB
channelAccountId
​string

Channel account the conversation runs on, e.g. a phone number id.

currency
​string · minLength: 3 · maxLength: 3

Three-letter currency code. Defaults to IDR.

provider
​string

Payment provider id from payments.providers. Defaults to midtrans.

expiryMinutes
​integer · min: 5 · max: 9007199254740991

Minutes until the link expires, at least 5. Defaults to the provider setting.

paymentMethod
​string

Provider-specific payment method code from payments.providers. The provider rejects a code it does not declare.

Create a payment link › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

List payment providers

GET
https://<domain-anda>
/api/v1/public/payments/providers

Return the payment providers the platform supports and their method codes.

Returns every provider the platform can raise a link with, with its id and the payment method codes it declares. Use it to pick valid provider and paymentMethod values for payments.create. It lists what the platform supports, not what this workspace has connected, and never includes credentials. Read-only.

List payment providers › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

GET
https://<domain-anda>
/api/v1/public/payments/{id}

Fetch a single payment link with its amount, expiry and settlement state.

Returns one payment intent: the customer, the amount, the provider, the link, when it expires and whether it settled. Use it to confirm a payment before delivering whatever it paid for. Read-only. Provider credentials are never included.

Read one payment link › path Parameters

id
​string · required

Payment intent id from payments.list.

Payment intent id from payments.list.

Read one payment link › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

POST
https://<domain-anda>
/api/v1/public/payments/{id}/cancel

Invalidate an unpaid payment link so it can no longer be used.

Voids a payment link that has not been paid. A payment that already settled cannot be reversed here — refund it in the provider's dashboard. The customer keeps the message containing the dead link, so tell them yourself with messages.send. Requires payments:write and is limited to 5 calls per minute.

Cancel a payment link › path Parameters

id
​string · required

Payment intent id from payments.list. A PAID intent cannot be cancelled.

Payment intent id from payments.list. A PAID intent cannot be cancelled.

Cancel a payment link › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Re-check a payment with the provider

POST
https://<domain-anda>
/api/v1/public/payments/{id}/check-status

Ask the payment provider for the real status and update the payment link.

Calls the provider to reconcile one payment, for when a settlement callback was missed and payments.get still says PENDING. It records the check and, if the provider reports a new status, updates the payment: a payment that turns out PAID also queues the workspace payment-received message to the customer, which cannot be recalled. Calls the provider on every use, so use it for one payment you have a reason to doubt, not in a loop. A provider amount that differs from the link is refused. Requires payments:write.

Re-check a payment with the provider › path Parameters

id
​string · required

Payment intent id from payments.list.

Payment intent id from payments.list.

Re-check a payment with the provider › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Read a customer ERP invoices

GET
https://<domain-anda>
/api/v1/public/customers/{customerId}/erp-transactions

Return the invoices the connected ERP holds for a customer.

Asks the workspace ERP for the invoice history of one customer. The answer carries a status: ok with invoices, unlinked when this customer was never matched to an ERP patient, or an error when the ERP is unavailable (502 erp_unavailable). Do not read unlinked as "no transactions". Calls an external system, so use it for one customer at a time. Read-only.

Read a customer ERP invoices › path Parameters

customerId
​string · required

Customer id from customers.list.

Customer id from customers.list.

Read a customer ERP invoices › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Read the payments on an ERP invoice

GET
https://<domain-anda>
/api/v1/public/customers/{customerId}/erp-transactions/{invoiceId}/payments

Return the payment lines the ERP recorded against one invoice of a customer.

Returns the payments recorded on one invoice. The invoice must belong to the customer in the path (take invoiceId from customerPayments.erpTransactions); otherwise it answers 404. Calls an external system, so use it for one invoice at a time. Read-only.

Read the payments on an ERP invoice › path Parameters

customerId
​string · required

Customer id from customers.list.

Customer id from customers.list.

invoiceId
​string · required

Invoice id from customerPayments.erpTransactions.

Invoice id from customerPayments.erpTransactions.

Read the payments on an ERP invoice › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required