logoFOMO Developers
PaymentIntegration Guides

Web Integration

FOMO Pay API - Web Integration

Web Integration Guide v1.1.2

1. Change Log

1.1 V1.0.0

Initial release.

1.2 V1.0.1-V1.0.7

(Removed)

1.3 V1.0.9

Specify transaction options for DPT DIRECT and DPT HOSTED mode.

1.4 V1.0.10

Update transaction options for WECHATPAY DIRECT (JSAPI) mode.

1.5 V1.0.11

Update transaction options for ALIPAY DIRECT (WAP) mode.

1.6 V1.0.12

Update transaction options for ALIPAY DIRECT (APP, MINI_APP) mode.

1.7 V1.1.0

Introduce card tokenization supportability for Customer-Initiated Transactions (CIT) and Merchant-Initiated Transactions (MIT) for DIRECT mode.

  • New APIs to support card token creation, retrieval, and deletion.
  • Update transaction options for DIRECT mode.

1.8 V1.1.1

  • Specify transaction options for DPT DIRECT and DPT HOSTED mode to support fraud detection.
  • Adjusted formatting

1.9 V1.1.2

  • Updated parameter descriptions for WECHATPAY DIRECT (JSAPI) mode and added parameter descriptions for WECHATPAY DIRECT (MWEB) mode
  • Added detailed explanation of the returnUrl parameter in Appendix 9.8 to clarify its usage and integration process.

2. PCI Compliance

To accept card payment in Direct Mode, you must submit a copy of your PCI-DSS certificate (for all relevant SAQs) to FOMO Pay to clear relevant compliance requirements.

For more information for SAQs, please visit:
https://www.pcisecuritystandards.org/documents/Understanding_SAQs_PCI_DSS_v3.pdf

3. Sequence Diagram

3.1 Hosted Mode

3.2 Direct Mode

4. Security and Encryption

4.1 Transport Security

Transport Layer Security (TLS) 1.2

4.2 Message Authentication

