MyTPEMyTPE Pay

API Reference

Reference for all status codes, types, and modes used in the API.

Constants & Enums

The API uses string-based constants to represent the state and type of various objects. When integrating, strictly use these values.

1. Virtual TPE Instances

These statuses apply to the MytpePay object (your virtual terminal).

Instance Status

status field on the Instance object.

ValueDescription
pendingInitial State. Instance created but activation fee not yet paid or approved.
processingFee paid, currently being provisioned by the system.
activeOperational. Can generate links and accept payments.
inactiveManually disabled or archived. Cannot accept payments.
refusedCompliance rejected the instance application.

These constants apply to the MytpePayLink object.

Payment Modes

payment_mode field. Controls the lifecycle logic.

ModeDescription
reusableStandard. Link never expires. Good for e-commerce products.
one_shotInvoice. Closes automatically after 1 successful payment.
limitedQuota. Closes automatically after max_payments is reached.

Pricing Types

type field. Controls how the amount is determined.

TypeDescription
dynamicFixed Price. The merchant sets the amount. Customer pays exactly that.
staticDonation/Custom. The customer enters the amount.

status field.

StatusDescription
activeLink is public and accepting payments.
inactiveManually paused by the merchant. Users see a "Paused" message.
closedSystem Closed. Auto-closed because quota was reached or invoice was paid.

Payment Status

payment_status field (computed). Shows the payment state of the link based on mode and transactions.

One-Shot Mode

StatusDescription
awaiting_paymentLink is active, waiting for the first (and only) payment.
paidPayment received successfully. Link is closed with a completed transaction.
expiredLink closed after 48h timeout without receiving payment.
inactiveMerchant manually disabled the link before payment.

Limited Mode

StatusDescription
awaiting_paymentLink is active but no payments received yet.
partially_paidSome payments received, still active and accepting more.
fully_paidReached max_payments quota. Link is closed.
partially_paid_expiredSome payments received but closed due to 48h expiry before reaching quota.
expiredClosed after 48h without any payment.
inactiveMerchant manually disabled the link.

Reusable Mode

StatusDescription
activeLink is active and ready to receive payments (no payments yet).
active_receiving_paymentsLink is active and has received payments.
closed_with_paymentsManually closed after receiving payments.
closedManually closed without any payments.
inactiveMerchant manually disabled the link.

Payment Status Logic

The payment_status field helps you understand the exact state of a payment link:

  • Closed + has payments = Paid (fully or partially)
  • Closed + no payments = Expired (48h timeout)
  • This distinction is crucial for one-shot invoices and limited inventory links.

3. Transactions

These constants apply to the object found in Webhooks and History.

Transaction Status

status field.

StatusDescription
pendingCustomer landed on checkout but hasn't paid yet.
processingPayment submitted, waiting for bank confirmation.
completedSuccess. Money has been captured. Deliver the service.
failedBank rejected the card or insufficient funds.
refundedMerchant issued a refund for this transaction.
refusedBlocked by anti-fraud or compliance rules.

Payment Methods

payment_method field.

MethodDescription
onlineCIB / EDAHABIA. Standard card payment.

Handling Webhooks

When processing webhooks, ensure you only fulfill orders when the transaction status is strictly completed. Do not ship items on pending or processing.

On this page

API Reference