Recipient(送金先)
Recipient(送金先) API リファレンス
Attributes
Name | Type | Description |
---|---|---|
object | string | 固定値 |
id | string |
|
livemode | boolean | 本番モード ( |
location | string | 現在の |
activated_at | string | 追加振込先口座がアクティベートされたISO 8601形式 ( |
active | boolean | 追加振込先口座がアクティブかどうか。 |
bank_account | bank_account | 追加振込先口座の銀行口座。 |
created | string | ISO 8601 形式( |
default | boolean | 追加振込先口座がデフォルトのアカウントかどうか。 |
deleted | boolean | 追加振込先口座が削除されたかどうか。 |
description | string | 追加振込先口座の説明。 |
string | 追加振込先口座に紐づけられたメールアドレス。 |
|
failure_code | string | 追加振込先口座の作成に失敗した際のエラーコード。 |
metadata | object | 追加振込先口座用のカスタムメタデータ(例: |
name | string | 追加振込先口座名。 |
schedule | object_id_expandable | 追加振込先口座に紐付けられた送金スケジュール。 |
tax_id | string | 追加振込先口座先のTax ID。 |
type | string | 追加振込先口座の種類。 |
verified | boolean | 追加受取口座が検証されたかどうか。 |
verified_at | string | 追加振込先口座が検証されたISO 8601形式( |
Example
-
JSON Response
{ "object": "recipient", "id": "recp_test_no1t4tnemucod0e51mo", "livemode": false, "bank_account": { "object": "bank_account", "account_type": null, "bank_code": null, "branch_code": null, "brand": "bbl", "created": "2019-12-31T12:59:59Z", "last_digits": "1234", "name": "Somchai Prasert" }, "schedule": null, "active": true, "default": false, "verified": false, "description": null, "email": "somchai.prasert@example.com", "failure_code": null, "location": "/recipients/recp_test_no1t4tnemucod0e51mo", "metadata": {}, "name": "Somchai Prasert", "tax_id": null, "type": "individual", "created": "2019-12-31T12:59:59Z", "verified_at": null, "activated_at": "2019-12-31T12:59:59Z" }
新しい送金先を作成
- POST https://api.omise.co/recipientsCreates and returns a new recipient.
Request Parameters
Name | Type | Description |
---|---|---|
bank_account | object | (任意) 追加振込先口座の銀行口座。 |
description | string | (任意) 追加振込先口座の説明。 |
string | (任意) 追加振込先口座に紐づけられたメールアドレス。 |
|
metadata | object | (任意) 追加振込先口座用のカスタムメタデータ(例: |
name | string | (任意) 追加振込先口座名。 |
tax_id | string | (任意) 追加振込先口座先のTax ID。 |
type | string | (任意, one of: |
Example
-
Create a recipient (Thailand and Singapore)
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/recipients \ -u $OMISE_SECRET_KEY: \ -d "name=Somchai Prasert" \ -d "email=somchai.prasert@example.com" \ -d "description=Additional information about Somchai Prasert." \ -d "type=individual" \ -d "tax_id=1234567890" \ -d "bank_account[brand]=bbl" \ -d "bank_account[number]=acc12345" \ -d "bank_account[name]=Somchai Prasert"
<?php $recipient = OmiseRecipient::create(array( 'name' => 'Omise Tester', 'description' => 'Tester account', 'email' => 'tester@omise.co', 'type' => 'individual', 'tax_id' => '', 'bank_account' => array( 'brand' => 'bbl', 'number' => '1234567890', 'name' => 'Tester Account' ) ));
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const recp = await omise.recipients.create({ name: 'Somchai Prasert', email: 'somchai.prasert@example.com', type: 'individual', bank_account: { brand: 'bbl', number: '1234567890', name: 'SOMCHAI PRASERT', }, }); console.log(recp);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" recipient = Omise::Recipient.create({ name: "Somchai Prasert", email: "somchai.prasert@example.com", type: "individual", bank_account: { brand: "bbl", number: "1234567890", name: "SOMCHAI PRASERT" } })
var recipient = await Client.Recipients.Create(new CreateRecipientRequest { Name = "John Doe", Email = "john.doe@example.com", Description = "John Doe (user: 30)", Type = RecipientType.Individual, BankAccount = new BankAccountRequest { Brand = "kbank", Number = "7777777777", Name = "Dohn Joe", }, }); Console.WriteLine($"created recipient: {recipient.Id}");
Recipient recipient = client.recipients() .create(new Recipient.Create() .name("Somchai Prasert") .email("somchai.prasert@example.com") .type(RecipientType.Individual) .bankAccount(new BankAccount.BankAccountParams() .brand("bbl") .number("1234567890") .name("SOMCHAI PRASErT"))); System.out.printf("created recipient: %s", recipient.getId());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" recipient = omise.Recipient.create( name="Somchai Prasert", email="somchai.prasert@example.com", type="individual", bank_account=dict(brand="bbl", number="1234567890", name="SOMCHAI PRASERT"), )
client, _ := omise.NewClient( "pkey_test_no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.Recipient{} err := client.Do(result, &operations.CreateRecipient{ Name: "Somchai Prasert", Email: "somchai.prasert@example.com", Type: omise.Individual, BankAccount: &omise.BankAccount{ Brand: "bbl", Number: "123456789", Name: "SOMCHAI PRASERT", }, }) if err != nil { log.Fatalln(err) } log.Println(result)
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Recipient.create( name: "Somchai Prasert", email: "somchai.prasert@example.com", type: "individual", bank_account: [ brand: "bbl", number: "1234567890", name: "SOMCHAI PRASERT" ] )
-
Create a recipient (Japan)
- curl
curl https://api.omise.co/recipients \ -u $OMISE_SECRET_KEY: \ -d "name=Somchai Prasert" \ -d "email=somchai.prasert@example.com" \ -d "description=Additional information about Somchai Prasert." \ -d "type=individual" \ -d "bank_account[bank_code]=0001" \ -d "bank_account[branch_code]=001" \ -d "bank_account[account_type]=normal" \ -d "bank_account[number]=0000001" \ -d "bank_account[name]=Somchai Prasert"
送金先情報を削除
- DELETE https://api.omise.co/recipients/{id}Destroys the recipient matching :id
.
Example
-
送金先情報を削除
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/recipients/recp_test_5g03h1x1mbpgxp8h1fh \ -X DELETE \ -u $OMISE_SECRET_KEY:
<?php $recipient = OmiseRecipient::retrieve('recp_test_4z6p7e0m4k40txecj5o'); $recipient->destroy();
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const recp = await omise.recipients.destroy('recp_test_no1t4tnemucod0e51mo'); console.log(recp);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" recipient = Omise::Recipient.retrieve("recp_test_5086xmr74vxs0ajpo78") recipient.destroy
var recipient = RetrieveRecipient(); recipient = await Client.Recipients.Destroy(recipient.Id); Console.WriteLine($"destroyed recipient: {recipient.Id} ({recipient.Deleted})");
Recipient recipient = client.recipients().destroy("recp_test_4z6p7e0m4k40txecj5o"); System.out.printf("destroyed recipient: %s", recipient.getId());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" recipient = omise.Recipient.retrieve("recp_test_no1t4tnemucod0e51mo") recipient.destroy()
client, _ := omise.NewClient( "pkey_test_no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.Deletion{} err := client.Do(result, &operations.DestroyRecipient{ RecipientID: "recp_test_no1t4tnemucod0e51mo", })
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Recipient.destroy("recp_test_5086xmr74vxs0ajpo78")
送金先のリストを取得
- GET https://api.omise.co/recipientsrecipientに属するすべての お客様のアカウントオブジェクトの list を返します。
Request Parameters
Name | Type | Description |
---|---|---|
from | string | (任意, default: |
limit | integer | (任意, default: |
offset | integer | (任意, default: |
order | string | (任意, default: |
to | string | (任意) ISO 8601形式 ( |
Example
-
送金先のリストを取得
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/recipients \ -u $OMISE_SECRET_KEY:
<?php $recipient = OmiseRecipient::retrieve();
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const recp = await omise.recipients.list(); console.log(recp);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" recipients = Omise::Recipient.list
var recipients = await Client.Recipients.GetList(order: Ordering.ReverseChronological); Console.WriteLine($"total recipients: {recipients.Total}");
ScopedList<Recipient> recipients = client.recipients().list(); System.out.printf("returned recipients: %d", recipients.getData().size()); System.out.printf("total no. of recipients: %d", recipients.getTotal());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" recipients = omise.Recipient.retrieve()
client, _ := omise.NewClient( "pkey_test_no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.RecipientList{} err := client.Do(result, &operations.ListRecipients{ operations.List{ Offset: 100, Limit: 20, }, }) if err != nil { log.Fatalln(err) } log.Println(result)
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Recipient.list
送金先情報を取得
- GET https://api.omise.co/recipients/{id}Returns the recipient matching :id
.
Example
-
送金先情報を取得
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/recipients/recp_test_5g03h1x1mbpgxp8h1fh \ -u $OMISE_SECRET_KEY:
<?php $recipient = OmiseRecipient::retrieve('recp_test_4z6p7e0m4k40txecj5o');
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const recp = await omise.recipients.retrieve('recp_test_no1t4tnemucod0e51mo'); console.log(recp);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" recipient = Omise::Recipient.retrieve("recp_test_5086xmr74vxs0ajpo78")
var recipientId = "recp_test_57po4c5obpi7rrxhtyl"; var recipient = await Client.Recipients.Get(recipientId); Console.WriteLine($"recipient account last digits: {recipient.BankAccount.LastDigits}");
Recipient recipient = client.recipients().get("recp_test_4z6p7e0m4k40txecj5o"); System.out.printf("recipient's email: %s", recipient.getEmail());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" recipient = omise.Recipient.retrieve("recp_test_no1t4tnemucod0e51mo")
client, _ := omise.NewClient( "pkey_test_no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.Recipient{} err := client.Do(result, &operations.RetrieveRecipient{ RecipientID: "recp_test_no1t4tnemucod0e51mo", }) if err != nil { log.Fatalln(err) } log.Println(result)
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Recipient.retrieve("recp_test_5086xmr74vxs0ajpo78")
送金先情報を更新
- PATCH https://api.omise.co/recipients/{id}Returns an updated recipient
Request Parameters
Name | Type | Description |
---|---|---|
bank_account | object | (任意) 追加振込先口座の銀行口座。 |
description | string | (任意) 追加振込先口座の説明。 |
string | (任意) 追加振込先口座に紐づけられたメールアドレス。 |
|
metadata | object | (任意) 追加振込先口座用のカスタムメタデータ(例: |
name | string | (任意) 追加振込先口座名。 |
tax_id | string | (任意) 追加振込先口座先のTax ID。 |
type | string | (任意, one of: |
Example
-
送金先情報を更新
- curl
- php
- node.js
- ruby
- C#
- java
- python
- go
- elixir
curl https://api.omise.co/recipients/recp_test_5g03h1x1mbpgxp8h1fh \ -X PATCH \ -u $OMISE_SECRET_KEY: \ -d "name=John Smith" \ -d "email=somchai.prasert@example.com" \ -d "bank_account[number]=acc123456789"
<?php $recipient = OmiseRecipient::retrieve('recp_test_4z6p7e0m4k40txecj5o'); $recipient->update(array( 'name' => 'Omise Tester', 'email' => 'tester@omise.co', 'description' => 'Another description' ));
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const recp = await omise.recipients.update( 'recp_test_no1t4tnemucod0e51mo', { email: 'somchai@prasert.com', bank_account: { brand: 'kbank', number: '1234567890', name: 'SOMCHAI PRASERT', }, }, ); console.log(recp);
require "omise" Omise.secret_api_key = "skey_test_4xs8breq3htbkj03d2x" recipient = Omise::Recipient.retrieve("recp_test_5086xmr74vxs0ajpo78") recipient.update({ email: "somchai@prasert.com", bank_account: { brand: "kbank", number: "1234567890", name: "SOMCHAI PRASERT" } })
var recipientId = "recp_test_57po4c5obpi7rrxhtyl"; var recipient = await Client.Recipients.Update(recipientId, new UpdateRecipientRequest { Name = "Dohn Joe", Email = "dohn.joe@example.com", }); Console.WriteLine($"updated recipient: {recipient.Id}");
Recipient recipient = client.recipients() .update("recp_test_4z6p7e0m4k40txecj5", new Recipient.Update() .email("somchai@prasert.com") .bankAccount(new BankAccount.BankAccountParams() .brand("kbank") .number("1234567890") .name("SOMCHAI PRASERT"))); System.out.printf("updated recipient: %s", recipient.getId());
import omise omise.api_secret = "skey_test_no1t4tnemucod0e51mo" recipient = omise.Recipient.retrieve("recp_test_no1t4tnemucod0e51mo") recipient.update( email="somchai@prasert.com", bank_account=dict(brand="kbank", number="1234567890", name="SOMCHAI PRASERT"), )
client, _ := omise.NewClient( "pkey_test_no1t4tnemucod0e51mo", "skey_test_no1t4tnemucod0e51mo", ) result := &omise.Recipient{} err := client.Do(result, &operations.UpdateRecipient{ RecipientID: "recp_test_no1t4tnemucod0e51mo", Email: "somchai@prasert.com", BankAccount: &omise.BankAccount{ Brand: "kbank", Number: "1234567890", Name: "Somechai Prasert", }, }) if err != nil { log.Fatalln(err) } log.Println(result)
Omise.configure(secret_key: "skey_test_4xs8breq3htbkj03d2x") Omise.Recipient.update("recp_test_5086xmr74vxs0ajpo78", [ email: "somchai@prasert.com", bank_account: [ brand: "kbank", number: "1234567890", name: "SOMCHAI PRASERT" ] ])
送金先情報を更新
- PATCH https://api.omise.co/recipients/{id}/verifyThis endpoint allows you to manually mark a recipient as verified. This can be useful for testing purposes.
Example
-
Verify a recipient
- curl
- node.js
curl https://api.omise.co/recipients/recp_test_5g03h1x1mbpgxp8h1fh/verify \ -X PATCH \ -u $OMISE_SECRET_KEY:
const omise = require('omise')({ secretKey: 'skey_test_no1t4tnemucod0e51mo', }); const recp = await omise.recipients.verify('recp_test_no1t4tnemucod0e51mo'); console.log(recp);