Skip to main content

On-Session Payment API

Create a OnSessionPayment request to initiate a payment with Jamm. This happens on-session, meaning a redirect link will be returned, to redirect the user to Jamm for executing the payment. You can call this API to charge an existing customer (by including a customer ID in the request), or create one by omitting it.

POST/api.v1.PaymentService/OnSessionPayment

buyer

charge

redirect

Request Body
{}

Overview

The Online 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)
  • Generate a payment link for the customer
  • Optionally send/collect metadata and other KYC information

On-Session Payment POST

Endpoint

POST /api.v1.PaymentService/OnSessionPayment

Request Parameters

ParameterTypeRequiredDescription
emailstringRequiredCustomer's email address
customer_idstringOptionalCustomer ID
force_kycbooleanOptionalWhether to require KYC verification
namestringOptionalCustomer's full name
katakana_last_namestringOptionalCustomer's last name in katakana
katakana_first_namestringOptionalCustomer's first name in katakana
addressstringOptionalCustomer's address
birth_datestringOptionalCustomer's birth date (YYYY-MM-DD)
genderstringOptionalCustomer's gender ("male" or "female")
metadataobjectOptionalAdditional data for tracking

Response

{
"charge": {
"id": "chg-73d45202-c751-40ac-8b8d-52eb8b009f53",
"price": 100,
"description": "商品の説明",
"metadata": {
"order_id": "order_456"
},
"customer": {
"id": "cus-ct7c7p31ihult8kvli20",
"email": "example@email.jp",
"createdAt": "2024-12-03T08:40:04.924031Z",
"updatedAt": "2024-12-03T08:40:04.924031Z"
},
"expiresAt": "2024-12-03T10:10:04.923338257Z"
},
"paymentLink": {
"url": "https://pay.jamm-pay.jp/payment?payment_id=09e09114-f0ac-4c2a-a669-8ad1c07b7209",
"expiresAt": "2024-12-03T10:10:04.923338257Z"
}
}

Error Codes

INVALID_REQUEST

Missing or invalid parameters in the request

PAYMENT_EXPIRED

The payment link has expired (90 minutes after creation)

KYC_REQUIRED

Customer must complete KYC verification before proceeding

CUSTOMER_EXISTS

A customer with this email already exists

INVALID_AMOUNT

The charge amount is invalid or outside allowed range

Sequence Diagram