Source API
Create and retrieve payment sources. Sources are methods for accepting payments through non-credit-card channels (including Alipay, convenience store, internet banking and installment payments).
Attributes
Name | Type | Description |
---|---|---|
object | string | The string |
id | string | The source identifier matching |
livemode | boolean | Whether this is a live ( |
location | string | API path to retrieve the current |
absorption_type | string | Which entity absorbs interest for installment payments. One of |
amount | integer | Source amount in smallest unit of source currency |
bank | string | Bank ( |
barcode | string | Barcode number ( |
billing | object | Billing address. See source creation parameters for more details. |
charge_status | string | Status of charge created using this source (if any). Value is one of allowed |
created | string | UTC datetime of source creation in ISO 8601 format ( |
currency | string | Currency for source as three-letter ISO 4217 code |
discounts | array | Discounts ( |
string | Payer email address ( |
|
flow | string | The payment flow payers need to go through to complete the payment. One of
|
installment_terms | integer | Installment term in months. See installments for allowed values ( |
ip | string | IP address provided to Opn Payments at source creation. May be IPv4 or IPv6. |
items | array | Information about items included in the order. See source creation parameters for more details. |
mobile_number | string | Payer phone number ( |
name | string | Payer name ( |
phone_number | string | Payer phone number ( |
platform_type | string | Platform from which payer is making a payment. One of WEB, IOS, or ANDROID. |
promotion_code | string | The code that grants access to special offers or discounts provided by the service provider. |
provider_references | object | Denotes the transaction references for payments made. The following payment methods return transaction references:
This object returns |
receipt_amount | integer | Receipt amount ( |
references | object | Reference information about the payment ( |
scannable_code | barcode | Barcode object |
shipping | object | Shipping address. See source creation parameters for more details. |
store_id | string | Store ID for payment source ( |
store_name | string | Store name for payment source ( |
terminal_id | string | Terminal ID for payment source ( |
type | string | Payment source type |
Example
-
JSON Response
{ "object": "source", "id": "src_test_no1t4tnemucod0e51mo", "livemode": false, "location": "/sources/src_test_no1t4tnemucod0e51mo", "amount": 12345, "bank": null, "barcode": "1234567890", "created": "2019-12-31T12:59:59Z", "currency": "thb", "email": null, "flow": "offline", "installment_terms": null, "name": null, "mobile_number": null, "phone_number": null, "platform_type": null, "scannable_code": null, "billing": null, "shipping": null, "items": [], "references": null, "store_id": "store_1", "store_name": "store 1", "terminal_id": "POS-01", "type": "barcode_alipay", "absorption_type": null, "charge_status": "unknown", "receipt_amount": null, "discounts": [] }