Off-Session Payment API
Create a OffSessionPayment request to initiate a payment with Jamm. This happens off-session, meaning a redirect link won't be returned, and the payment will be executed directly within your application. You can call this API to charge an existing customer (by including a customer ID in the request), or create one by omitting it.
Overview
The Off-Session Payment API allows you to:
- Create a charge for a new customer (if no Customer ID is provided)
- Create a charge for an existing customer (if a Customer ID is provided)
- Execute a payment without redirecting anywhere
- Optionally send/collect metadata and other KYC information
Request Parameters
- Customer Object
- Charge Object
Parameter | Type | Required | Description |
---|---|---|---|
customer_id | string | Required | Customer ID |
Parameter | Type | Required | Description |
---|---|---|---|
price | number | Optional | Amount to charge in JPY |
description | string | Optional | Description of the charge |
metadata | object | Optional | Additional data for the charge |
Response
- Success Response
- Response Fields
{
"charge": {
"id": "chg-73d45202-c751-40ac-8b8d-52eb8b009f53",
"price": 100,
"description": "商品の説明",
"metadata": {
"order_id": "order_456"
}
}
Field | Type | Description |
---|---|---|
charge.id | string | Always Unique identifier for the charge |
charge.price | number | Always Amount to be charged in JPY |
charge.metadata | object | Optional Additional data for the charge |
Error Codes
INVALID_REQUEST
Missing or invalid parameters in the request
KYC_REQUIRED
Customer must complete KYC verification before proceeding
INVALID_AMOUNT
The charge amount is invalid or outside allowed range