Logoelepay
Customer

Create source

Creates a customer source.

POST
/customers/{customerId}/sources
AuthorizationBearer <token>

API authentication is performed via Bearer auth using the secret key as the bearer token. The secret key is a critical key that allows all API operations, so handle it with care.

In: header

Path Parameters

customerId*string

Customer ID

Request Body

application/json

Customer source request

paymentMethod*string

Payment method

  • auto Auto detection (available for CPM payments only)
  • alipay Alipay
  • alipayhk AlipayHK
  • alipayplus Alipay+
  • amazonpay Amazon Pay
  • applepay Apple Pay
  • applepay_cn Apple Pay (China)
  • atokara Atokara
  • atone atone (pay next month at convenience stores)
  • aupay au Pay
  • clicktopay Click To Pay
  • banktransfer Bank transfer
  • creditcard Credit card
  • dana DANA
  • docomopay d Payment
  • ezlink EZ-Link
  • felica E-money
  • felica_id iD
  • felica_quickpay QUICPay
  • felica_transport_ic Transit IC card
  • gcash GCash
  • ginkopay Bank Pay
  • googlepay Google Pay
  • jcoinpay J-Coin Pay
  • jkopay JKOPAY
  • kakaopay Kakao Pay
  • konbini Convenience store payment
  • linepay LINE Pay
  • merpay Merpay
  • origamipay Origami Pay
  • paidy Paidy (pay next month)
  • paypal PayPal
  • paypay PayPay
  • pxpayplus AllPay
  • rakutenpay Rakuten Pay
  • smartcode Smart Code
  • tng Touch 'n Go eWallet
  • truemoney TrueMoney
  • unionpay UnionPay QuickPass
  • wechatpay Wechat Pay
  • aeonpay AEON Pay
  • rabbitlinepay Rabbit LINE Pay
  • bpi BPI
  • boost Boost
  • hellomoney HelloMoney by AUB
  • tosspay Toss Pay
  • naverpay Naver Pay
  • wellwa WellWa Points
  • grabpay Grab Pay
  • momopay Momo Pay
  • promptpay Prompt Pay
  • wovenpay Woven City Pay
Value in"alipay" | "alipayhk" | "alipayplus" | "amazonpay" | "applepay" | "applepay_cn" | "atokara" | "atone" | "aupay" | "clicktopay" | "banktransfer" | "creditcard" | "dana" | "docomopay" | "ezlink" | "felica" | "felica_id" | "felica_quickpay" | "felica_transport_ic" | "gcash" | "ginkopay" | "googlepay" | "jcoinpay" | "jkopay" | "kakaopay" | "konbini" | "linepay" | "merpay" | "origamipay" | "paidy" | "paypal" | "paypay" | "pxpayplus" | "rakutenpay" | "smartcode" | "tng" | "truemoney" | "unionpay" | "wechatpay" | "aeonpay" | "rabbitlinepay" | "bpi" | "boost" | "hellomoney" | "tosspay" | "naverpay" | "wellwa" | "grabpay" | "momopay" | "promptpay" | "wovenpay" | "auto"
resource*string

Payment resource

  • web Web browser
  • ios iOS native app
  • android Android native app
  • liff LINE LIFF app
  • mini WeChat Mini Program
  • cpm CPM payment (customer-presented QR code)
  • mpm MPM payment (merchant-presented QR code)
  • reader Card reader payment (reader device required)
  • posapp POS app payment (POS app integration required)
Value in"web" | "ios" | "android" | "liff" | "mini" | "cpm" | "mpm" | "reader" | "posapp"
description?string

Description of the customer source

extra?

Used when there is additional payment-related information. For details, refer to 'Developer Guide -> Source Extra Information Settings'.

metadata?

Metadata

Response Body

application/json;charset=utf-8

curl -X POST "https://api.elepay.io/customers/string/sources" \  -H "Content-Type: application/json" \  -d '{    "paymentMethod": "alipay",    "resource": "web"  }'
{
  "id": "string",
  "object": "source",
  "liveMode": true,
  "paymentMethod": "alipay",
  "resource": "web",
  "description": "string",
  "extra": {
    "property1": "string",
    "property2": "string"
  },
  "info": {
    "property1": {},
    "property2": {}
  },
  "cardInfo": {
    "brand": "string",
    "last4": "string",
    "expMonth": 0,
    "expYear": 0,
    "name": "string",
    "wallet": "string",
    "walletApp": "string",
    "repaymentType": "string",
    "approvalCode": "string",
    "threeDSecure": true,
    "threeDSecureVersion": "string",
    "threeDSecureDetail": "string",
    "businessType": "string",
    "konbiniScanTime": 0,
    "konbiniType": "string",
    "receivedAmount": 0,
    "receivedTime": 0,
    "bankUserCode": "string",
    "bankUserName": "string",
    "bankName": "string",
    "bankBranchName": "string",
    "bankAccountNo": "string"
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "credential": "string",
  "status": "pending"
}