Payment Gateway
Payment Gateway stores the credentials of online payment providers: PayPal, Stripe, Midtrans, Xendit, and DOKU. One row per provider, with an active switch and the order it appears in on the payment screen.
Used By
admin or owner according to menu access rights
Data Type
master
Search Keys
Gateway
When This Form Is Used
- When the company starts accepting online payments from customers.
- When merchant credentials change, for example after a key rotation or an account move.
- When moving from test mode to production.
- When one provider needs to be switched off temporarily without deleting its credentials.
Before You Fill It In
- Collect the credentials from the provider merchant dashboard. The field names differ per provider: PayPal uses Client ID and Secret, Stripe uses API Key and Secret, Midtrans uses Server Key and Client Key, Xendit uses a Secret Key, DOKU uses Client ID and Secret Key.
- Xendit has no sandbox switch. Test or production mode is decided by the prefix of the Secret Key itself:
xnd_development_for testing,xnd_production_for production. - For Xendit and DOKU, register the notification URL in the provider dashboard first. Without it a successful payment is never recorded as paid, and the order hangs with no error message at all.
- Test with sandbox credentials before switching Active on.
Workflow
- Open Settings / Business Setup / Payment Gateway.
- Add a row, then pick the provider in the Payment Gateway field.
- Fill in its credentials. The fields shown follow the provider you picked, so irrelevant ones stay out of the way.
- Set Order when more than one provider is active; a lower number appears first.
- Switch Active on only after the credentials have been tested.
- Save, then test from a transaction that actually uses online payment.
Fields That Need Attention
| Field | What It Means | Status |
|---|---|---|
Payment Gateway
gatewaykey |
The payment provider configured on this row. The choices follow the providers installed on the server. | Required |
Active
isactive |
Decides whether this provider is offered to buyers. Switching it off does not delete the credentials. | Optional |
Order
priority |
Display order on the payment screen when more than one provider is active. A lower number appears first. | Optional |
After Saving
- An active provider appears immediately as a choice on the online payment screen.
- A provider switched off disappears from the choices, but its credentials stay stored - turning it back on needs no retyping.
- Credentials here never reach the browser apart from keys that are meant to be public, and they appear on no screen other than this form.
- Transactions already running with a previous provider are unaffected; their status is still decided by that provider notification.
Common Problems
- The provider does not appear on the payment screen: check the Active switch, then make sure the credentials are actually filled in.
- Payment succeeds at the provider but the order still hangs: this is almost always a notification URL that has not been registered, or points to the wrong address in the provider dashboard.
- Xendit rejects the transaction: check the Secret Key prefix. A production key in a test environment, or the other way round, is rejected without a clear explanation.
- The provider logo does not show: its icon file is not on the server yet. The provider name still reads correctly, so this does not block use.
Available Fields
The list below summarises the fields available on the form. Credential fields only appear for the provider currently selected, so not all of them are visible at once.
| Field | What It Means | Status |
|---|---|---|
Payment Gateway
gatewaykey |
The payment provider configured on this row. The choices follow the providers installed on the server. | Required |
Active
isactive |
Decides whether this provider is offered to buyers. Switching it off does not delete the credentials. | Optional |
Order
priority |
Display order on the payment screen when more than one provider is active. A lower number appears first. | Optional |
PayPal Client ID
paypal__client_id |
Client ID from the PayPal merchant dashboard. | Optional |
PayPal Secret
paypal__secret |
PayPal secret. Do not share it; it is equivalent to the merchant account key. | Optional |
PayPal Sandbox Mode
paypal__sandbox |
Turns on PayPal test mode. | Optional |
Stripe API Key
stripe__api_key |
Stripe API key for the company merchant account. | Optional |
Stripe Secret
stripe__secret |
Stripe secret key. Make sure it matches the selected mode. | Optional |
Stripe Sandbox Mode
stripe__sandbox |
Turns on Stripe test mode. | Optional |
Midtrans Server Key
midtrans__server_key |
Midtrans Server Key from Settings / Access Keys in the merchant dashboard. | Optional |
Midtrans Client Key
midtrans__client_key |
Midtrans Client Key. This key is meant to be used in the browser. | Optional |
Midtrans Sandbox Mode
midtrans__sandbox |
Turns on Midtrans test mode. | Optional |
Xendit Secret Key
xendit__secret_key |
Xendit Secret Key. Its prefix decides test or production mode, so there is no separate sandbox switch. | Optional |
Xendit Callback Token
xendit__callback_token |
Notification verification token, copied from Settings / Webhooks in the Xendit dashboard. | Optional |
DOKU Client ID
doku__client_id |
Client ID from the DOKU Back Office. | Optional |
DOKU Secret Key
doku__secret_key |
DOKU Secret Key, used to sign every request. | Optional |
DOKU Sandbox Mode
doku__sandbox |
Turns on DOKU test mode. | Optional |
User Checklist
Menu Location
- Settings / Business Setup / Payment Gateway
/form/paymentgateway