Skip to content
Draft: the API is under development and may change before the first release

Testing

  • Test keys (sk_test_...) use separate data. No money moves.
  • Test mode runs against a mock provider, not a real one.
  • Webhooks in test mode work the same way as in live mode, including signatures.
  • The base URL is the same: https://api.pachapay.io/v1. The key decides the mode.

The mock provider’s behavior is chosen by a marker in merchant_reference or by the amount. Planned markers include:

Marker (suffix of merchant_reference) Scenario
#fail the provider rejects the payment
#late_payment the payer pays after the payment expired
#overpaid the payer pays more than expected
#chargeback a card payment ends in a chargeback

The full table of scenarios will be published together with the test environment.

{ "amount": 100000, "currency": "CLP", "country": "CL", "method_code": "CL.KHIPU", "merchant_reference": "order-1#late_payment" }

Simulation endpoints that step a test payment or payout through its statuses are planned for test mode only. They are not part of the production API and are not in the API reference.

See Going live.