Skip to main content
PayLoco provides a collection of APIs that enable you to process and manage payments. Our APIs accept and return JSON in the HTTP body and return standard HTTP response codes. You can consume the APIs directly using your favorite HTTP/REST library.

Try a Payment

Explore the versatile payments endpoint, through multiple test scenarios

Refund

Process refunds for completed payments using our API

Save a payment method

Save customer payment methods securely for future transactions

Self Hosted?

Host PayLoco on-premise? Utilize our full API suite.

Environment

We have a testing environment referred to ,” which you can set up to test API calls without affecting production data. You can sign up on our Dashboard to get API keys to access PayLoco API. Use the following base URLs when making requests to the APIs:
If you do not hold a PCI certification to collect and store card data on your servers, we recommend using Unified Checkout to accept card information from users.

Authentication and API keys

PayLoco authenticates your API requests using your account’s API keys. Each account has two API keys for authentication:
KeyExampleWhen to Use
Secret key (API-key)snd_c69***Used to authenticate API requests from your merchant server. Don’t expose this key on a website or embed it in a mobile application.
Publishable keypk_snd_3b3***Used to authenticate API requests from your app’s client. Can be publicly-accessible in your web or mobile app’s client-side code.

Payment Status Lifecycle

PayLoco handles the complex functionality of a comprehensive payments flow through the Payments object that transitions through multiple states during its payments lifecycle. Given below are the various statuses a payment can have:
Payment StatusDescription
requires_payment_methodOnce you create a payment through payments/create endpoint with no payment method attached to it, the payments object transitions to ‘requires_payment_method’.
requires_confirmationAfter attaching a payment method through payments/update endpoint, the payments object requires you to confirm the payment.
requires_customer_actionOnce the payment is confirmed through payments/confirm endpoint, if additional authentication is required, the payments object transitions to this state.
requires_captureIf you want to do separate authorize and capture, setting capture field to ‘manual’ during payments/create or confirm call will transition the payment object to this state after customer action succeeds.
processingIn case of automatic capture, the payments object transitions to processing state post confirm call and subsequent customer authentication if available.
succeededThe payments object reaches success state post confirmation of successful processing from the payment processor.
failedThe payments object transitions to a failed state when the payment processor confirms the processing failure.
expiredYou can expire the payments object while it is in any state except when it is under ‘processing’ or ‘succeeded’ state.

Redirect URL

This is what a url looks like after redirection https://app.payloco.com?status=succeeded&payment_intent_client_secret=pay_NCv9vc19f8aa75OpFxH8_secret_V4zAc7V0C8WAw6FECMKM&amount=10000&manual_retry_allowed=false&signature=4fae0cfa775e4551db9356563d4b98b55662fe3c1c945fe215d90ccf3541282c535909ae901d82174d6b1e46ba1684aa0aa4c8861be0e2a9ef6f950a975d5014&signature_algorithm=HMAC-SHA512 The available parameters are as follows:
  • status - can have values of succeeded, processingand failed.
  • payment_intent_client_secret - This is the client secret associated with the payment. This can be used to retrieve the payment status from hyperswitch.
  • manual_retry_allowed - whether this payment can be retried or not.
  • signature - A HMAC signature of the payload, this can be verified using the payment_response_hash_key.
  • signature_algorithm - The HMAC algorithm used to calculate the signature.

payment methods

支付方式支持国家支付类型TokenizationMIT必填参数(端到端支付必填)交易币种
VISA全球CREDIT_CARD☑️☑️cardNo/firstName/lastName/cvv/expireYear/expireMonth全币种
MasterCard全球CREDIT_CARD☑️☑️cardNo/firstName/lastName/cvv/expireYear/expireMonth全币种
JCB全球CREDIT_CARD☑️☑️cardNo/firstName/lastName/cvv/expireYear/expireMonth全币种
DISCOVER全球CREDIT_CARD☑️☑️cardNo/firstName/lastName/cvv/expireYear/expireMonth全币种
UNION_PAY全球CREDIT_CARD☑️☑️cardNo/firstName/lastName/cvv/expireYear/expireMonth全币种
WEIXIN中国香港(HK)QRCODE,MICROPAY,JSAPI,MINIPROGRAM,APP,H5\t---CNY,HKD
UNIONPAY中国香港(HK)WEB,PAN_PRESENT,QRCODE,H5,3DS---CNY,HKD
ALIPAY_CN中国(CN)H5,WEB,APP---CNY,USD,HKD
ALIPAY_HK中国香港(HK)H5,WEB,APP---HKD,USD
ALIPAY_HK中国香港(HK)H5,WEB,APP---HKD,USD
GCASH菲律宾(PH)H5,WEB,BILLS--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
PHP,USD
BPI菲律宾(PH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
PHP,USD
MAYA菲律宾(PH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
PHP
BILLEASE菲律宾(PH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
PHP,USD
Dragonpay菲律宾(PH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
PHP
GrabPay_PH菲律宾(PH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
PHP
TNG马来西亚(MY)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
MYR,USD
BOOST马来西亚(MY)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
MYR,USD
GrabPay_MY马来西亚(MY)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
MYR
DANA印度尼西亚(ID)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
IDR,USD
KAKAOPAY韩国(KR)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
KRW,USD
NAVERPAY韩国(KR)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
KRW,USD
TOSSPAY韩国(KR)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
KRW,USD
TRUEMONEY泰国(TH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
THB,USD
RABBIT_LINE_PAY泰国(TH)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
THB,USD
BRAZIL_PIX巴西(BR)H5,QRCODE--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
BRL
Ewallet_PicPay巴西(BR)H5,QRCODE--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
BRL
Khipu智利(CL)H5--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
CLP
GrabPay_SG新加坡(SG)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
SGD,USD
GoPay印度尼西亚(ID)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
IDR
OVO印度尼西亚(ID)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
IDR
DOKU印度尼西亚(ID)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
IDR
Konbini日本(JP)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
JPY
PayEasy日本(JP)H5,WEB--countryCode/terminalType/osType
[terminalType必填(WEB,WAP,APP);
terminalType为WAP/APP时osType必填(IOS,ANDROID)]
JPY