RFC 7617 HTTP Basic Authentication (https://tools.ietf.org/html/rfc7617)

The following key is required:

  1. MID (<MID>) generated by FOMO Pay.
  2. Pre-Shared Key (<PSK>) generated by FOMO Pay.

Please ensure <PSK>never leaves your server and managed by trusted parties only. Failing to do so will result in unauthorized access to your account. If you believe your <PSK>is lost, contact FOMO Pay immediately.

HTTP Authorization header is required in all requests. The Authorization header is constructed as follow.

Authorization: <AuthorizationType> <BasicCredentials>

<AuthorizationType>: fixed value Basic (without quote).

<BasicCredentials>: generated as follow.

Base64(<MID>:<PSK>)

Example:

Merchant setup:

KeyValue
<MID>100000000000001
<PSK>E00F270DE323E2B187532D8E4B306EB2841AF0BFF08132BAB7F0E62BED6419BB

Calculation:

Calculate <BasicCredentials> from:

Base64("100000000000001:E00F270DE323E2B187532D8E4B306EB2841AF0BFF08132BAB7F0E62BED6419BB")

Which yields:

MTAwMDAwMDAwMDAwMDAxOkUwMEYyNzBERTMyM0UyQjE4NzUzMkQ4RTRCMzA2RUIyODQxQUYwQkZGMDgxMzJCQUI3RjBFNjJCRUQ2NDE5QkI=

Authorization header:

Authorization: Basic MTAwMDAwMDAwMDAwMDAxOkUwMEYyNzBERTMyM0UyQjE4NzUzMkQ4RTRCMzA2RUIyODQxQUYwQkZGMDgxMzJCQUI3RjBFNjJCRUQ2NDE5QkI=

Include Authorization header in every request you send to FOMO Pay. Never include this header when you send request to other non-FOMO Pay servers.

5. Symbols and Abbreviated Terms

5.1 Required Flag

AbbreviationDescription
MMandatory
OOptional
CConditional
XNot supported

6. Message Types and Specification

6.1 Create an Order (Hosted Mode)

POST
/api/orders

Authorization

BasicAuth
AuthorizationBasic <token>

Use HTTP Basic Authentication with MID and PSK.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://ipg.fomopay.net/api/orders" \  -H "Content-Type: application/json" \  -d '{    "mode": "HOSTED",    "orderNo": "WEB-ORDER-10001",    "subject": "FOMO Pay Demo Order",    "description": "Hosted checkout example",    "amount": "10.00",    "currencyCode": "SGD",    "notifyUrl": "https://merchant.example.com/payments/notify",    "returnUrl": "https://merchant.example.com/payments/return",    "backUrl": "https://merchant.example.com/payments/cancel",    "sourceOfFunds": [      "CARD",      "PAYNOW"    ]  }'
{
  "id": "ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9",
  "subMid": "100000000000002",
  "orderNo": "WEB-ORDER-10001",
  "mode": "HOSTED",
  "subject": "FOMO Pay Demo Order",
  "description": "Hosted checkout example",
  "amount": "10.00",
  "currencyCode": "SGD",
  "status": "CREATED",
  "createdAt": 1711977000,
  "notifyUrl": "https://merchant.example.com/payments/notify",
  "returnUrl": "https://merchant.example.com/payments/return",
  "backUrl": "https://merchant.example.com/payments/cancel",
  "primaryTransactionId": "txn_01HQZ6T50Y7Y8FQ40R8Q9MZ7XM",
  "url": "https://pay.fomopay.net/redirect/ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9"
}

{
  "id": "ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9",
  "subMid": "100000000000002",
  "orderNo": "WEB-ORDER-10001",
  "mode": "HOSTED",
  "subject": "FOMO Pay Demo Order",
  "description": "Hosted checkout example",
  "amount": "10.00",
  "currencyCode": "SGD",
  "status": "CREATED",
  "createdAt": 1711977000,
  "notifyUrl": "https://merchant.example.com/payments/notify",
  "returnUrl": "https://merchant.example.com/payments/return",
  "backUrl": "https://merchant.example.com/payments/cancel",
  "primaryTransactionId": "txn_01HQZ6T50Y7Y8FQ40R8Q9MZ7XM",
  "url": "https://pay.fomopay.net/redirect/ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9"
}

{
  "hint": "req_01HQZ6PXG1PF1R2S1P33H0M2KJ",
  "code": "INVALID_REQUEST",
  "message": "orderNo already exists"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}

6.2 Create an Order - (Direct Mode)

POST
/api/orders

Authorization

BasicAuth
AuthorizationBasic <token>

Use HTTP Basic Authentication with MID and PSK.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://ipg.fomopay.net/api/orders" \  -H "Content-Type: application/json" \  -d '{    "mode": "HOSTED",    "orderNo": "WEB-ORDER-10001",    "subject": "FOMO Pay Demo Order",    "description": "Hosted checkout example",    "amount": "10.00",    "currencyCode": "SGD",    "notifyUrl": "https://merchant.example.com/payments/notify",    "returnUrl": "https://merchant.example.com/payments/return",    "backUrl": "https://merchant.example.com/payments/cancel",    "sourceOfFunds": [      "CARD",      "PAYNOW"    ]  }'
{
  "id": "ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9",
  "subMid": "100000000000002",
  "orderNo": "WEB-ORDER-10001",
  "mode": "HOSTED",
  "subject": "FOMO Pay Demo Order",
  "description": "Hosted checkout example",
  "amount": "10.00",
  "currencyCode": "SGD",
  "status": "CREATED",
  "createdAt": 1711977000,
  "notifyUrl": "https://merchant.example.com/payments/notify",
  "returnUrl": "https://merchant.example.com/payments/return",
  "backUrl": "https://merchant.example.com/payments/cancel",
  "primaryTransactionId": "txn_01HQZ6T50Y7Y8FQ40R8Q9MZ7XM",
  "url": "https://pay.fomopay.net/redirect/ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9"
}

{
  "id": "ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9",
  "subMid": "100000000000002",
  "orderNo": "WEB-ORDER-10001",
  "mode": "HOSTED",
  "subject": "FOMO Pay Demo Order",
  "description": "Hosted checkout example",
  "amount": "10.00",
  "currencyCode": "SGD",
  "status": "CREATED",
  "createdAt": 1711977000,
  "notifyUrl": "https://merchant.example.com/payments/notify",
  "returnUrl": "https://merchant.example.com/payments/return",
  "backUrl": "https://merchant.example.com/payments/cancel",
  "primaryTransactionId": "txn_01HQZ6T50Y7Y8FQ40R8Q9MZ7XM",
  "url": "https://pay.fomopay.net/redirect/ord_01HQZ6Q3F1WB4G3WQ7D6A0S9R9"
}

{
  "hint": "req_01HQZ6PXG1PF1R2S1P33H0M2KJ",
  "code": "INVALID_REQUEST",
  "message": "orderNo already exists"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}

6.3 Query an Order

GET
/api/orders/{orderId}

Authorization

BasicAuth
AuthorizationBasic <token>

Use HTTP Basic Authentication with MID and PSK.

In: header

Path Parameters

orderId*string

Order ID returned by FOMO Pay during order creation.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://ipg.fomopay.net/api/orders/string"
{
  "id": "ord_01HQZ8BMN9KQXFM5T7RM0Q45Q0",
  "subMid": "100000000000002",
  "orderNo": "WEB-ORDER-10002",
  "mode": "DIRECT",
  "subject": "Direct payment example",
  "description": "Direct mode payment",
  "amount": "10.00",
  "currencyCode": "SGD",
  "status": "SUCCESS",
  "createdAt": 1711977300,
  "notifyUrl": "https://merchant.example.com/payments/notify",
  "returnUrl": "https://merchant.example.com/payments/return",
  "primaryTransactionId": "txn_01HQZ8CVAJX0B1AAYTRM4Q2FRJ",
  "codeUrl": "000201010212520400005303702540510.005802SG5913FOMO PAY DEMO6009Singapore6304ABCD",
  "threeDSecure": false
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "req_01HQZ8M7SC7V7SCMNH3DG7J8WW",
  "code": "ORDER_NOT_FOUND",
  "message": "orderId does not exist"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}

6.4 Create a Refund Transaction - Request

POST
/api/orders/{orderId}/transactions

Authorization

BasicAuth
AuthorizationBasic <token>

Use HTTP Basic Authentication with MID and PSK.

In: header

Path Parameters

orderId*string

Order ID returned by FOMO Pay during order creation.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://ipg.fomopay.net/api/orders/string/transactions" \  -H "Content-Type: application/json" \  -d '{    "type": "REFUND",    "originalId": "txn_01HQZ8CVAJX0B1AAYTRM4Q2FRJ",    "transactionNo": "REFUND-10001",    "amount": "10.00",    "currencyCode": "SGD",    "subject": "Refund for order WEB-ORDER-10001"  }'
{
  "id": "txn_01HQZ9M3DHK9C6SJQ5RHB94W8M",
  "type": "REFUND",
  "originalId": "txn_01HQZ8CVAJX0B1AAYTRM4Q2FRJ",
  "transactionNo": "REFUND-10001",
  "subject": "Refund for order WEB-ORDER-10001",
  "status": "CREATED",
  "createdAt": 1711977600,
  "amount": "10.00",
  "currencyCode": "SGD"
}
{
  "id": "txn_01HQZ9M3DHK9C6SJQ5RHB94W8M",
  "type": "REFUND",
  "originalId": "txn_01HQZ8CVAJX0B1AAYTRM4Q2FRJ",
  "transactionNo": "REFUND-10001",
  "subject": "Refund for order WEB-ORDER-10001",
  "status": "CREATED",
  "createdAt": 1711977600,
  "amount": "10.00",
  "currencyCode": "SGD"
}
{
  "hint": "req_01HQZ9H3A0N4X5P5A3D5SPX29V",
  "code": "REFUND_AMOUNT_EXCEEDED",
  "message": "refund amount exceeds remaining refundable amount"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}

6.5 Query a Transaction

GET
/api/orders/{orderId}/transactions/{transactionId}

Authorization

BasicAuth
AuthorizationBasic <token>

Use HTTP Basic Authentication with MID and PSK.

In: header

Path Parameters

orderId*string

Order ID returned by FOMO Pay during order creation.

transactionId*string

Transaction ID returned by FOMO Pay during transaction creation.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://ipg.fomopay.net/api/orders/string/transactions/string"
{
  "id": "txn_01HQZ9M3DHK9C6SJQ5RHB94W8M",
  "type": "REFUND",
  "originalId": "txn_01HQZ8CVAJX0B1AAYTRM4Q2FRJ",
  "transactionNo": "REFUND-10001",
  "subject": "Refund for order WEB-ORDER-10001",
  "status": "SUCCESS",
  "createdAt": 1711977600,
  "amount": "10.00",
  "currencyCode": "SGD",
  "sourceOfFund": "CARD"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "req_01HQZAGD7B2PQJ4GH9T2NEV5CS",
  "code": "TRANSACTION_NOT_FOUND",
  "message": "transactionId does not exist"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}
{
  "hint": "string",
  "code": "string",
  "message": "string"
}

6.6 Retrieve Orders

Request

URL

https://ipg.fomopay.net/api/orders?filter=[filter]&amp;range=[range]&amp;sort=[sort]

[filter] (JSON object converted to string)

KeyField NameField TypeRequiredComments
sinceUNIX timestamp in secondsnumberMOnly take orders created after this time (inclusive)
tillUNIX timestamp in secondsnumberMOnly take orders created before this time (exclusive). Must be greater than since and no more than since plus 180 days
idTransaction IDstringOUnique order ID generated by FOMO Pay, can be used for query
orderNoMerchant order numberstringOOrder number generated by merchant
modeOrder modestringOOne of HOSTED and DIRECT
statusOrder statusstringOSee Appendix 2

[range] (JSON list converted to string)

IndexField NameField TypeRequiredComments
0First index (starts from 0)numberMNumber of orders to skip
1Last indexnumberMNumber of orders to skip plus number of orders to take. Must be greater than begin value and no more than begin value plus 100

[sort] (JSON list converted to string)

IndexField NameField TypeRequiredComments
0Order bystringMMust be createdAt
1OrderstringMOne of ASC and DESC

Method

GET

Example:

Retrieve first 10 orders after 20th order created between 1/Jan/2020 00:00 (GMT+8) and 2/Jan/2020 00:00 (GMT+8) with status SUCCESS.

[filter]={"since":1577808000,"till":1577894400,"status":"SUCCESS"}
[range]=[20,30]
[sort]=["createdAt","ASC"]

Perform URL encode

[filter]=%7B%22since%22%3A1577808000%2C%22till%22%3A1577894400%2C%22status%22%3A%22SUCCESS%22%7D
[range]=%5B20%2C30%5D
[sort]=%5B%22createdAt%22%2C%22ASC%22%5D

Form final URL to query

https://ipg.fomopay.net/api/orders?filter=%7B%22since%22%3A1577808000%2C%22till%22%3A1577894400%2C%22status%22%3A%22SUCCESS%22%7D&amp;range=%5B20%2C30%5D&amp;sort=%5B%22createdAt%22%2C%22ASC%22%5D

Response

HTTP status codeComments
200OK
400Bad Request
401Unauthorized Access
429Too Many Requests
500Server Error

When HTTP status code is not 2xx and not 5xx

KeyField NameField TypeRequiredComments
hintRequest IDstringMUsed for tracing
codeError codestringMError code
messageError messagestringMError message

When HTTP status code is 2xx

Header

FieldValue
Content-Typeapplication/json
Content-Rangeorders [begin]-[end]/[total]

Body

A list of objects in JSON. Each object has the following fields

KeyField NameField TypeRequiredComments
idOrder IDstringMUnique order ID generated by FOMO Pay, used for status query and refund
subMidSub-Merchant IDstringCReturn unchanged
orderNoOrder numberstringMReturn unchanged
modeOrder modestringMReturn unchanged
subjectShort order description stringMReturn unchanged
descriptionOrder descriptionstringOReturn unchanged
amountTransaction amountstringMReturn unchanged
currencyCodeTransaction currencystringMReturn unchanged
statusTransaction statusstringMSee Appendix 2
createdAtTime of order creationnumberMUnix time in seconds
notifyUrlURL to notify order result updatestringMReturn unchanged
returnUrlURL to return to after paymentstringCReturn unchanged
backUrlURL to return to when user cancel the paymentstringOReturn unchanged
primaryTransactionIdDefault transaction linked to current orderstringM
urlRedirection URLstringCSee Appendix 5
codeUrlQR code content to display to customerstringCPlease generate QR code using this content and display to customer, see Appendix 5
threeDSecureIndicates if card payment requires 3-D SecurebooleanCSee Appendix 5

6.7 Retrieve Transactions in an Order

Request

URL

https://ipg.fomopay.net/api/orders/[orderId]/transactions?filter=[filter]&amp;range=[range]&amp;sort=[sort]

[filter] (JSON object converted to string)

KeyField NameField TypeRequiredComments
idTransaction IDstringOUnique transaction ID generated by FOMO Pay, can be used for query
transactionNoMerchant transaction numberstringOTransaction number generated by merchant
typeTransaction typestringOOne of SALE, REFUND and DISPUTE
statusTransaction statusstringOSee Appendix 3

[range] (JSON list converted to string)

IndexField NameField TypeRequiredComments
0First index (starts from 0)numberMNumber of transactions to skip
1Last indexnumberMNumber of transactions to skip plus number of transactions to take. Must be greater than begin value and no more than begin value plus 100

[sort] (JSON list converted to string)

IndexField NameField TypeRequiredComments
0Order bystringMMust be createdAt
1OrderstringMOne of ASC and DESC

Method

GET

Example:

Retrieve first 5 refund transactions after 5th transaction with status SUCCESS for order 100500020200101000000000.

[filter]={"type":"REFUND","status":"SUCCESS"}
[range]=[5,10]
[sort]=["createdAt","ASC"]

Perform URL encode

[filter]=%7B%22type%22%3A%22REFUND%22%2C%22status%22%3A%22SUCCESS%22%7D
[range]=%5B5%2C10%5D
[sort]=%5B%22createdAt%22%2C%22ASC%22%5D

Form final URL to query

https://ipg.fomopay.net/api/orders/100500020200101000000000/transactions?filter=%7B%22type%22%3A%22REFUND%22%2C%22status%22%3A%22SUCCESS%22%7D&amp;range=%5B5%2C10%5D&amp;sort=%5B%22createdAt%22%2C%22ASC%22%5D

Response

HTTP status codeComments
200OK
400Bad Request
401Unauthorized Access
500Server Error

When HTTP status code is not 2xx and not 5xx

KeyField NameField TypeRequiredComments
hintRequest IDstringMUsed for tracing
codeError codestringMError code
messageError messagestringMError message

When HTTP status code is 2xx

Header

FieldValue
Content-Typeapplication/json
Content-Rangetransactions [begin]-[end]/[total]

Body

A list of objects in JSON. Each object has the following fields

KeyField NameField TypeRequiredComments
idTransaction IDstringMUnique transaction ID generated by FOMO Pay, can be used for query
typeTransaction typestringMOne of SALE, REFUND and DISPUTE
originalIdOriginal transaction IDstringCOriginal SALE transaction ID for REFUND and DISPUTE transactions. Not applicable to SALE transactions
transactionNoTransaction numberstringCMandatory for merchant created transactions. Not applicable to FOMO Pay created transactions
subjectRefund description stringMReturn unchanged
statusTransaction statusstringMSee Appendix 3
createdAtTime of transaction creationnumberMUnix time in seconds
amountTransaction amountstringM
currencyCodeTransaction currencystringMReturn unchanged
sourceOfFundPayment channelstringMSee Appendix 1

6.8 Create Token for Credit Card

Request

NameValue
URLhttps://ipg.fomopay.net/api/tokens?channel=CARD&amp;subMid=[subMID]
[subMID] is an optional field.
MethodPOST
Content-Typeapplication/json

Response

Request Body

KeyField NameField TypeRequiredComments
typeTokenization TypestringMMust be CARD
cardCard DetailsstringM[See Appendix 5 Note 13]

Response Body

KeyField NameField TypeRequiredComments
idToken IDstringM
typeTokenization TypestringMMust be CARD
cardCard DetailsstringM[See Appendix 5 Note 13]

Response Status Code

HTTP status codeComments
200Successful
201Created
400Bad Request
401Unauthorized Access
429Too Many Requests
500Server Error

Example:

Request Body

{
  "type": "card",
  "card": {
    "number": "4417123456789113",
    "expiryYear": "28",
    "expiryMonth": "08",
    "nameOnCard": "First Last Name"
  }
}

Response Body

{
  "id": "c19JQHRQyWvgVNKPevtt25fR1p",
  "type": "card",
  "card": {
    "number": "441712xxxxxx9113",
    "expiryYear": "28",
    "expiryMonth": "08",
    "nameOnCard": "First Last Name"
  }
}

6.9 Get Token

Request

NameValue
URLhttps://ipg.fomopay.net/api/tokens/[tokenId]?channel=CARD&amp;subMid=[subMID]
[subMID] is an optional field.
MethodPOST
Content-Typeapplication/json

Response

Request Body

N/A

Response Body

KeyField NameField TypeRequiredComments
idToken IDstringM
typeTokenization TypestringMMust be card
cardCard DetailsstringM[See Appendix 5 Note 13]

Response Status Code

HTTP status codeComments
200Successful
201Created
400Bad Request
401Unauthorized Access
429Too Many Requests
500Server Error

6.10 Delete Token

Request

NameValue
URLhttps://ipg.fomopay.net/api/tokens/[tokenId]?channel=CARD&amp;subMid=[subMID]
[subMID] is an optional field.
MethodDELETE
Content-Typeapplication/json

Response

Request Body

N/A

Response Body

N/A

Response Status Code

HTTP status codeComments
204No Content
400Bad Request
401Unauthorized Access
429Too Many Requests
500Server Error

7. Transaction Status Update Notification

A transaction status update will be sent to client server when any transaction status has changed.

7.1 Security

⚠️HTTP header field (aka header key) is case-insensitive (https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2). While FOMO Pay will try to ensure header fields (not header value) in lower case, please make sure your code will also work when you see header fields in upper case.

FOMO Pay will send notification to webhook URL using HTTP POST method in the following format:

Content-Type: application/json
X-FOMOPay-Authorization: FOMOPAY1-HMAC-SHA256 <HMACCredentials>

<payload>

The <HMACCredentials> is in following format (field order might change):

Version=1.1,Credential=<MID>,Nonce=<Nonce>,Timestamp=<Timestamp>,Signature=<Signature>

The verification algorithm is as follows:

  1. Client extracts the following HTTP headers from HTTP request.
Version[version]
Credential[credential]
Nonce[nonce]
Timestamp[timestamp]
Signature[signature]
  1. If one or more conditions of the following does not satisfy, reject the request.
  • [version] is 1.1
  • [credential] is your <MID>
  • [nonce] has a length between 16-64 and was not used by gateway notification within 300 seconds
  • [timestamp] (UNIX timestamp in seconds) within ±300 seconds of current time
  1. Client reads request body [payload] from HTTP request.
  2. Client concatenates [payload], [timestamp] and [nonce] to get string [message] to be verified.
  3. Client calculate signature (in lowercase hexadecimal) with HMAC-SHA256 using <PSK> as key and [message] as message.
  4. Reject if the calculated signature does not match [signature].

Example:

Merchant setup:

KeyValue
<MID>100000000000001
<PSK>E00F270DE323E2B187532D8E4B306EB2841AF0BFF08132BAB7F0E62BED6419BB

Notification received at notifyUrl:

Assume current time is 1/Jan/2020 00:02 (GMT+8)

Content-Type: application/json
X-FOMOPay-Authorization: FOMOPAY1-HMAC-SHA256 Version=1.1,Credential=100000000000001,Nonce=b39c7ec8fa58be1041eb3921c9ceb98b,Timestamp=1577808000,Signature=596ecb8f2636ff88eea7b4d4b4841ae822eaa4f1eea9cb1ce1da2953c9db0b05

{"orderId":"100500020200101000000000","orderNo":"order-20200101-000005","transactionId":"100510120200101000000000","transactionNo":"partialrefund-02"}

Verification:

  1. Client extracts the following data from HTTP request.
[version] = 1.1
[credential] = 100000000000001
[nonce] = b39c7ec8fa58be1041eb3921c9ceb98b
[timestamp] = 1577808000
[signature] = 596ecb8f2636ff88eea7b4d4b4841ae822eaa4f1eea9cb1ce1da2953c9db0b05
  1. Verify the following conditions.
  • [version] is 1.1 (true)
  • [credential] is your <MID> (true)
  • [nonce] has a length between 16-64 and was not used by gateway notification within 300 seconds (true)
  • [timestamp] (UNIX timestamp in seconds) within ±300 seconds of current time (true)
  1. Client reads request body [payload] from HTTP request (please DO NOT parse the JSON).
{"orderId":"100500020200101000000000","orderNo":"order-20200101-000005","transactionId":"100510120200101000000000","transactionNo":"partialrefund-02"}
  1. Client concatenates [payload], [timestamp] and [nonce] to get string [message] to be verified.
{"orderId":"100500020200101000000000","orderNo":"order-20200101-000005","transactionId":"100510120200101000000000","transactionNo":"partialrefund-02"}1577808000b39c7ec8fa58be1041eb3921c9ceb98b
  1. Client calculates signature (in lowercase hexadecimal) with HMAC-SHA256 using <PSK> as key and [message] as message.
Calculated signature = 596ecb8f2636ff88eea7b4d4b4841ae822eaa4f1eea9cb1ce1da2953c9db0b05
  1. Reject if the calculated signature does not match [signature].

Calculated signature matches the [signature] received. Merchant server shall reply with HTTP 200 OK immediately at this point. Please continue your business logic after the reply is sent.

7.2 Notification Request

POST notifyUrl
Content-Type: application/json

notifyUrl is the callback URL provided in the order creation request.

KeyField NameField TypeRequiredComments
orderIdFOMO Pay order IDstringMFOMO Pay ID of the order containing the transaction
orderNoMerchant order numberstringMMerchant order number of the order containing the transaction
transactionIdFOMO Pay transaction IDstringMTransaction ID that triggered the notification
transactionNoMerchant transaction numberstringOMerchant transaction number for merchant created transactions. Not applicable otherwise

7.3 Notification Response

HTTP Status Code

200

⚠️Client must respond with HTTP status code 200 as early as possible before any other processing logic. Gateway will retry immediately for up to 3 times when HTTP status code is not 200, response not received in 20 seconds, connection dropped or response body too large. Gateway will suspend (for 5 minutes) sending notification to client if more than 3 notifications fail (notifications for same transaction is counted only once) in 1 minute. All notifications during suspension will be discarded.

HTTP redirection will NOT be followed. HTTP status code 301 (Moved Permanently) or 302 (Found) will be considered as notification failure.

HTTP status code 204 (No Content) will also be considered as notification failure.

Response HTTP body shall not exceed 5 KiB in size, its content will be ignored.

Merchant server shall query latest order status / transaction status using orderId and transactionId received depending on needs.

8. Fraud Detection

⚠️
Fraud detection is only enabled for merchants who are classified as high-risk by FOMO Pay.
Merchants who are not classified as high-risk can skip this section.

High-risk merchants who need to process card payments and perform fraud detection might be required to provide the following fields, and we will handle the fraud detection process.

This section is intended to provide specific clarification on the fraud detection process. These fields are specifically highlighted here as they are required for enabling fraud detection. For detailed parameter integration, please refer to Appendices 9.4 and 9.5.

Direct Mode

Transaction Options
KeyField TypeRequiredComments
payerEmailstringMPayer's email.
payerUserAgentstringMPayer's browser information.
See appendix 9.7 - PayerUserAgent
shippingAddressobjectORequired for physical goods; provides shipping details.
See appendix 9.6 - TPaymentAddress
payerIPstringM

Hosted Mode

Transaction Options
KeyField TypeRequiredComments
payerEmailstringMPayer's email.

9. Appendix

9.1 List of Source of Fund

⚠️Depending on your arrangement with FOMO Pay, your account might not have all the following source of funds.
Source of FundComment
ALIPAYAlipay. Supported types:
  • WEB (Web payment)
  • WAP (Wap payment)
  • APP (In-App payment)
  • MINI_APP (Mini-program payment)
CARDCard payment. Supported card brands:
  • Visa
  • Mastercard
  • American Express
  • Discover
  • Diners Club International
BROWSERBrowser payment. Supported types:
  • Apple Pay
  • Google Pay
  • Microsoft Pay

Other browser payments conforming to Payment Request API
NETSPAYNETS QR code payment
WECHATPAYWeChat Pay. Supported types:
  • NATIVE (QR code payment)
  • JSAPI (Web payment in WeChat App)
  • APP (In-App payment)
  • WXA (Mini-program payment)
  • MWEB (H5 payment)
UNIONPAYUnionPay online payment (UPOP)
GRABPAYGrabPay web payment
PAYNOWPayNow QR code payment
SHOPEEPAYShopeePay. Supported types:
  • MPM (Merchant presented QR code payment)
  • APP (In-App payment or mobile web payment)
ATOMEAtome (3 interest-free installments)
DPTDigital Payment Token payment. Supported types:
  • BTC (Bitcoin)
  • ETH (Ethereum)
  • USDT (Tether, via Ethereum/ERC20 or Tron/TRC20)
  • USDC (USD Coin, via Ethereum/ERC20 or Tron/TRC20)
PAYPALCheckout with PayPal

9.2 Order Status

StatusComment
CREATEDOrder has been created and is ready for payment or payment is being processed
FAILOrder has failed due to linked primary SALE transaction (as indicated in primaryTransactionId) failed
ERRORThe order is in a status that cannot be recovered automatically, please contact FOMO Pay
SUCCESSOrder has been paid successfully and no refund has been created (for primary transaction). Related SALE transaction is indicated in primaryTransactionId
REFUNDOrder has been previously paid successfully and its primary transaction (as indicated in primaryTransactionId) has now been (partially) refunded
CLOSEDOrder is closed, no new SALE transaction can be created

9.3 Transaction Status

StatusComment
CREATEDFor type SALE:
Transaction has been created and waiting for payment or payment is being processed. Please DO NOT create another payment yet to avoid duplicate charge
For type REFUND:
Refund has been submitted and is being processed. Please DO NOT create another refund yet to avoid duplicate refund
FAILFor type SALE:
Payment failed. Any charges will be automatically reversed or refunded if already captured
For type REFUND:
Refund failed
ERRORThe transaction is in a status that cannot be recovered automatically, please contact FOMO Pay
SUCCESSFor type SALE:
Transaction has been captured successfully
For type REFUND:
Transaction has been refunded successfully
REFUNDFor type SALE:
Transaction was previously paid successfully and there are refund transactions created for this sale transactions (does not indicate if the refund transactions are successful)
For type REFUND:
Not applicable
CLOSEDFor type SALE:
Transaction is closed (e.g. transaction not paid within timeout)
For type REFUND:
Not applicable
VOIDFor type SALE:
Transaction has been voided
For type REFUND:
Not applicable

9.4 Transaction Options (HOSTED mode)

⚠️Missing transactionOptions while creating a HOSTED mode order will not fail order creation. However, when a customer selects a payment method which requires corresponding transactionOptions, the payment will fail. Other payment methods (if any) will not be affected if they don’t require any transactionOptions.
SourceOfFundTransaction Options
KeyField TypeRequiredComment
ATOMEpayerNamestringMPayer full name
payerEmailstringOPayer email address
payerPhonestringMPayer phone number
shippingAddressobjectM[Note 1]
billingAddressobjectM[Note 1]
paymentItemsobject[]M[Note 1]
DPT[Note 2]---
PAYPALshippingAddressobjectO[Note 1]
paymentItemsobject[]O[Note 1]
CARD(Fraud Detection)payerEmailstringMPayer email address

[1] Please find below for data types for each key.

KeyField Type
shippingAddressSee Appendix 6 - TPaymentAddress
billingAddressSee Appendix 6 - TPaymentAddress
paymentItemsSee Appendix 6 - TPaymentItem

[2] Please approach FOMO Pay for detailed KYC requirements.

9.5 Transaction Options (DIRECT mode)

SourceOfFundTransaction OptionsResponse Fields
KeyField TypeRequiredCommentthreeDSecureurlcodeUrl
ALIPAY
(WEB)
txnTypestringMWEBXMX
timeoutnumberM60-7200
ALIPAY
(WAP)
txnTypestringMWAPXMX
osTypestringMOne of
IOS
ANDROID
timeoutnumberM60-7200
ALIPAY
(APP)
txnTypestringMAPP[Note 10]
osTypestringMOne of
IOS
ANDROID
timeoutnumberM60-7200
ALIPAY
(MINI_APP)
txnTypestringMMINI_APP[Note 11]
paymentMethodTypestringM[Note 9]
timeoutnumberM60-7200
CARDtimeoutnumberM60-7200MCX
expiryYearstringM00-99
expiryMonthstringM1-12 [Note 1]
nameOnCardstringM
numberstringM
securityCodestringM
ipstringMCustomer IP
threeDSecurestringOOne of
enforced
auto
disabled
[Note 2]
CARD (Fraud Detection)timeoutnumberM60-7200
expiryYearstringM00-99
expiryMonthstringM1-12 [Note 1]
nameOnCardstringM
numberstringM
securityCodestringM
ipstringMCustomer IP
threeDSecurestringOOne of
enforced
auto
disabled
[Note 2]
payerUserAgentstringMSee Appendix 9.7
payerIPstringM
payerNamestringO
payerEmailstringMPayer email address
payerPhonestringO
shippingAddressobjectO[Note 8]
billingAddressobjectO[Note 8]
paymentItemsobject[]O[Note 8]
payerTypestringO[Note 16]
payerobjectC[Note 17]
CARD
(CIT Format)
timeoutnumberM60-7200
ipstringMCustomer IP
threeDSecurestringOOne of enforced
auto
disabled
[Note 2]
txnTypestringMREGULAR
[Note 12]
cardobjectC[Note 13]
tokenobjectC[Note 13]
CARD
(CIT Format and Fraud Detection)
timeoutnumberM60-7200
ipstringMCustomer IP
threeDSecurestringOOne of enforced
auto
disabled
[Note 2]
txnTypestringMREGULAR
[Note 12]
cardobjectC[Note 13]
tokenobjectC[Note 13]
payerUserAgentstringMSee Appendix 9.7
payerIPstringM
payerNamestringO
payerEmailstringMPayer email address
payerPhonestringO
shippingAddressobjectO[Note 8]
billingAddressobjectO[Note 8]
paymentItemsobject[]O[Note 8]
payerTypestringO[Note 16]
payerobjectC[Note 17]
CARD
(MIT Format)
[Note 15]
timeoutnumberM60-7200
ipstringMCustomer IP
threeDSecurestringC[Note 14]
txnTypestringCOne of RECURRING
UNSCHEDULED
cardobjectC[Note 13]
tokenobjectC[Note 13]
merchantInitiated booleanC[Note 14]
merchantInitiatedReasonstringC[Note 14]
originalIdstringC[Note 14]
CARD
(MIT Format and Fraud Detection)
[Note 15]
timeoutnumberM60-7200
ipstringMCustomer IP
threeDSecurestringC[Note 14]
txnTypestringCOne of RECURRING
UNSCHEDULED
cardobjectC[Note 13]
tokenobjectC[Note 13]
merchantInitiated booleanC[Note 14]
merchantInitiatedReasonstringC[Note 14]
originalIdstringC[Note 14]
payerUserAgentstringMSee Appendix 9.7
payerIPstringM
payerNamestringO
payerEmailstringMPayer email address
payerPhonestringO
shippingAddressobjectO[Note 8]
billingAddressobjectO[Note 8]
paymentItemsobject[]O[Note 8]
payerTypestringO[Note 16]
payerobjectC[Note 17]
NETSPAYtimeoutnumberM60-7200XMX
WECHATPAY
(NATIVE)
txnTypestringMNATIVEXXM
timeoutnumberM60-7200
WECHATPAY
(JSAPI)
txnTypestringMJSAPIXMX
timeoutnumberM60-7200
openidstringM[Note 3]
openidEncryptedbooleanODefault false
[Note 3]
ipstringMCustomer IP
openidTypestringOValues: auto (default), primary, secondary
WECHATPAY
(APP)
txnTypestringMAPP[Note 4]
timeoutnumberM60-7200
WECHATPAY
(WXA)
txnTypestringMWXA[Note 5]
timeoutnumberM60-7200
openidstringM[Note 3]
WECHATPAY
(MWEB)
txnTypestringMMWEBXMX
timeoutnumberM60-7200
ipstringMCustomer IP
UNIONPAY
(WEB)
txnTypestringMWEBXMX
timeoutnumberM60-7200
UNIONPAY
(QRCODE)
txnTypestringMQRCODEXXM
timeoutnumberM60-7200
GRABPAYtimeoutnumberM60-7200XMX
PAYNOWtimeoutnumberM60-7200XXM
SHOPEEPAY
(MPM)
txnTypestringMMPMXXM
timeoutnumberM60-7200
SHOPEEPAY
(APP)
txnTypestringMAPP[Note 6]
timeoutnumberM60-3600
platformTypestringMOne of
app
pc
mweb
ATOMEtimeoutnumberM60-7200XMX
payerNamestringMFull name
payerEmailstringOEmail address
payerPhonestringMPhone number
shippingAddressobjectM[Note 8]
billingAddressobjectM[Note 8]
paymentItemsobject[]M[Note 8]
DPTtimeoutnumberM60-7200XMX
[Note 7]---
PAYPALtxnTypestringMWEBXMX
timeoutnumberM60-7200
shippingAddressobjectO[Note 8]
paymentItemsobject[]O[Note 8]

[*] Please include returnUrl in request if url in Response Fields is mandatory or conditional.

[*] Transaction timeout may not work with some of the source of funds due to the following reasons. Do not infer transaction status even if the transaction appears to be timed out. Instead, always use transaction status retrieved from FOMO Pay.

  • Some sourceOfFunds use different start time from order creation time for timeout calculations (which renders timeouts less useful)
  • Some sourceOfFunds accept timeouts but do not follow timeouts accurately
  • Some sourceOfFunds do not accept timeouts at all

[1] Zero-padding or leading zero is a valid and supported convention for representing months. E.g. Both “8” and “08” (for August) are supported.

[2] Description of 3-D Secure Options.

OptionComment
auto(Default to this value if not provided.) The merchant chooses to use FOMO Pay 3-D Secure rules.
Response threeDSecure flag can be true or false depending on evaluation result.
(Indicative Mode only: Indicates merchant has no preference on 3-D Secure, check threeDSecure in response for final decision.)
enforcedRequires customers complete 3-D Secure challenge before pre-authorization. Reject the payment if the customer fails to complete the challenge or 3-D Secure is not supported by the card issuer.
Response threeDSecure will be true.
(Indicative Mode only: Indicates merchant prefers payment with 3-D Secure enabled, check threeDSecure in response for final decision.)
disabledIndicates the payment shall be pre-authorized without 3-D Secure challenge. Reject the payment if 3-D Secure is required by the card issuer.
Response threeDSecure will be false.
(Indicative Mode only: Indicates merchant prefers payment with 3-D Secure disabled, check threeDSecure in response for final decision.)

[3] Please approach FOMO Pay for configuration and instructions on getting openid.

[4] Response field will be an object named payReq in the following format.

KeyField NameField TypeRequiredComments
appidWeChat App IDstringMPlease approach FOMO Pay for App ID binding
partneridWeChat MIDstringMPlease approach FOMO Pay for MID registration or binding
prepayidPrepay session IDstringM
packageExtended datastringM
noncestrCryptographic noncestringM
timestampUnix timestampstringM
signSignaturestringM

[5] Response field will be an object named payReq in the following format.

KeyField NameField TypeRequiredComments
appidWeChat App IDstringMPlease approach FOMO Pay for App ID binding
timestampUnix timestampstringM
noncestrCryptographic noncestringM
packageExtended datastringM
signTypeHashing algorithm used for signingstringM
paysignSignaturestringM

[6] Please include returnUrl in request. Response field will be an object named payReq in the following format.

KeyField NameField TypeRequiredComments
appMobile deep linkstringMMobile deep link to launch Shopee App
httpUniversal linkstringMRedirect to a web page which will detect and launch Shopee App if installed

[7] Please approach FOMO Pay for detailed KYC requirements.

[8] Please find data types below for each key.

KeyField Type
shippingAddressSee Appendix 6 - TPaymentAddress
billingAddressSee Appendix 6 - TPaymentAddress
paymentItemsSee Appendix 6 - TPaymentItem

[9] Please find the allowed paymentMethodType below.

paymentMethodTypeWallet that hosts the mini program
TRUEMONEYTrueMoney Wallet
ALIPAY_HKAlipayHK Wallet
TNGTouch 'n Go eWallet
ALIPAY_CNAlipayCN Wallet
GCASHGCash Wallet
DANADANA Wallet

[10] Response field will be an object named payReq in the following format.

KeyField NameField TypeRequiredComments
normalUrlPayment URLstringM(Non-SDK integration solution) The payment URL that redirects users to a WAP or Web page in the browser or in the WebView
paymentDataPayment data for SDKstringC(SDK integration solution) Returned if the merchant app has integrated the Alipay+ client SDK. Contains payment data that is used by the Alipay+ client SDK to render the checkout page

[11] Response field will be an object named payReq in the following format.

KeyField NameField TypeRequiredComments
normalUrlPayment datastringMPayment data for mini program

[12] txnType options will be based on whether a regular card transaction, customer-initiated transaction or a merchant-initiated transaction is done.

Nature of Transaction txnTypeComments
Customer-InitiatedREGULARFor customer-transaction with or without token either REGULAR or can leave field as undefined
Merchant-InitiatedRECURRINGFor eventual merchant-initiated transaction, starting from the first transaction must use either RECURRING or UNSCHEDULED
UNSCHEDULED

[13] Data types and fields for the card and token object. The card and token objects are used to initiate CIT or MIT transactions. It is recommended that only one; either the card or token object be sent at payload. If both are sent, the card object will take precedence to initiate the card transaction.

Card

KeyField TypeRequiredComments
numberstringM
expiryYearstringM00-99
expiryMonthstringMZero-padding is supported. 1-12.
securityCodestringO
nameOnCardstringO

Token

KeyField TypeRequiredComments
idstringMTokenized card details
securityCodestringO

[14] Additional fields and specification for threeDSecure field for MIT.

KeyField TypeRequiredComments
merchantInitiatedbooleanCMust be false for 1st transaction.
Must be true for subsequent transactions (2nd, 3rd, 4th etc.)
merchantInitiatedReasonstringCMust be present for subsequent transactions.
One of below:
DELAYED_CHARGE
RESUBMISSION
NO_SHOW
REAUTHORIZATION
originalIdstringCMust be present for subsequent transactions. This refers to the primaryTransactionId for the 1st transaction.
threeDSecurestringCMust be enforced for the 1st transaction.
Must be disabled for subsequent transactions.

[15] Sample request body for MITs

1st Transaction

where threeDSecure is enforced and merchantInitiated is false

{
  "mode": "DIRECT",
  "orderNo": "TEST_MIT001",
  "subject": "FOMOPAY UAT TEST",
  "description": "FOMOPAY UAT TEST",
  "backUrl": "https://fomopay.com/",
  "returnUrl": "https://fomopay.com/",
  "notifyUrl": "http://localhost:443",
  "currencyCode": "SGD",
  "amount": "12.34",
  "sourceOfFund": "CARD",
  "transactionOptions": {
    "timeout": 300,
    "txnType": "RECURRING",
    "ip": "167.163.152.53",
    "threeDSecure": "enforced",
    "merchantInitiated": false,
    "token": {
      "id": "c1FbwzRxQ6xMj3EWvydzkV0SkA"
    }
  }
}

2nd Transaction and onwards

where threeDSecure is disabled, merchantInitiated is true, and merchantInitiatedReason plus originalId (the primaryTransactionId of the 1st transaction) are required

{
  "mode": "DIRECT",
  "orderNo": "TEST_MIT002",
  "subject": "FOMOPAY UAT TEST",
  "description": "FOMOPAY UAT TEST",
  "backUrl": "https://fomopay.com/",
  "returnUrl": "https://fomopay.com/",
  "notifyUrl": "http://localhost:443",
  "currencyCode": "SGD",
  "amount": "12.34",
  "sourceOfFund": "CARD",
  "transactionOptions": {
    "timeout": 300,
    "txnType": "RECURRING",
    "ip": "167.163.152.53",
    "threeDSecure": "disabled",
    "merchantInitiated": true,
    "merchantInitiatedReason": "NO_SHOW",
    "token": {
      "id": "c1FbwzRxQ6xMj3EWvydzkV0SkA"
    },
    "originalId": "100510020231010227133206"
  }
}

[16] Please find the allowed payerType below.

payerTypeComment
INDIVIDUALFields applicable for individual payers.
BUSINESSFields applicable for business payers.

[17] payer fields based on payerType.

payer
See Appendix 6 - TIndividual
See Appendix 6 - TBusiness

9.6 Data Types

TPaymentAddress

KeyField TypeRequiredComments
citystringMName of city or town
countrystringMCountry code in ISO-3166-1 alpha-2
dependentLocalitystringMName of dependent locality or sublocality within a city
organizationstringMName of the organization
phonestringMTelephone number of the recipient or contact person
postalCodestringMPostal code
recipientstringMName of the recipient, purchaser, or contact person at the payment address
regionstringMTop level administrative subdivision of the country, for example a state, province, oblast, or prefecture
addressLinestring[]MAn array of string providing each line of the address

TPaymentItem

KeyField TypeRequiredComments
labelstringMName of the item
amountobjectMPrice of items
[Note 1]
skustringMStock-keeping unit
quantitynumberMNumber of items

[1] Please see below for amount format.

KeyField NameField TypeRequiredComments
currencyCurrency codestringMISO 4217 currency code
e.g. SGD
Must use the same currency code as in order
valueAmountstringMTo lowest currency unit
e.g. 10.00 for SGD, 10 for JPY

TBusiness

KeyField TypeRequiredComments
namestringMName of the business
idobjectMSee Appendix 6 - TBusinessID
addressobjectMSee Appendix 6 - TBusinessAddress
placeOfIncorporationstringMPlace of incorporation

TBusinessID

KeyField TypeRequiredComments
typestringM"LEI","REGISTRATION_ID"
valuestringM
countryOfIssuestringMCountry code in ISO-3166-1 alpha-2

TBusinessAddress

KeyField TypeRequiredComments
citystringMName of city or town
countrystringMCountry code in ISO-3166-1 alpha-2
dependentLocalitystringOName of dependent locality or sublocality within a city
postalCodestringMPostal code
regionstringOTop level administrative subdivision of the country, for example a state, province, oblast, or prefecture
addressLinestring[]MAn array of string providing each line of the address

TIndividual

KeyField TypeRequiredComments
namestringMName
idobjectMSee Appendix 6 - TIndividualID
addressobjectMSee Appendix 6 - TIndividualAddress
dateOfBirthstringMe.g. 2012-12-01
placeOfBirthstringM

TIndividualID

KeyField TypeRequiredComments
typestringM"ID_CARD","PASSPORT"
valuestringM
countryOfIssuestringMCountry code in ISO-3166-1 alpha-2

TIndividualAddress

KeyField TypeRequiredComments
citystringMName of city or town
countrystringMCountry code in ISO-3166-1 alpha-2
dependentLocalitystringOName of dependent locality or sublocality within a city
postalCodestringMPostal code
regionstringOTop level administrative subdivision of the country, for example a state, province, oblast, or prefecture
addressLinestring[]MAn array of string providing each line of the address

9.7 PayerUserAgent

Payer's http user-agent.

Mozilla/5.0 (iPhone; CPU iPhone OS 17_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1

9.8 returnUrl

The returnUrl parameter behaves differently for WeChatPay's JSAPI and MWEB integration modes.

1. JSAPI Mode:Optional

  • If provided:
    FOMO Pay will host a payment landing page. After the user completes the payment on this page, they will be redirected to the specified returnUrl.
  • If not provided:
    FOMO Pay will directly return the necessary parameters (TPayReqJsapi) for initiating the payment through WeChat's JSAPI. Merchants need to handle the payment flow using these parameters.

2. MWEB Mode:Not Supported

  • The returnUrl parameter cannot be passed in MWEB mode. If provided, the request will be rejected.

For other sources of fund, returnUrl in request should be included if url in Response Fields is mandatory or conditional. See appendix 9.5.

On this page